Contributing
Thank you for your interest in contributing to Binette! This is an open-source project, and we welcome everyone to get involved.
Help or Reporting a Bug
If you have a question or found a bug? Please open an issue.
Before you do, check the Issues page to see if it’s already been reported.
If you don’t see it there, create a new issue. We appreciate your input!
Adding a new feature to Binette
Starting with an issue
If you have ideas for new features or improvements, initiate a discussion in an issue. This allows us to evaluate and discuss your suggestions together.
For minor changes like fixing typos or making small edits, create a new Pull Request (PR) directly with your proposed changes.
Setting Up the Development Environment
Fork and Clone the Repository:
Fork the repository to your GitHub account.
Clone your forked repository to your local machine.
Get an Environment: Create an environment with all Binette prerequisites installed by following the installation instructions here.
Branch from ‘dev’:
Start your changes from thedevbranch, where updates for the upcoming release are integrated.git checkout dev
Install in Editable Mode:
To enable code editing and testing of new functionality, you can install Binette in editable mode:pip install -e .[dev]
The
[dev]part installs additional packages required for development. While not mandatory, it is recommended for an optimal development environment. Refer to thepyproject.tomlfile for details on the additional dependencies that will be installed.
Installing in editable mode allows you to modify the codebase and experiment with new features directly.
Code Quality and Formatting with Ruff:
To maintain consistent code styling and quality, we use Ruff as our linter and formatter.Code changes are automatically checked for linting and formatting as part of our CI pipeline via a GitHub Action.
Ensure your code passes Ruff checks before committing.
To check and format your code:
Install Ruff (e.g.,
pip install ruff).Run Ruff linter and formatter from the root of the Binette repository:
# Check for linting issues (with auto-fix) ruff check --fix binette/ # Format code ruff format binette/
Tip
Configure your IDE to integrate Ruff for automatic code linting and formatting as you work.
Making Your Changes
Maintain consistency in code formatting. When adding new code, closely follow the existing structure. Functions should include descriptive docstrings explaining their purpose and detailing the parameters. Ensure that argument types are specified in the function definitions.
Update Documentation
If your changes alter the tool’s behavior, update the documentation to reflect them. Provide clear descriptions and, if necessary, examples of commands and their respective outputs.
Tests
Continuous Integration (CI) Workflow
We’ve configured a CI workflow in the Actions tab, executing Binette on a small dataset and testing its results. If you’ve introduced a new feature, consider updating the CI YAML file to test it and ensure seamless integration.
Unit Tests
It is recommended to add unit test to any additions to the code. The test suite is located in the ‘tests’ directory at the root of the project.
Creating a Pull Request 🚀
Once you’ve made your changes:
Create a Pull Request: Submit a pull request from your forked repository to the ‘dev’ branch on GitHub.
Describe Your Changes: Clearly describe the modifications you’ve made and link any associated issue(s) in the PR description.
Collaborative Review: We will review your changes, offer feedback, and engage in discussions until we collectively agree on the implementation.