跳转到主要内容

AiiDA演示插件,用于包装`diff`可执行文件,以计算两个文件之间的差异。

项目描述

Build Status Coverage Status Docs status PyPI version

aiida-diff

AiiDA演示插件,用于包装diff可执行文件,以计算两个文件之间的差异。

此插件是AiiDA插件切割器的默认输出,旨在帮助开发者开始使用AiiDA插件。

仓库内容

另请参阅2019-05 AiiDA教程中的以下视频序列

有关更多信息,请参阅您插件的开发者指南

功能

  • 使用SinglefileData添加输入文件

    SinglefileData = DataFactory('core.singlefile')
    inputs['file1'] = SinglefileData(file='/path/to/file1')
    inputs['file2'] = SinglefileData(file='/path/to/file2')
    
  • 通过Python字典和DiffParameters指定命令行选项

    d = { 'ignore-case': True }
    DiffParameters = DataFactory('diff')
    inputs['parameters'] = DiffParameters(dict=d)
    
  • DiffParameters字典使用voluptuous进行验证。了解支持的选项

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

安装

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

用法

这里是一个如何使用此插件提交测试计算的完整示例。

如何提交计算的快速演示

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

该插件还包括用于检查其数据类型的verdi命令

verdi data diff list
verdi data diff export <PK>

开发

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

有关更多信息,请参阅开发者指南

许可证

MIT

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

aiida-diff-2.0.0.tar.gz (94.2 kB 查看哈希值)

上传时间

构建分发

aiida_diff-2.0.0-py3-none-any.whl (10.2 kB 查看哈希值)

上传时间 Python 3

支持者