Skip to main content

AiiDA demo plugin that wraps the `diff` executable for computing the difference between two files.

Project description

Build Status Coverage Status Docs status PyPI version

aiida-diff

AiiDA demo plugin that wraps the diff executable for computing the difference between two files.

This plugin is the default output of the AiiDA plugin cutter, intended to help developers get started with their AiiDA plugins.

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 Travis CI 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.

Features

  • Add input files using SinglefileData:

    SinglefileData = DataFactory('singlefile')
    inputs['file1'] = SinglefileData(file='/path/to/file1')
    inputs['file2'] = SinglefileData(file='/path/to/file2')
    
  • Specify command line options via a python dictionary and DiffParameters:

    d = { 'ignore-case': True }
    DiffParameters = DataFactory('diff')
    inputs['parameters'] = DiffParameters(dict=d)
    
  • DiffParameters dictionaries are validated using voluptuous. Find out about supported options:

    DiffParameters = DataFactory('diff')
    print(DiffParameters.schema.schema)
    

Installation

pip install aiida-diff
verdi quicksetup  # better to set up a new profile
verdi plugin list aiida.calculations  # should now show your calclulation plugins

Usage

Here goes a complete example of how to submit a test calculation using this plugin.

A quick demo of how to submit a calculation:

verdi daemon start         # make sure the daemon is running
cd examples
verdi run submit.py        # submit test calculation
verdi process list -a  # check status of calculation

The plugin also includes verdi commands to inspect its data types:

verdi data diff list
verdi data diff export <PK>

Development

git clone https://github.com/aiidateam/aiida-diff .
cd aiida-diff
pip install -e .[pre-commit,testing]  # install extra dependencies
pre-commit install  # install pre-commit hooks
pytest -v  # discover and run all tests

See the developer guide for more information.

License

MIT

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-diff-1.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiida_diff-1.0.0-py2.py3-none-any.whl (10.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aiida-diff-1.0.0.tar.gz.

File metadata

  • Download URL: aiida-diff-1.0.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for aiida-diff-1.0.0.tar.gz
Algorithm Hash digest
SHA256 07949b879156348f5ba36395dd38f0977a1bb901a23ba0c7cad7a99cfa860d45
MD5 d40b79293f15d31aa77cdcb0cf6839c1
BLAKE2b-256 2e962b5651750926cc5f0562502db0faadab543929ea10ece53ece1ad94796b3

See more details on using hashes here.

File details

Details for the file aiida_diff-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: aiida_diff-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for aiida_diff-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e7e4a817b42cc5ea4ad71a560ae429d5c44e09d604aec046ded69b9177012052
MD5 487806eb93bb0b9652dfc15ea4d3eac1
BLAKE2b-256 2268e85afc23b8b657129aeca2c3ff0e72363ef9c24cebd38c1e28f536dcfb1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page