Contributing#
NIR is a community-led initiative, and we welcome contributions from everyone. Here, we outline some technical details on getting started. Join the conversation on our Discord server or GitHub if you have any questions.
Developer guide: Getting started#
Use the standard github workflow.
Fork the repository.
Setup the virtual environment for this project.
Install all the development requirements (refer to the options described below).
Install git pre-commit hooks.
pre-commit install
Now you are all set. Go ahead, make your changes, test the features using
pytest
and commit them.
Installing the development requirements#
Using uv#
Easy package management can be accomplished using the uv tool which will need to be available on your local workstation. As explained in the official uv documentation, a number of straightforward installation options are available. uv is supported by IDEs such as PyCharm.
After the first clone of this repository, run the following command in the root directory.
This will automatically create
a new virtual environment in the folder .venv
and install all required NIR project dependencies to it.
uv sync
To run commands within the uv virtual environment, prefix them with uv run
.
For example, to run all the tests:
uv run pytest
Alternatively, you can activate the virtual environment in your current terminal and run commands directly. For example:
source .venv/bin/activate
pytest
Using pip#
pip install -r dev_requirements.txt
Code formatting#
We use black
to format the code and ruff
to linting.
The rules and formatting are embedded in the pre-commit hooks
. So you do not need to explicitly worry about these but is good to know when you see erros while commiting your code or in the CI.