Welcome! This document explains how to contribute code to this project, following our workflow and using the provided scripts. Please read carefully before starting.
Whenever a problem, task, or feature arises:
- Create a GitHub issue in the project.
- Assign yourself (or the appropriate team member).
- Add relevant tags. If a suitable tag does not exist, ask for it to be created.
- You may need to add additional labels later as needed.
- Always create a branch from
devto resolve the issue. - Branch naming must follow the type of work being done:
feat/your-branch-name # For new features
fix/your-branch-name # For bug fixes
refactor/your-branch-name # For refactoring
test/your-branch-name # For tests
- Commit regularly to this branch.
- To keep your branch updated with the base branch:
git pull --rebase origin [branch-name]- The most common case is updating from
dev:
git pull --rebase origin devSometimes you may need to start working on a feature (B) that depends on another feature (A) that is not yet merged into dev. In this case, you can create a new branch for feature B from the branch of feature A.
-
Create a branch for feature B from branch A:
# Make sure you are on branch A git checkout feat/branch-A # Create branch B from branch A git checkout -b feat/branch-B
-
Work on feature B and once feature A is merged into
dev, you need to rebase your branch B ontodev.# Make sure you are on branch B git checkout feat/branch-B # Fetch the latest changes from the remote git fetch origin # Rebase your branch onto dev git rebase origin/dev
This will reapply your changes from branch B on top of the
devbranch.
Before pushing your branch, if you have multiple commits, it is recommended to squash them into a single commit:
git rebase -i HEAD~[n]- Replace
[n]with the number of commits in your branch. - In the interactive terminal (GNU Nano by default), each commit starts with
pick. - Keep the first commit as
pickand change the rest tosquash. - Save and exit.
- If you’re unsure, watch this 4-minute video: Interactive Rebase.
- Push your branch to GitHub:
git push -u origin your-branch-name-
Open a Pull Request.
-
At least two team members must approve before merging.
-
If you make additional changes after pushing, either:
git commit --amend
# or
git rebase -i HEAD~[n] # to squash commits again
git push -f-
All commit messages must be semantic and follow Conventional Commits.
-
Example commit types:
feat: add new machine learning model
fix: correct data preprocessing step
refactor: improve data loader code
test: add unit tests for model evaluation
docs: update README
chore: update dependencies
We provide a set of commands via make that uses uv or other packages under the hood to maintain code quality:
| Command | Description |
|---|---|
make lint |
Check code style with Ruff |
make lint-fix |
Automatically fix lint errors |
make typecheck |
Run Mypy type checking |
make test |
Run Pytest tests |
make commit |
creates conventional commits interactively |
make check-all |
Run lint, typecheck, and tests together |
- We recommend running
make check-allbefore committing to ensure everything passes.
- Create an issue.
- Create a properly named branch from
dev. - Commit your changes.
- Optionally squash commits.
- Push branch and open a Pull Request.
- Ensure semantic commit messages.
- Use
uvscripts to maintain code quality. - Get approvals and merge.
Thanks for contributing and keeping the codebase clean 🤪🍠!