Contribution guide¶
Setting up the environment¶
1. Run make install-uv
to install uv if not already installed
1. Run make install
to install all dependencies and pre-commit hooks
Code contributions¶
Workflow¶
Clone your fork locally with git
Make your changes
Run
make lint
to run linters and formatters. This step is optional and will be executed automatically by git before you make a commit, but you may want to run it manually in order to apply fixes automatically by git before you make a commit, but you may want to run it manually in order to apply fixesCommit your changes to git
Push the changes to your fork
Open a pull request. Give the pull request a descriptive title indicating what it changes. If it has a corresponding open issue, the issue number should be included in the title as well. For example a pull request that fixes issue
bug: Increased stack size making it impossible to find needle #100
could be titledfix(#100): Make needles easier to find by applying fire to haystack
Tip
Pull requests and commits all need to follow the Conventional Commit format
Guidelines for writing code¶
All code should be tested. This is enforced via pytest.
All code should be properly formatted. This is enforced via Ruff.
Writing and running tests¶
Todo
Write this section
Project documentation¶
The documentation is located in the /docs
directory and is ReST and
Sphinx. If you’re unfamiliar with any of those,
ReStructuredText primer and
Sphinx quickstart are recommended reads.
Running the docs locally¶
To run or build the docs locally, you need to first install the required dependencies:
make install
Then you can serve the documentation with make docs-serve
, or build them with make docs
.
Creating a new release¶
Ensure that all local changes are committed and your commit tree is not dirty
- Run
make release bump=major|minor|patch
to bump the version for the python and javascript packages. This will automatically update the version and create a commit. Note
The version should follow semantic versioning and PEP 440.
- Run
Push the changes to the
main
branchDraft a new release on GitHub
Use
vMAJOR.MINOR.PATCH
(e.g.v1.2.3
) as both the tag and release titleFill in the release description. You can use the “Generate release notes” function to get a draft for this
Publish the release
Go to Actions and approve the release workflow
Check that the workflow runs successfully