Testing suite
The kallisto project uses nox as an automated unit test suite, which is therefore an additional dependency.
Default nox session
The default session includes: linting (lint), type checks (mypy, pytype), and unit tests (tests).
> noxWhen everything runs smoothly through, you are ready to go! After one successful nox run, we can reuse the created virtual environment via the -r flag.
> nox -rSometimes conda and nox are getting in their ways, which could lead to a failure while running unit tests. When facing such a case, deactivate the virtual environment and try again.
Different unit test sessions are implemented (check the noxfile.py). They can be called separately via the run session -rs flag.
Tests
Run all unit tests that are defined in the /tests directory.
> nox -rs testsLint
kallisto uses the flake8 linter (check the .flake8 config file).
> nox -rs lintBlack
kallisto uses the black code formatter.
Safety
kallisto checks the security of dependencies via safety.
Mypy
kallisto checks for static types via mypy (check the mypy.ini config file).
Pytype
kallisto furthermore uses pytype for type checks.
Coverage
Unit test coverage can be checked as well.
Last updated
Was this helpful?