Skip to content

Latest commit

 

History

History
194 lines (141 loc) · 5.52 KB

File metadata and controls

194 lines (141 loc) · 5.52 KB

Contributing to Faborite

First off, thank you for considering contributing to Faborite! 🎉 It's people like you that make Faborite such a great tool.

Code of Conduct

This project and everyone participating in it is governed by the Faborite Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to michael@datachain.consulting.

How Can I Contribute?

Reporting Bugs

Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, please include as many details as possible:

Bug Report Template:

  • Title: A clear and descriptive title
  • Description: A clear and concise description of the bug
  • Steps to Reproduce: Step-by-step instructions to reproduce the behavior
  • Expected Behavior: What you expected to happen
  • Actual Behavior: What actually happened
  • Environment:
    • Faborite version
    • Operating System
    • .NET version
    • Fabric workspace type

Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:

  • Use case: Why is this enhancement useful?
  • Proposed solution: A clear description of what you want to happen
  • Alternatives considered: Any alternative solutions you've considered

Pull Requests

  1. Fork the repository and create your branch from main
  2. Make your changes following our coding standards
  3. Write or update tests for your changes
  4. Ensure all tests pass by running dotnet test
  5. Update documentation if needed
  6. Submit a pull request

Development Setup

Prerequisites

Getting Started

# Clone your fork
git clone https://github.com/YOUR_USERNAME/faborite.git
cd faborite

# Add upstream remote
git remote add upstream https://github.com/mjtpena/faborite.git

# Install dependencies and build
dotnet restore
dotnet build

# Run tests
dotnet test

# Run with coverage
dotnet test --collect:"XPlat Code Coverage"

Project Structure

faborite/
├── src/
│   ├── Faborite.Core/           # Core library (main logic)
│   └── Faborite.Cli/            # CLI application
├── tests/
│   ├── Faborite.Core.Tests/     # Unit tests for core
│   └── Faborite.Cli.Tests/      # Unit tests for CLI
└── docs/                         # Documentation

Coding Standards

C# Style Guide

  • Follow Microsoft's C# Coding Conventions
  • Use meaningful variable and method names
  • Keep methods small and focused (single responsibility)
  • Use async/await for I/O operations
  • Add XML documentation comments for public APIs

Code Examples

// ✅ Good
public async Task<TableSyncResult> SyncTableAsync(
    string tableName,
    CancellationToken cancellationToken = default)
{
    ArgumentNullException.ThrowIfNullOrEmpty(tableName);
    // Implementation...
}

// ❌ Bad
public async Task<TableSyncResult> Sync(string t)
{
    // No validation, poor naming
}

Commit Messages

Follow the Conventional Commits specification:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that don't affect code meaning (formatting)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Performance improvements
  • test: Adding or updating tests
  • chore: Changes to build process or auxiliary tools

Examples:

feat(sampling): add stratified sampling strategy
fix(onelake): handle connection timeout properly
docs(readme): update installation instructions
test(exporter): add tests for CSV export

Testing

  • Write unit tests for all new functionality
  • Maintain test coverage above 80%
  • Use descriptive test names that explain the scenario
// ✅ Good test name
[Fact]
public async Task SyncTableAsync_WithInvalidTableName_ThrowsArgumentException()

// ❌ Bad test name
[Fact]
public async Task Test1()

Pull Request Checklist

Before submitting a PR, ensure:

  • Code compiles without errors
  • All tests pass (dotnet test)
  • New code has appropriate test coverage
  • Documentation is updated if needed
  • Commit messages follow conventions
  • PR description explains the changes

First Time Contributors

Looking for something to work on? Check out issues labeled:

Getting Help

Recognition

Contributors will be recognized in our README and release notes. We appreciate every contribution, no matter how small!

License

By contributing to Faborite, you agree that your contributions will be licensed under its MIT license.


Thank you for contributing! 🙏