Contributions are welcome as we aim to continue improving novae
. For instance, you can contribute by:
- Opening an issue
- Discussing the current state of the code
- Making a Pull Request (PR)
If you want to open a PR, follow the following instructions.
To add some new code to novae, you should:
- Fork the repository
- Install
novae
in editable mode with thedev
extra (see below) - Create your personal branch from
main
- Implement your changes according to the 'Coding guidelines' below
- Create a pull request on the
main
branch of the original repository. Add explanations about your developed features, and wait for discussion and validation of your pull request
When contributing, installing novae
in editable mode is recommended. We also recommend installing the dev
extra.
For that, choose between pip
and poetry
as below:
git clone https://github.com/MICS-Lab/novae.git
cd novae
pip install -e '.[dev]' # pip installation
poetry install -E dev # poetry installation
We use pre-commit
to run code quality controls before the commits. This includes running black
, isort
, flake8
, and others.
You can set it up at the root of the repository like this:
pre-commit install
Then, it will run the pre-commit automatically before each commit.
You can also run the pre-commit manually:
pre-commit run --all-files
Apart from this, we recommend to follow the standard styling conventions:
- Follow the PEP8 style guide.
- Provide meaningful names to all your variables and functions.
- Provide type hints to your function inputs/outputs.
- Add docstrings in the Google style.
- Try as much as possible to follow the same coding style as the rest of the repository.
When create a pull request, tests are run automatically. But you can also run the tests yourself before making the PR. For that, run pytest
at the root of the repository. You can also add new tests in the ./tests
directory.
To check the coverage of the tests:
coverage run -m pytest
coverage report # command line report
coverage html # html report
You can update the documentation in the ./docs
directory. Refer to the mkdocs-material documentation for more help.
To serve the documentation locally:
mkdocs serve