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:

  1. build the documentation

  2. check coding style and version number (not required to pass by default)

Building the documentation

  1. Install the docs extra:

    pip install -e .[docs]
    
  2. 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.rst
    
  3. Use 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.