Package: aiida-diff
aiida-diffAiiDA demo plugin that wraps thediffexecutable for computing the difference between two files.This plugin is the default output of theAiiDA plugin cutter,
intended to help developers get started with their AiiDA plugins.Repository contents.github/:Github Actionsconfigurationci.yml: runs tests, checks test coverage and builds documentation at every new commitpublish-on-pypi.yml: automatically deploy git tags to PyPI - just generate aPyPI API tokenfor your PyPI account and add it to thepypi_tokensecret of your github repositoryaiida_diff/: The main source code of the plugin packagedata/: A newDiffParametersdata class, used as input to theDiffCalculationCalcJobclasscalculations.py: A newDiffCalculationCalcJobclasscli.py: Extensions of theverdi datacommand line interface for theDiffParametersclasshelpers.py: Helpers for setting up an AiiDA code fordiffautomaticallyparsers.py: A newParserfor theDiffCalculationdocs/: A documentation template ready for publication onRead the Docsexamples/: An example of how to submit a calculation using this plugintests/: Basic regression tests using thepytestframework (submitting a calculation, ...). Installpip install -e .[testing]and runpytest..gitignore: Telling git which files to ignore.pre-commit-config.yaml: Configuration ofpre-commit hooksthat sanitize coding style and check for syntax errors. Enable viapip install -e .[pre-commit] && pre-commit install.readthedocs.yml: Configuration of documentation build forRead the DocsLICENSE: License for your pluginREADME.md: This fileconftest.py: Configuration of fixtures forpytestpyproject.toml: Python package metadata for registration onPyPIand theAiiDA plugin registry(including entry points)See also the following video sequences from the 2019-05 AiiDA tutorial:run aiida-diff example calculationaiida-diff CalcJob pluginaiida-diff Parser pluginaiida-diff computer/code helpersaiida-diff input data (with validation)aiida-diff cliaiida-diff testsAdding your plugin to the registrypre-commit hooksFor more information, see thedeveloper guideof your plugin.FeaturesAdd input files usingSinglefileData:SinglefileData=DataFactory('core.singlefile')inputs['file1']=SinglefileData(file='/path/to/file1')inputs['file2']=SinglefileData(file='/path/to/file2')Specify command line options via a python dictionary andDiffParameters:d={'ignore-case':True}DiffParameters=DataFactory('diff')inputs['parameters']=DiffParameters(dict=d)DiffParametersdictionaries are validated usingvoluptuous.
Find out about supported options:DiffParameters=DataFactory('diff')print(DiffParameters.schema.schema)Installationpipinstallaiida-diff
verdiquicksetup# better to set up a new profileverdipluginlistaiida.calculations# should now show your calclulation pluginsUsageHere goes a complete example of how to submit a test calculation using this plugin.A quick demo of how to submit a calculation:verdidaemonstart# make sure the daemon is runningcdexamples
./example_01.py# run test calculationverdiprocesslist-a# check record of calculationThe plugin also includes verdi commands to inspect its data types:verdidatadifflist
verdidatadiffexport<PK>Developmentgitclonehttps://github.com/aiidateam/aiida-diff.cdaiida-diff
pipinstall--upgradepip
pipinstall-e.[pre-commit,testing]# install extra dependenciespre-commitinstall# install pre-commit hookspytest-v# discover and run all testsSee thedeveloper guidefor more information.LicenseMIT