aiida.orm.nodes.data.remote.stash package#

Module with data plugins that represent files of completed calculations jobs that have been stashed.

Submodules#

Data plugin that models an archived folder on a remote computer.

class aiida.orm.nodes.data.remote.stash.base.RemoteStashData(stash_mode: StashMode, **kwargs)[source]#

Bases: Data

Data plugin that models an archived folder on a remote computer.

A stashed folder is essentially an instance of RemoteData that has been archived. Archiving in this context can simply mean copying the content of the folder to another location on the same or another filesystem as long as it is on the same machine. In addition, the folder may have been compressed into a single file for efficiency or even written to tape. The stash_mode attribute will distinguish how the folder was stashed which will allow the implementation to also unstash it and transform it back into a RemoteData such that it can be used as an input for new CalcJobs.

This class is a non-storable base class that merely registers the stash_mode attribute. Only its subclasses, that actually implement a certain stash mode, can be instantiated and therefore stored. The reason for this design is that because the behavior of the class can change significantly based on the mode employed to stash the files and implementing all these variants in the same class will lead to an unintuitive interface where certain properties or methods of the class will only be available or function properly based on the stash_mode.

__abstractmethods__ = frozenset({})#
__init__(stash_mode: StashMode, **kwargs)[source]#

Construct a new instance

Parameters:

stash_mode – the stashing mode with which the data was stashed on the remote.

__module__ = 'aiida.orm.nodes.data.remote.stash.base'#
__parameters__ = ()#
__plugin_type_string: ClassVar[str]#
__qb_fields__: Sequence[QbField] = [QbStrField('stash_mode', dtype=str, is_attribute=True)]#
__query_type_string: ClassVar[str]#
_abc_impl = <_abc._abc_data object>#
_logger: Logger | None = <Logger aiida.orm.nodes.data.remote.stash.base.RemoteStashData (WARNING)>#
_storable = False#
fields: QbFields = {'attributes': 'QbDictField(attributes.*) -> Dict[str, Any]',  'ctime': 'QbNumericField(ctime) -> datetime',  'description': 'QbStrField(description) -> str',  'extras': 'QbDictField(extras.*) -> Dict[str, Any]',  'label': 'QbStrField(label) -> str',  'mtime': 'QbNumericField(mtime) -> datetime',  'node_type': 'QbStrField(node_type) -> str',  'pk': 'QbNumericField(pk) -> int',  'repository_metadata': 'QbDictField(repository_metadata) -> Dict[str, Any]',  'source': 'QbDictField(attributes.source.*) -> Optional[dict]',  'stash_mode': 'QbStrField(attributes.stash_mode) -> str',  'user_pk': 'QbNumericField(user_pk) -> int',  'uuid': 'QbStrField(uuid) -> str'}#
property stash_mode: StashMode#

Return the mode with which the data was stashed on the remote.

Returns:

the stash mode.

Data plugin that models a stashed folder on a remote computer.

class aiida.orm.nodes.data.remote.stash.folder.RemoteStashFolderData(stash_mode: StashMode, target_basepath: str, source_list: List, **kwargs)[source]#

Bases: RemoteStashData

Data plugin that models a folder with files of a completed calculation job that has been stashed through a copy.

This data plugin can and should be used to stash files if and only if the stash mode is StashMode.COPY.

__abstractmethods__ = frozenset({})#
__init__(stash_mode: StashMode, target_basepath: str, source_list: List, **kwargs)[source]#

Construct a new instance

Parameters:
  • stash_mode – the stashing mode with which the data was stashed on the remote.

  • target_basepath – the target basepath.

  • source_list – the list of source files.

__module__ = 'aiida.orm.nodes.data.remote.stash.folder'#
__parameters__ = ()#
__plugin_type_string: ClassVar[str]#
__qb_fields__: Sequence[QbField] = [QbStrField('target_basepath', dtype=str, is_attribute=True), QbArrayField('source_list', dtype=List[str], is_attribute=True)]#
__query_type_string: ClassVar[str]#
_abc_impl = <_abc._abc_data object>#
_logger: Logger | None = <Logger aiida.orm.nodes.data.remote.stash.folder.RemoteStashFolderData (WARNING)>#
_storable = True#
fields: QbFields = {'attributes': 'QbDictField(attributes.*) -> Dict[str, Any]',  'ctime': 'QbNumericField(ctime) -> datetime',  'description': 'QbStrField(description) -> str',  'extras': 'QbDictField(extras.*) -> Dict[str, Any]',  'label': 'QbStrField(label) -> str',  'mtime': 'QbNumericField(mtime) -> datetime',  'node_type': 'QbStrField(node_type) -> str',  'pk': 'QbNumericField(pk) -> int',  'repository_metadata': 'QbDictField(repository_metadata) -> Dict[str, Any]',  'source': 'QbDictField(attributes.source.*) -> Optional[dict]',  'source_list': 'QbArrayField(attributes.source_list) -> List[str]',  'stash_mode': 'QbStrField(attributes.stash_mode) -> str',  'target_basepath': 'QbStrField(attributes.target_basepath) -> str',  'user_pk': 'QbNumericField(user_pk) -> int',  'uuid': 'QbStrField(uuid) -> str'}#
property source_list: List | Tuple#

Return the list of source files that were stashed.

Returns:

the list of source files.

property target_basepath: str#

Return the target basepath.

Returns:

the target basepath.