Contributing to nnbench¶
Thank you for your interest in contributing to this project!
We appreciate issue reports, pull requests for code and documentation, as well as any project-related communication through GitHub Discussions.
Getting Started¶
To get started with development, you can follow these steps:
-
Clone this repository:
-
Navigate to the directory and install the development dependencies into a virtual environment, e.g. using
uv: -
After making your changes, verify they adhere to our Python code style by running
pre-commit:You can also set up Git hooks through
pre-committo perform these checks automatically: -
To run the tests, just invoke
pytestfrom the package root directory:
Updating dependencies¶
Dependencies should stay locked for as long as possible, ideally for a whole release. If you have to update a dependency during development, you should do the following:
- If it is a core dependency needed for the package, add it to the
dependenciessection in thepyproject.tomlviauv add <dep>. - In case of a development dependency, add it to the
devsection of theproject.dependency-groupstable instead (uv add --group dev <dep>). - Dependencies needed for documentation generation are found in the
docssections ofproject.dependency-groups(uv add --group docs <dep>).
After adding the dependency in either of these sections, use uv lock to pin all dependencies again:
Important
Since the official development version is Python 3.11, please run the above commands in a virtual environment with Python 3.11.