See the Scientific Python Developer Guide for a detailed description of best practices for developing scientific packages.
You can set up a development environment by running:
python3 -m venv venv # create a virtualenv called venv
source ./venv/bin/activate # now `python` points to the virtualenv python
pip install -v -e ".[dev]" # -v for verbose, -e for editable, [dev] for dev dependenciesYou should prepare pre-commit, which will help you by checking that commits pass required checks:
pip install pre-commit # or brew install pre-commit on macOS
pre-commit install # this will install a pre-commit hook into the git repoYou can also/alternatively run pre-commit run (changes only) or
pre-commit run --all-files to check even without installing the hook.
Use pytest to run the unit checks:
pytestUse pytest-cov to generate coverage reports:
pytest --cov=heartfm_evalsThis project uses pre-commit for all style checking. Install pre-commit and run:
pre-commit run -ato check all files.