PyPI Conda

To install from Conda (recommended):

>> conda install -c conda-forge aiida-gulp

To install from pypi:

>> pip install --pre aiida-gulp

To install the development version:

>> git clone .
>> cd aiida-gulp

and either use the pre-written Conda development environment (recommended):

>> conda env create -n aiida_testenv -f conda_dev_env.yml python=3.6
>> conda activate aiida_testenv
>> pip install --no-deps -e .

or install all via pip:

>> pip install -e .  # note this won't install postgres and rabbitmq
#>> pip install -e .[code_style,testing,docs] # install extras for more features

To configure aiida:

>> rabbitmq-server -detached >/dev/null 2>&1
>> eval "$(_VERDI_COMPLETE=source verdi)"
>> verdi quicksetup  # better to set up a new profile
>> verdi status
>> verdi calculation plugins  # should now show your calclulation plugins

Then use verdi code setup with a gulp. input plugin to set up an AiiDA code for that plugin.

See also

The AiiDA documentation, for more general information on configuring and working with AiiDa.

GULP Executable

For test purposes, the gulp_mock executable is installed with aiida-gulp, that will return pre-computed output files, if parsed specific test input files (based on the contents hash). When running the test suite, these executable will be used in place of gulp, unless pytest --gulp-no-mock is used.



Build Status Coverage Status

The following will discover and run all unit test:

>> cd aiida-gulp
>> pytest -v

To omit tests which call external executables (like gulp):

>> pytest --gulp-skip-exec

To call the actual executables (e.g. gulp instead of gulp_mock):

>> pytest --gulp-no-mock

To output the results of calcjob executions to a specific directory:

>> pytest --gulp-workdir "test_workdir"

Coding Style Requirements

The code style is tested using flake8, with the configuration set in .flake8, and black.

Installing with aiida-gulp[code_style] makes the pre-commit package available, which will ensure these tests are passed by reformatting the code and testing for lint errors before submitting a commit. It can be setup by:

>> cd aiida-gulp
>> pre-commit install

Optionally you can run black and flake8 separately:

>> black path/to/file  # format file in-place
>> flake8

Editors like VS Code also have automatic code reformat utilities, which can check and adhere to this standard.


The documentation can be created locally by:

>> cd aiida-gulp/docs
>> make clean
>> make  # or make debug