Testing

Tests are written by extending the TestCase class from the unittest module in the Python standard library. All tests can be found in the tests directory.

Docker

All tests can be run using the following command:

docker run -it -v $PWD:/app "parsertongue/clu-spacy:latest" test-all

To run just the unit tests (with code coverage), run the following command:

docker run -it -v $PWD:/app "parsertongue/clu-spacy:latest" green -vvv --run-coverage

Anaconda

source activate clu-spacy
# execute the following command from the project root:
green -vvv .

Typehints

The code makes use of Python type hints.

Docker

To perform type checking, run the following command:

docker run -it -v $PWD:/app "parsertongue/clu-spacy:latest" mypy --ignore-missing-imports --follow-imports=skip --strict-optional .

Anaconda

source activate clu-spacy
# execute the following command from the project root:
mypy --ignore-missing-imports --follow-imports=skip --strict-optional .