aiida.backends.general.migrations package¶
Submodules¶
SQL statements to detect invalid/ununderstood links for the provenance redesign migration.
Various utils that should be used during migrations and migrations tests because the AiiDA ORM cannot be used.
-
aiida.backends.general.migrations.utils.
delete_numpy_array_from_repository
(uuid, name)[source]¶ Delete the numpy array with a given name from the repository corresponding to a node with a given uuid.
Parameters: - uuid – the UUID of the node
- name – the name of the numpy array
-
aiida.backends.general.migrations.utils.
ensure_repository_folder_created
(uuid)[source]¶ Make sure that the repository sub folder for the node with the given UUID exists or create it.
Parameters: uuid – UUID of the node
-
aiida.backends.general.migrations.utils.
get_node_repository_sub_folder
(uuid)[source]¶ Return the absolute path to the sub folder path within the repository of the node with the given UUID.
Parameters: uuid – UUID of the node Returns: absolute path to node repository folder, i.e /some/path/repository/node/12/ab/c123134-a123/path
-
aiida.backends.general.migrations.utils.
get_numpy_array_absolute_path
(uuid, name)[source]¶ Return the absolute path of a numpy array with the given name in the repository of the node with the given uuid.
Parameters: - uuid – the UUID of the node
- name – the name of the numpy array
Returns: the absolute path of the numpy array file
-
aiida.backends.general.migrations.utils.
get_object_from_repository
(uuid, name)[source]¶ Return the content of a file with the given name in the repository sub folder of the given node.
Parameters: - uuid – UUID of the node
- name – name to use for the file
-
aiida.backends.general.migrations.utils.
load_numpy_array_from_repository
(uuid, name)[source]¶ Load and return a numpy array from the repository folder of a node.
Parameters: - uuid – the node UUID
- name – the name under which to store the array
Returns: the numpy array