Development#
The project setup is inspired by both Python for Data Science and the Learn Scientific Python project. These projects give guidelines to how to set up a research project that is reproducible and with good quality.
Commit messages are encouraged to follow the Conventional Commits specification.
Styling and pre-commit#
To maintain the code quality when committing to the repo we use pre-commit with ruff, type checking for script files and formatting of pyproject.toml file. This ensures that these code quality tools are run before any commit.
The configuration is stored in .pre-commit-config.yaml
, and to set up the git hook scripts simply run
the following in the virtual environment:
pre-commit install
The pre-commits can be run on all files before committing by this command:
pre-commit run --all-files