Thank you for considering contributing to this project!
All contributions are appreciated, from reporting bugs to implementing new features. This guide will try to help you take the first steps.
- First, fork the repository.
- Copy forked repositrory to local machine:
>>> git clone https://github.com/<username>/obscure_stats.git
>>> cd obscure_stats
- This project uses
poetry
as a pakcage manager. See how to install it here. - Set up local enviroment that
poetry
will use. You can do it with pyenv or venv or any other enviroment manager that you like. - to initialize your local enviroment run:
>>> poetry install
- You are good to go!
- Every change should be tested; you need to add new tests for the new functionality (
pytest
andpytest-cov
will help you with this). - Every change should be documented; you need to add a docstring (
numpy
style) with reference to a scientific paper (preprints accepted). - Every change should be clean; you need to run linters, formatters, typechekers (
ruff
andmypy
will take care of this).
After you have made some changes to the codebase, you should run the following commands:
>>> poetry run ruff check . --fix
This command will run linters and other useful stuff and try to fix all the problems. If something is unfixable automatically, you should try to fix it manually.
>>> poetry run ruff format .
This command will run autoformatter.
>>> poetry run mypy .
This command will run type checker. All typing problems should be fixed.
>>> poetry run pytest --cov-report term-missing --cov=obscure_stats
This command will run the test suite. All tests should pass, as well as codecoverage should be high enough.
Happy coding!