Skip to main content

AiiDA plugin for running the GULP MD code

Project description

Build Status Coverage Status Docs status PyPI Anaconda Code style: black

aiida-gulp

AiiDA plugin for running the GULP code.

Documentation: https://readthedocs.org/projects/aiida-gulp

Installation

To install from Conda (recommended)::

>> conda install -c conda-forge aiida-gulp aiida-core.services

To install from pypi::

>> pip install aiida-gulp

To install the development version:

>> git clone https://github.com/chrisjsewell/aiida-gulp .
>> cd aiida-gulp
>> pip install -e .  # also installs aiida, if missing (but not postgres)
>> #pip install -e .[pre-commit,testing] # install extras for more features
>> verdi quicksetup  # set up a new profile
>> verdi calculation plugins  # should now show the calculation plugins (with prefix gulp.)

Development

Testing against mock GULP executables

Because GULP is a licensed software, it is not possible to source a copy of the executable on Travis CI. Therefore, a mock executable (gulp_mock) has been created for testing purposes (which also speeds up test runs).

This executable computes the md5 hash of the supplied input file and tries to match it against a dictionary of precomputed hashes. If found, the executable will write the matching output (from test/output_files) to stdout.

The following will discover and run all unit test:

>> pip install -e .[testing]
>> reentry scan -r aiida
>> pytest -v

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

>> pytest --gulp-skip-exec

To call the actual executable (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 code should be formatted with 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 .  # recursively find and format files in-place
>> flake8

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

License

See LICENSE file

Contact

chrisj_sewell@hotmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiida-gulp-0.10.0b5.tar.gz (217.6 kB view hashes)

Uploaded source

Built Distribution

aiida_gulp-0.10.0b5-py3-none-any.whl (287.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page