Developer guide¶
Running the tests¶
Automatic coding style checks¶
Enable enable automatic checks of code sanity and coding style:
pip install -e .[pre-commit]
pre-commit install
After this, the yapf formatter, the pylint linter and the pylint code analyzer will run at every commit.
If you ever need to skip these pre-commit hooks, just use:
git commit -n
Continuous integration¶
aiida_qp2
comes with a .github
folder that contains continuous integration tests on every commit using GitHub Actions. It will:
build the documentation
check coding style and version number (not required to pass by default)
Building the documentation¶
Install the
docs
extra:pip install -e .[docs]Edit the individual documentation pages:
docs/source/index.rst docs/source/developer_guide/index.rst docs/source/user_guide/index.rst docs/source/user_guide/get_started.rst docs/source/user_guide/tutorial.rstUse Sphinx to generate the html documentation:
cd docs make
Check the result by opening build/html/index.html
in your browser.
Note
When updating the plugin package to a new version, remember to update the version number both in setup.json
and aiida_qp2/__init__.py
.