aiida.tools.importexport.dbimport.backends package

Submodules

Utility functions for import of AiiDA entities

aiida.tools.importexport.dbimport.backends.utils.deserialize_attributes(attributes_data, conversion_data)[source]

Deserialize attributes

aiida.tools.importexport.dbimport.backends.utils.deserialize_field(key, value, fields_info, import_unique_ids_mappings, foreign_ids_reverse_mappings)[source]

Deserialize field using deserialize attributes

aiida.tools.importexport.dbimport.backends.utils.merge_comment(incoming_comment, comment_mode)[source]

Merge comment according comment_mode :return: New UUID if new Comment should be created, else None.

aiida.tools.importexport.dbimport.backends.utils.merge_extras(old_extras, new_extras, mode)[source]
Parameters
  • old_extras – a dictionary containing the old extras of an already existing node

  • new_extras – a dictionary containing the new extras of an imported node

  • extras_mode_existing – 3 letter code that will identify what to do with the extras import. The first letter acts on extras that are present in the original node and not present in the imported node. Can be either k (keep it) or n (do not keep it). The second letter acts on the imported extras that are not present in the original node. Can be either c (create it) or n (do not create it). The third letter says what to do in case of a name collision. Can be l (leave the old value), u (update with a new value), d (delete the extra), a (ask what to do if the content is different).