Developer guide

Running the tests

The following will discover and run all unit test:

pip install -e .[testing]
pytest -v

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 prospector 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-diff comes with a .travis.yml file for continuous integration tests on every commit using Travis CI. It will:

  1. run all tests for the django and sqlalchemy ORM
  2. build the documentation
  3. check coding style and version number (not required to pass by default)

Just enable Travis builds for the aiida-diff repository in your Travis account.

aiida-diff also includes an azure-pipelines.yml file for continuous integration tests using Azure Pipelines.

Online documentation

The documentation of aiida-diff is ready for ReadTheDocs:

Simply add the aiida-diff repository on your RTD profile, preferably using aiida-diff as the project name - that’s it!

PyPI release

Your plugin is ready to be uploaded to the Python Package Index. Just register for an account and:

pip install twine
python sdist bdist_wheel
twine upload dist/*

After this, you (and everyone else) should be able to:

pip install aiida-diff