Developers’ corner

Build, documentation, unittests

Build the module inplace:

python build_ext --inplace

Generate the setup in subfolder dist:

python sdist

Generate the documentation in folder dist/html:

python -m sphinx -T -b html doc dist/html

Run the unit tests:

python -m unittest discover tests


python -m pytest

To check style:

python -m flake8 aftercovid tests examples


Instructions can be found in CI files:

Full script to build

echo --CLONE--
git clone -b master --single-branch --recursive
cd aftercovid

echo --PIP--
python -m pip install -r requirements.txt || exit 1
python -m pip install -r requirements-dev.txt || exit 1

echo --WHEEL--
python -u build_ext --inplace || exit 1

echo --TEST--
python -m pytest -v -v || exit 1
python -m coverage run  --omit=tests/test_*.py -m unittest discover tests -v -v || exit 1
python -m coverage html -d dist/html/coverage.html --include **/aftercovid/** || exit 1
python -m flake8 . || exit 1

echo --WHEEL--
python -u bdist_wheel || exit 1

echo --SPEED--
python -m aftercovid check || exit 1

echo --DOC--
python install || exit 1
python -m sphinx -b html doc dist/html || exit 1

echo --END--
cd ..