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'#
__parameters__ = ()#
__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_impl = <_abc_data object>#
_logger: Optional[logging.Logger] = <Logger aiida_diff.data.DiffParameters (WARNING)>#
_plugin_type_string: ClassVar[str] = 'data.diff.DiffParameters.'#
_query_type_string: ClassVar[str] = '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': <class 'bool'>, 'ignore-file-name-case': <class 'bool'>, 'ignore-tab-expansion': <class 'bool'>, 'ignore-space-change': <class 'bool'>, 'ignore-all-space': <class '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