aiida_diff.data package

Module contents

Data types provided by plugin

Register data types via the “aiida.data” entry point in setup.json.

class aiida_diff.data.DiffParameters(dict=None, **kwargs)[source]

Bases: aiida.orm.nodes.data.dict.Dict

Command line options for diff.

This class represents a python dictionary used to pass command line options to the executable.

__abstractmethods__ = frozenset([])
__init__(dict=None, **kwargs)[source]

Constructor for the data class

Usage: DiffParameters(dict{'ignore-case': True})

Parameters:
  • parameters_dict (type) – dictionary with commandline parameters
  • parameters_dict – dict
__module__ = 'aiida_diff.data'
__str__()[source]

String representation of node.

Append values of dictionary to usual representation. E.g.:

uuid: b416cbee-24e8-47a8-8c11-6d668770158b (pk: 590)
{'ignore-case': True}
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 36
_abc_registry = <_weakrefset.WeakSet object>
_logger = <logging.Logger object>
_plugin_type_string = 'data.diff.DiffParameters.'
_query_type_string = 'data.diff.'
cmdline_params(file1_name, file2_name)[source]

Synthesize command line parameters.

e.g. [ ‘–ignore-case’, ‘filename1’, ‘filename2’]

Parameters:
  • file_name1 (type) – Name of first file
  • file_name1 – str
  • file_name2 (type) – Name of second file
  • file_name2 – str
schema = <Schema({'ignore-case': <type 'bool'>, 'ignore-tab-expansion': <type 'bool'>, 'ignore-space-change': <type 'bool'>, 'ignore-file-name-case': <type 'bool'>, 'ignore-all-space': <type 'bool'>}, extra=PREVENT_EXTRA, required=False) object>
validate(parameters_dict)[source]

Validate command line options.

Uses the voluptuous package for validation. Find out about allowed keys using:

print(DiffParameters).schema.schema
Parameters:
  • parameters_dict (type) – dictionary with commandline parameters
  • parameters_dict – dict
Returns:

validated dictionary