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).

> nox

When 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 -r

Sometimes 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 tests

Lint

kallisto uses the flake8 linter (check the .flake8 config file).

> nox -rs lint

Black

kallisto uses the black code formatter.

> nox -rs black

Safety

kallisto checks the security of dependencies via safety.

> nox -rs safety

Mypy

kallisto checks for static types via mypy (check the mypy.ini config file).

> nox -rs mypy

Pytype

kallisto furthermore uses pytype for type checks.

> nox -rs pytype

Coverage

Unit test coverage can be checked as well.

> nox -rs coverage

Last updated