Skip to content

Latest commit

 

History

History
82 lines (55 loc) · 4.04 KB

README.md

File metadata and controls

82 lines (55 loc) · 4.04 KB

Build Status

AiiDA plugin cutter

Cookie cutter recipe for AiiDA plugins. The fastest way to template a new AiiDA plugin package.

For the package structure produced by the plugin cutter, see the aiida-diff demo plugin.

Note: The plugin cutter produces plugins for aiida-core>=2.0.0. See the support/aiida-0.x branch for creating plugins for older versions of aiida-core.

Usage instructions

pip install cookiecutter black
cookiecutter https://github.com/aiidateam/aiida-plugin-cutter.git

Demo

This will produce the files and folder structure for your plugin, already adjusted for the name of your plugin.

In order to get started with development

  1. it's often useful to create a dedicated Python virtual environment for developing your plugin, e.g. using virtualenv, virtualenvwrapper or conda

  2. you will want to install your plugin in editable mode, so that changes to the source code of your plugin are immediately visible to other packages:

    cd aiida_<name>
    pip install -e .  # install in editable mode

You are now ready to start development! See the README.md of your package (or of aiida-diff) for an explanation of the purpose of all generated files.

Features

Plugins templated using the plugin cutter

  • include a calculation, parser and data type as well as an example of how to submit a calculation
  • include basic regression tests using the pytest framework (submitting a calculation, ...)
  • can be directly pip-installed (and are prepared for submisson to PyPI
  • include a documentation template ready for Read the Docs
  • come with Github Actions configuration - enable it to run tests and check test coverage at every commit
  • come with pre-commit hooks that sanitize coding style and check for syntax errors - enable via pre-commit install

For more information on how to take advantage of these features, see the developer guide of your plugin.

Developing the plugin cutter

The plugin cutter comes with rather strict continuous integration tests which

  • test that the cookiecutter recipe works
  • test that the plugin can be pip-installed
  • test that the unit tests of the plugin pass
  • test that the documentation of the plugin builds
  • test that the code of the plugin confirms to coding standards

As you develop the plugin cutter, you will want to also update the aiida-diff repository with its default output. Simply run ./update-aiida-diff.sh to create a clone of the aiida-diff repository, with the latest changes produced by the plugin cutter ready to be committed.

License

MIT

Contact

Please report issues to the GitHub issue tracker. Other inquiries may be directed to the AiiDA mailinglist.

Acknowledgements

This work is supported by the MARVEL National Centre for Competency in Research funded by the Swiss National Science Foundation, as well as by the MaX European Centre of Excellence funded by the Horizon 2020 EINFRA-5 program, Grant No. 676598.

MARVEL MaX