Usage¶
After the installation, here is the manual for running the project.
Waf¶
The general research project must be configured in advance with
$ python waf.py configure
Make sure that all steps pass successfully. Otherwise determine what is missing, fix it and rerun the command. After that, run
$ python waf.py (build)
where build
is optional, but it executes the same action. If you want to delete
everything created in bld
and restart the project from the source files, run
$ python waf.py distclean configure
Quality Checks¶
The quality of the code base is ensured by pre-commit-hooks which are automatically executed before changes are committed. If a check fails, the commit is aborted. To install the hooks, type
$ pre-commit install
After that, run
$ pre-commit run --all-files
to execute the checks without making a commit. Currently, the following hooks are installed:
- black - The Uncomprimising Python Formatter
- blacken-docs - Black for Documentation
- flake8 - Linting
- reorder-python-imports
- doc8
- check-yaml - Validating .yaml files
To update all hooks, type
$ pre-commit autoupdate
which will change the versions in .pre-commit-config.yaml
. Do that from time to
time.
Testing¶
Before committing changes, make sure that everything works fine. Run
$ tox
and the whole test suite will be run.