Development¶
For users who would like to actively develop with galois
, these sections may prove helpful.
Lint the package¶
Linting is done with pylint. The linting dependencies are stored in requirements-lint.txt
.
1pylint
Install the linter dependencies.
$ python3 -m pip install -r requirements-lint.txt
Run the linter.
$ python3 -m pylint --rcfile=setup.cfg galois/
Run the unit tests¶
Unit testing is done through pytest. The tests themselves are stored in tests/
. We test
against test vectors, stored in tests/data/
. generated using SageMath.
See the scripts/generate_test_vectors.py
script. The testing dependencies are stored in requirements-test.txt
.
1pytest
2pytest-cov
3pytest-benchmark
Install the test dependencies.
$ python3 -m pip install -r requirements-test.txt
Run the unit tests.
$ python3 -m pytest tests/
Build the documentation¶
The documentation is generated with Sphinx. The dependencies are
stored in requirements-doc.txt
.
1sphinx>=3
2recommonmark>=0.5
3sphinx_rtd_theme>=0.5
4readthedocs-sphinx-ext>=1.1
5ipykernel
6pandoc
7numpy
Install the documentation dependencies.
$ python3 -m pip install -r requirements-doc.txt
Build the HTML documentation. The index page will be located at docs/build/index.html
.
$ sphinx-build -b html -v docs/build/