aiida.orm.nodes.data.code package#
Data plugins that represent an executable code.
Submodules#
Abstract data plugin representing an executable code.
- class aiida.orm.nodes.data.code.abstract.AbstractCode(default_calc_job_plugin: str | None = None, append_text: str = '', prepend_text: str = '', use_double_quotes: bool = False, with_mpi: bool | None = None, is_hidden: bool = False, wrap_cmdline_params: bool = False, **kwargs)[source]#
Bases:
DataAbstract data plugin representing an executable code.
- class Model(*, pk: int | None = None, uuid: str | None = None, node_type: str | None = None, process_type: str | None = None, repository_metadata: Dict[str, Any] | None = None, ctime: datetime | None = None, mtime: datetime | None = None, label: str | None = None, description: str | None = None, attributes: Dict[str, Any] | None = None, extras: Dict[str, Any] | None = None, computer: int | None = None, user: int | None = None, repository_content: dict[str, bytes] | None = None, source: dict | None = None)[source]#
Bases:
ModelModel describing required information to create an instance.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'append_text': 'str', 'attributes': 'Optional[Dict[str, Any]]', 'computer': 'Optional[int]', 'ctime': 'Optional[datetime.datetime]', 'default_calc_job_plugin': 't.Optional[str]', 'description': 'str', 'extras': 'Optional[Dict[str, Any]]', 'label': 'str', 'model_config': 'ClassVar[ConfigDict]', 'mtime': 'Optional[datetime.datetime]', 'node_type': 'Optional[str]', 'pk': 'Optional[int]', 'prepend_text': 'str', 'process_type': 'Optional[str]', 'repository_content': 'Optional[dict[str, bytes]]', 'repository_metadata': 'Optional[Dict[str, Any]]', 'source': 'Optional[dict]', 'use_double_quotes': 'bool', 'user': 'Optional[int]', 'uuid': 'Optional[str]', 'with_mpi': 't.Optional[bool]'}#
- __dict__#
- __module__ = 'aiida.orm.nodes.data.code.abstract'#
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}#
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True#
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'aiida.orm.nodes.data.code.abstract.AbstractCode.Model'>, 'config': {'title': 'Model'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida.orm.nodes.data.code.abstract.AbstractCode.Model'>>]}, 'ref': 'aiida.orm.nodes.data.code.abstract.AbstractCode.Model:107403281621104', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'append_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be appended to the run line in all submit scripts for this code.', 'title': 'Append script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'attributes': {'metadata': {'pydantic_js_updates': {'description': 'The node attributes'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'computer': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the computer'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'The creation time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'default_calc_job_plugin': {'metadata': {'pydantic_js_updates': {'description': 'Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', 'title': 'Default `CalcJob` plugin'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {'pydantic_js_updates': {'description': 'Human-readable description, ideally including version and compilation environment.', 'title': 'Description'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'The node extras'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'A unique label to identify the code by.', 'title': 'Label'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'The modification time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'pk': {'metadata': {'pydantic_js_updates': {'description': 'The primary key of the entity. Can be `None` if the entity is not yet stored.'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'prepend_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be prepended to the run line in all submit scripts for this code.', 'title': 'Prepend script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'process_type': {'metadata': {'pydantic_js_updates': {'description': 'The process type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_content': {'metadata': {'pydantic_js_updates': {'description': 'Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'bytes'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_metadata': {'metadata': {'pydantic_js_updates': {'description': 'Virtual hierarchy of the file repository.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'source': {'metadata': {'pydantic_js_updates': {'description': 'Source of the data.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'any'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'use_double_quotes': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', 'title': 'Escape using double quotes'}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'user': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the user who owns the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'with_mpi': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', 'title': 'Run with MPI'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'bool'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Model', 'type': 'model-fields'}, 'type': 'model'}#
The core schema of the model.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_extra__: dict[str, Any] | None#
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'append_text': FieldInfo(annotation=str, required=False, default='', title='Append script', description='Bash commands that should be appended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'attributes': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node attributes', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'computer': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the computer', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.computers.Computer'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'ctime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The creation time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'default_calc_job_plugin': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Default `CalcJob` plugin', description='Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', metadata=[{'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'description': FieldInfo(annotation=str, required=False, default='', title='Description', description='Human-readable description, ideally including version and compilation environment.', metadata=[{'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'extras': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node extras', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'label': FieldInfo(annotation=str, required=True, title='Label', description='A unique label to identify the code by.', metadata=[{'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'mtime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The modification time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'node_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'pk': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The primary key of the entity. Can be `None` if the entity is not yet stored.', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'prepend_text': FieldInfo(annotation=str, required=False, default='', title='Prepend script', description='Bash commands that should be prepended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'process_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The process type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_content': FieldInfo(annotation=Union[dict[str, bytes], NoneType], required=False, default=None, description='Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_metadata': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='Virtual hierarchy of the file repository.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'source': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='Source of the data.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}]), 'use_double_quotes': FieldInfo(annotation=bool, required=False, default=False, title='Escape using double quotes', description='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'user': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the user who owns the node', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'uuid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The UUID of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'with_mpi': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Run with MPI', description='Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}])}#
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}#
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = {'_KEY_ATTRIBUTE_APPEND_TEXT': 'append_text', '_KEY_ATTRIBUTE_DEFAULT_CALC_JOB_PLUGIN': 'input_plugin', '_KEY_ATTRIBUTE_PREPEND_TEXT': 'prepend_text', '_KEY_ATTRIBUTE_USE_DOUBLE_QUOTES': 'use_double_quotes', '_KEY_ATTRIBUTE_WITH_MPI': 'with_mpi', '_KEY_ATTRIBUTE_WRAP_CMDLINE_PARAMS': 'wrap_cmdline_params', '_KEY_EXTRA_IS_HIDDEN': 'hidden', '__annotations__': {'_KEY_ATTRIBUTE_APPEND_TEXT': 'str', '_KEY_ATTRIBUTE_DEFAULT_CALC_JOB_PLUGIN': 'str', '_KEY_ATTRIBUTE_PREPEND_TEXT': 'str', '_KEY_ATTRIBUTE_USE_DOUBLE_QUOTES': 'str', '_KEY_ATTRIBUTE_WITH_MPI': 'str', '_KEY_ATTRIBUTE_WRAP_CMDLINE_PARAMS': 'str', '_KEY_EXTRA_IS_HIDDEN': 'str'}, '__doc__': 'Abstract data plugin representing an executable code.', '__module__': 'aiida.orm.nodes.data.code.abstract', '__qualname__': 'AbstractCode'}#
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None#
The name of the post-init method for the model, if defined.
- __pydantic_private__: dict[str, Any] | None#
Values of private attributes set on the model instance.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000061aec672e070, ), serializer: Fields( GeneralFieldsSerializer { fields: { "prepend_text": SerField { key_py: Py( 0x000078d96bd5f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "source": SerField { key_py: Py( 0x000078d96e81efa0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Any( AnySerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[any, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "extras": SerField { key_py: Py( 0x000078d96dc59eb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_content": SerField { key_py: Py( 0x000078d964c03e10, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Bytes( BytesSerializer { bytes_mode: Utf8, }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, bytes]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "append_text": SerField { key_py: Py( 0x000078d96bd5f4f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "mtime": SerField { key_py: Py( 0x000078d96e836600, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "attributes": SerField { key_py: Py( 0x000078d96da2f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "pk": SerField { key_py: Py( 0x000078d96d544cf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "process_type": SerField { key_py: Py( 0x000078d96bdb2130, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_metadata": SerField { key_py: Py( 0x000078d96ad552f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "ctime": SerField { key_py: Py( 0x000078d96df55a70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "description": SerField { key_py: Py( 0x000078d96dc44a30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "user": SerField { key_py: Py( 0x000078d96df46e30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "label": SerField { key_py: Py( 0x000078d96dd070b0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "node_type": SerField { key_py: Py( 0x000078d96be53730, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "default_calc_job_plugin": SerField { key_py: Py( 0x000078d96bb58cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "with_mpi": SerField { key_py: Py( 0x000078d964ce0cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Bool( BoolSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "uuid": SerField { key_py: Py( 0x000078d96d566bf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "computer": SerField { key_py: Py( 0x000078d96bccb670, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "use_double_quotes": SerField { key_py: Py( 0x000078d96ad05930, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e755f60, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 20, }, ), has_extra: false, root_model: false, name: "Model", }, ), definitions=[])#
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}#
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="Model", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "pk", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "pk", py_key: Py( 0x000078d935f044b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d544cf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "uuid", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "uuid", py_key: Py( 0x000078d935f045b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d566bf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "node_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "node_type", py_key: Py( 0x000078d935f043f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96be53730, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "process_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "process_type", py_key: Py( 0x000078d935f045f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bdb2130, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_metadata", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_metadata", py_key: Py( 0x000078d9360be6f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad552f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "ctime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "ctime", py_key: Py( 0x000078d935f04a30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df55a70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "mtime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "mtime", py_key: Py( 0x000078d935f04530, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e836600, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "label", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "label", py_key: Py( 0x000078d935f04830, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dd070b0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "description", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "description", py_key: Py( 0x000078d9360fd270, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc44a30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "attributes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "attributes", py_key: Py( 0x000078d9360fd870, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96da2f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "extras", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "extras", py_key: Py( 0x000078d9360fc670, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc59eb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "computer", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "computer", py_key: Py( 0x000078d9360fdcf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bccb670, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "user", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "user", py_key: Py( 0x000078d9360fe070, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df46e30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_content", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_content", py_key: Py( 0x000078d9360be9c0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964c03e10, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Bytes( BytesValidator { strict: false, bytes_mode: ValBytesMode { ser: Utf8, }, }, ), min_length: None, max_length: None, name: "dict[str,bytes]", }, ), name: "nullable[dict[str,bytes]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,bytes]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "source", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "source", py_key: Py( 0x000078d9360fdb30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e81efa0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Any( AnyValidator, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[any,any]", }, ), name: "nullable[dict[any,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[any,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "default_calc_job_plugin", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "default_calc_job_plugin", py_key: Py( 0x000078d9360bdde0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bb58cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "use_double_quotes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "use_double_quotes", py_key: Py( 0x000078d9360befb0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad05930, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e755f60, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "with_mpi", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "with_mpi", py_key: Py( 0x000078d9360fdab0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce0cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Bool( BoolValidator { strict: false, }, ), name: "nullable[bool]", }, ), validate_default: false, copy_default: false, name: "default[nullable[bool]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "prepend_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "prepend_text", py_key: Py( 0x000078d9360fddf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "append_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "append_text", py_key: Py( 0x000078d9360fc970, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, ], model_name: "Model", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000061aec672e070, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x000078d96c0eca00, ), name: "Model", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, pk: Annotated[Optional[int], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, uuid: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, node_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, process_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_metadata: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, ctime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, mtime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, label: typing.Annotated[str, {'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], description: typing.Annotated[str, {'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', attributes: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, extras: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, computer: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.computers.Computer'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, user: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_content: Annotated[Optional[dict[str, bytes]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, source: Annotated[Optional[dict], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}] = None, default_calc_job_plugin: Annotated[Optional[str], {'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, use_double_quotes: typing.Annotated[bool, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = False, with_mpi: Annotated[Optional[bool], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, prepend_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', append_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '') -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>#
- model_config: ClassVar[ConfigDict] = {'defer_build': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- __abstractmethods__ = frozenset({'can_run_on_computer', 'full_label', 'get_executable'})#
- __annotations__ = {'_CLS_COLLECTION': 'Type[CollectionType]', '_KEY_ATTRIBUTE_APPEND_TEXT': 'str', '_KEY_ATTRIBUTE_DEFAULT_CALC_JOB_PLUGIN': 'str', '_KEY_ATTRIBUTE_PREPEND_TEXT': 'str', '_KEY_ATTRIBUTE_USE_DOUBLE_QUOTES': 'str', '_KEY_ATTRIBUTE_WITH_MPI': 'str', '_KEY_ATTRIBUTE_WRAP_CMDLINE_PARAMS': 'str', '_KEY_EXTRA_IS_HIDDEN': 'str', '__plugin_type_string': 'ClassVar[str]', '__query_type_string': 'ClassVar[str]', '_export_format_replacements': 'Dict[str, str]', '_hash_ignored_attributes': 'Tuple[str, ...]', '_logger': 'AiidaLoggerType', '_updatable_attributes': 'Tuple[str, ...]'}#
- __init__(default_calc_job_plugin: str | None = None, append_text: str = '', prepend_text: str = '', use_double_quotes: bool = False, with_mpi: bool | None = None, is_hidden: bool = False, wrap_cmdline_params: bool = False, **kwargs)[source]#
Construct a new instance.
- Parameters:
default_calc_job_plugin – The entry point name of the default
CalcJobplugin to use.append_text – The text that should be appended to the run line in the job script.
prepend_text – The text that should be prepended to the run line in the job script.
use_double_quotes – Whether the command line invocation of this code should be escaped with double quotes.
with_mpi – Whether the command should be run as an MPI program.
wrap_cmdline_params – Whether to wrap the executable and all its command line parameters into quotes to form a single string. This is required to enable support for Docker with the
ContainerizedCode.is_hidden – Whether the code is hidden.
- __module__ = 'aiida.orm.nodes.data.code.abstract'#
- __parameters__ = ()#
- _abc_impl = <_abc._abc_data object>#
- _logger: AiidaLoggerType = <Logger aiida.orm.nodes.data.code.abstract.AbstractCode (WARNING)>#
- property append_text: str#
Return the text that should be appended to the run line in the job script.
- Returns:
The text that should be appended to the run line in the job script.
- abstract can_run_on_computer(computer: Computer) bool[source]#
Return whether the code can run on a given computer.
- Parameters:
computer – The computer.
- Returns:
Trueif the code can run oncomputer,Falseotherwise.
- property default_calc_job_plugin: str | None#
Return the optional default
CalcJobplugin.- Returns:
The entry point name of the default
CalcJobplugin to use.
- fields = {'append_text': "QbStrField(attributes.append_text) -> <class 'str'>", 'attributes': 'QbDictField(attributes.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'computer': 'QbNumericField(computer) -> typing.Optional[int]', 'ctime': 'QbNumericField(ctime) -> typing.Optional[datetime.datetime]', 'default_calc_job_plugin': 'QbStrField(attributes.default_calc_job_plugin) -> ' 'typing.Optional[str]', 'description': "QbStrField(attributes.description) -> <class 'str'>", 'extras': 'QbDictField(extras.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'label': "QbStrField(attributes.label) -> <class 'str'>", 'mtime': 'QbNumericField(mtime) -> typing.Optional[datetime.datetime]', 'node_type': 'QbStrField(node_type) -> typing.Optional[str]', 'pk': 'QbNumericField(pk) -> typing.Optional[int]', 'prepend_text': "QbStrField(attributes.prepend_text) -> <class 'str'>", 'process_type': 'QbStrField(process_type) -> typing.Optional[str]', 'repository_content': 'QbDictField(repository_content) -> ' 'typing.Optional[dict[str, bytes]]', 'repository_metadata': 'QbDictField(repository_metadata) -> ' 'typing.Optional[typing.Dict[str, typing.Any]]', 'source': 'QbDictField(attributes.source.*) -> typing.Optional[dict]', 'use_double_quotes': "QbField(attributes.use_double_quotes) -> <class 'bool'>", 'user': 'QbNumericField(user) -> typing.Optional[int]', 'uuid': 'QbStrField(uuid) -> typing.Optional[str]', 'with_mpi': 'QbField(attributes.with_mpi) -> typing.Optional[bool]'}#
- abstract property full_label: str#
Return the full label of this code.
The full label can be just the label itself but it can be something else. However, it at the very least has to include the label of the code.
- Returns:
The full label of the code.
- get_builder() ProcessBuilder[source]#
Create and return a new
ProcessBuilderfor theCalcJobclass of the plugin configured for this code.The configured calculation plugin class is defined by the
default_calc_job_pluginproperty.Note
it also sets the
builder.codevalue.- Returns:
a
ProcessBuilderinstance with thecodeinput already populated with ourselves- Raises:
aiida.common.EntryPointError – if the specified plugin does not exist.
ValueError – if no default plugin was specified.
- abstract get_executable() PurePath[source]#
Return the executable that the submission script should execute to run the code.
- Returns:
The executable to be called in the submission script.
- get_executable_cmdline_params(cmdline_params: list[str] | None = None) list[source]#
Return the list of executable with its command line parameters.
- Parameters:
cmdline_params – List of command line parameters provided by the
CalcJobplugin.- Returns:
List of the executable followed by its command line parameters.
- get_prepend_cmdline_params(mpi_args: list[str] | None = None, extra_mpirun_params: list[str] | None = None) list[str][source]#
Return List of command line parameters to be prepended to the executable in submission line. These command line parameters are typically parameters related to MPI invocations.
- Parameters:
mpi_args – List of MPI parameters provided by the
Computer.get_mpirun_commandmethod.extra_mpiruns_params – List of MPI parameters provided by the
metadata.options.extra_mpirun_paramsinput of theCalcJob.
- Returns:
List of command line parameters to be prepended to the executable in submission line.
Return whether the code is hidden.
- Returns:
Trueif the code is hidden,Falseotherwise, which is also the default.
- property prepend_text: str#
Return the text that should be prepended to the run line in the job script.
- Returns:
The text that should be prepended to the run line in the job script.
- property use_double_quotes: bool#
Return whether the command line invocation of this code should be escaped with double quotes.
- Returns:
Trueif to escape with double quotes,Falseotherwise.
- validate_working_directory(folder: Folder)[source]#
Validate content of the working directory created by the
CalcJobplugin.This method will be called by
presubmit()when a new calculation job is launched, passing theFolderthat was used by the plugin used for the calculation to create the input files for the working directory. This method can be overridden by implementations of theAbstractCodeclass that need to validate the contents of that folder.- Parameters:
folder – A sandbox folder that the
CalcJobplugin wrote input files to that will be copied to the working directory for the corresponding calculation job instance.- Raises:
PluginInternalError – If the content of the sandbox folder is not valid.
- property with_mpi: bool | None#
Return whether the command should be run as an MPI program.
- Returns:
Trueif the code should be run as an MPI program,Falseif it shouldn’t,Noneif unknown.
- property wrap_cmdline_params: bool#
Return whether all command line parameters should be wrapped with double quotes to form a single argument.
..note:: This is required to support certain containerization technologies, such as Docker.
- Returns:
Trueif command line parameters should be wrapped,Falseotherwise.
Data plugin representing an executable code inside a container.
The containerized code allows specifying a container image and the executable filepath within that container that is to be executed when a calculation job is run with this code.
- class aiida.orm.nodes.data.code.containerized.ContainerizedCode(engine_command: str, image_name: str, **kwargs)[source]#
Bases:
InstalledCodeData plugin representing an executable code in container on a remote computer.
- class Model(*, pk: int | None = None, uuid: str | None = None, node_type: str | None = None, process_type: str | None = None, repository_metadata: Dict[str, Any] | None = None, ctime: datetime | None = None, mtime: datetime | None = None, label: str, description: str = '', attributes: Dict[str, Any] | None = None, extras: Dict[str, Any] | None = None, computer: int | None = None, user: int | None = None, repository_content: dict[str, bytes] | None = None, source: dict | None = None, default_calc_job_plugin: str | None = None, use_double_quotes: bool = False, with_mpi: bool | None = None, prepend_text: str = '', append_text: str = '')[source]#
Bases:
ModelModel describing required information to create an instance.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'append_text': 'str', 'attributes': 'Optional[Dict[str, Any]]', 'computer': 'str', 'ctime': 'Optional[datetime.datetime]', 'default_calc_job_plugin': 't.Optional[str]', 'description': 'str', 'engine_command': 'str', 'extras': 'Optional[Dict[str, Any]]', 'filepath_executable': 'str', 'image_name': 'str', 'label': 'str', 'model_config': 'ClassVar[ConfigDict]', 'mtime': 'Optional[datetime.datetime]', 'node_type': 'Optional[str]', 'pk': 'Optional[int]', 'prepend_text': 'str', 'process_type': 'Optional[str]', 'repository_content': 'Optional[dict[str, bytes]]', 'repository_metadata': 'Optional[Dict[str, Any]]', 'source': 'Optional[dict]', 'use_double_quotes': 'bool', 'user': 'Optional[int]', 'uuid': 'Optional[str]', 'with_mpi': 't.Optional[bool]', 'wrap_cmdline_params': 'bool'}#
- __dict__#
- __module__ = 'aiida.orm.nodes.data.code.containerized'#
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}#
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True#
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model'>, 'config': {'title': 'Model'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model'>>]}, 'ref': 'aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model:107403281677584', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'append_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be appended to the run line in all submit scripts for this code.', 'title': 'Append script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'attributes': {'metadata': {'pydantic_js_updates': {'description': 'The node attributes'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'computer': {'metadata': {'pydantic_js_updates': {'description': 'The remote computer on which the executable resides.', 'title': 'Computer'}}, 'schema': {'function': {'function': <bound method InstalledCode.Model.validate_computer of <class 'aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model'>>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'serialization': {'function': <function InstalledCode.Model.serialize_computer>, 'info_arg': True, 'is_field_serializer': True, 'type': 'function-plain'}, 'type': 'function-after'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'The creation time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'default_calc_job_plugin': {'metadata': {'pydantic_js_updates': {'description': 'Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', 'title': 'Default `CalcJob` plugin'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {'pydantic_js_updates': {'description': 'Human-readable description, ideally including version and compilation environment.', 'title': 'Description'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'engine_command': {'metadata': {'pydantic_js_updates': {'description': 'The command to run the container. It must contain the placeholder {image_name} that will be replaced with the `image_name`.', 'title': 'Engine command'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'The node extras'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'filepath_executable': {'metadata': {'pydantic_js_updates': {'description': 'Filepath of the executable on the remote computer.', 'title': 'Filepath executable'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'image_name': {'metadata': {'pydantic_js_updates': {'description': 'Name of the image container in which to the run the executable.', 'title': 'Image name'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'A unique label to identify the code by.', 'title': 'Label'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'The modification time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'pk': {'metadata': {'pydantic_js_updates': {'description': 'The primary key of the entity. Can be `None` if the entity is not yet stored.'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'prepend_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be prepended to the run line in all submit scripts for this code.', 'title': 'Prepend script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'process_type': {'metadata': {'pydantic_js_updates': {'description': 'The process type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_content': {'metadata': {'pydantic_js_updates': {'description': 'Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'bytes'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_metadata': {'metadata': {'pydantic_js_updates': {'description': 'Virtual hierarchy of the file repository.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'source': {'metadata': {'pydantic_js_updates': {'description': 'Source of the data.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'any'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'use_double_quotes': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', 'title': 'Escape using double quotes'}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'user': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the user who owns the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'with_mpi': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', 'title': 'Run with MPI'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'bool'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'wrap_cmdline_params': {'metadata': {'pydantic_js_updates': {'description': 'Whether all command line parameters to be passed to the engine command should be wrapped in a double quotes to form a single argument. This should be set to `True` for Docker.', 'title': 'Wrap command line parameters'}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Model', 'type': 'model-fields'}, 'type': 'model'}#
The core schema of the model.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={'validate_computer': Decorator(cls_ref='aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model:107403281677584', cls_var_name='validate_computer', func=<bound method InstalledCode.Model.validate_computer of <class 'aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('computer',), mode='after', check_fields=None, json_schema_input_type=PydanticUndefined))}, root_validators={}, field_serializers={'serialize_computer': Decorator(cls_ref='aiida.orm.nodes.data.code.containerized.ContainerizedCode.Model:107403281677584', cls_var_name='serialize_computer', func=<function InstalledCode.Model.serialize_computer>, shim=None, info=FieldSerializerDecoratorInfo(fields=('computer',), mode='plain', return_type=PydanticUndefined, when_used='always', check_fields=None))}, model_serializers={}, model_validators={}, computed_fields={})#
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_extra__: dict[str, Any] | None#
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'append_text': FieldInfo(annotation=str, required=False, default='', title='Append script', description='Bash commands that should be appended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'attributes': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node attributes', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'computer': FieldInfo(annotation=str, required=True, title='Computer', description='The remote computer on which the executable resides.', metadata=[{'priority': 2}, {'short_name': '-Y'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'ctime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The creation time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'default_calc_job_plugin': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Default `CalcJob` plugin', description='Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', metadata=[{'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'description': FieldInfo(annotation=str, required=False, default='', title='Description', description='Human-readable description, ideally including version and compilation environment.', metadata=[{'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'engine_command': FieldInfo(annotation=str, required=True, title='Engine command', description='The command to run the container. It must contain the placeholder {image_name} that will be replaced with the `image_name`.', metadata=[{'priority': 3}, {'short_name': '-E'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'extras': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node extras', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'filepath_executable': FieldInfo(annotation=str, required=True, title='Filepath executable', description='Filepath of the executable on the remote computer.', metadata=[{'priority': 1}, {'short_name': '-X'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'image_name': FieldInfo(annotation=str, required=True, title='Image name', description='Name of the image container in which to the run the executable.', metadata=[{'priority': 2}, {'short_name': '-I'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'label': FieldInfo(annotation=str, required=True, title='Label', description='A unique label to identify the code by.', metadata=[{'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'mtime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The modification time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'node_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'pk': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The primary key of the entity. Can be `None` if the entity is not yet stored.', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'prepend_text': FieldInfo(annotation=str, required=False, default='', title='Prepend script', description='Bash commands that should be prepended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'process_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The process type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_content': FieldInfo(annotation=Union[dict[str, bytes], NoneType], required=False, default=None, description='Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_metadata': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='Virtual hierarchy of the file repository.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'source': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='Source of the data.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}]), 'use_double_quotes': FieldInfo(annotation=bool, required=False, default=False, title='Escape using double quotes', description='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'user': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the user who owns the node', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'uuid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The UUID of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'with_mpi': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Run with MPI', description='Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'wrap_cmdline_params': FieldInfo(annotation=bool, required=False, default=False, title='Wrap command line parameters', description='Whether all command line parameters to be passed to the engine command should be wrapped in a double quotes to form a single argument. This should be set to `True` for Docker.', metadata=[{'priority': 1}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}])}#
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}#
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = {'_KEY_ATTRIBUTE_ENGINE_COMMAND': 'engine_command', '_KEY_ATTRIBUTE_IMAGE_NAME': 'image_name', '__annotations__': {'_KEY_ATTRIBUTE_ENGINE_COMMAND': 'str', '_KEY_ATTRIBUTE_IMAGE_NAME': 'str'}, '__doc__': 'Data plugin representing an executable code in container on a remote computer.', '__module__': 'aiida.orm.nodes.data.code.containerized', '__qualname__': 'ContainerizedCode'}#
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None#
The name of the post-init method for the model, if defined.
- __pydantic_private__: dict[str, Any] | None#
Values of private attributes set on the model instance.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000061aec673bd10, ), serializer: Fields( GeneralFieldsSerializer { fields: { "engine_command": SerField { key_py: Py( 0x000078d964ce37f0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "uuid": SerField { key_py: Py( 0x000078d96d566bf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_metadata": SerField { key_py: Py( 0x000078d96ad552f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "mtime": SerField { key_py: Py( 0x000078d96e836600, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "description": SerField { key_py: Py( 0x000078d96dc44a30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "computer": SerField { key_py: Py( 0x000078d96bccb670, ), alias: None, alias_py: None, serializer: Some( Function( FunctionPlainSerializer { func: Py( 0x000078d964dfbc40, ), name: "plain_function[serialize_computer]", function_name: "serialize_computer", return_serializer: Any( AnySerializer, ), fallback_serializer: None, when_used: Always, is_field_serializer: true, info_arg: true, }, ), ), required: true, serialize_by_alias: None, }, "extras": SerField { key_py: Py( 0x000078d96dc59eb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_content": SerField { key_py: Py( 0x000078d964c03e10, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Bytes( BytesSerializer { bytes_mode: Utf8, }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, bytes]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "default_calc_job_plugin": SerField { key_py: Py( 0x000078d96bb58cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "use_double_quotes": SerField { key_py: Py( 0x000078d96ad05930, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e755f60, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "prepend_text": SerField { key_py: Py( 0x000078d96bd5f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "filepath_executable": SerField { key_py: Py( 0x000078d964ca7690, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "process_type": SerField { key_py: Py( 0x000078d96bdb2130, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "user": SerField { key_py: Py( 0x000078d96df46e30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "image_name": SerField { key_py: Py( 0x000078d964ce3670, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "attributes": SerField { key_py: Py( 0x000078d96da2f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "source": SerField { key_py: Py( 0x000078d96e81efa0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Any( AnySerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[any, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "with_mpi": SerField { key_py: Py( 0x000078d964ce0cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Bool( BoolSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "wrap_cmdline_params": SerField { key_py: Py( 0x000078d964ca5ac0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e755f60, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "pk": SerField { key_py: Py( 0x000078d96d544cf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "ctime": SerField { key_py: Py( 0x000078d96df55a70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "label": SerField { key_py: Py( 0x000078d96dd070b0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "node_type": SerField { key_py: Py( 0x000078d96be53730, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "append_text": SerField { key_py: Py( 0x000078d96bd5f4f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 24, }, ), has_extra: false, root_model: false, name: "Model", }, ), definitions=[])#
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}#
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="Model", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "pk", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "pk", py_key: Py( 0x000078d936092cf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d544cf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "uuid", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "uuid", py_key: Py( 0x000078d936480130, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d566bf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "node_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "node_type", py_key: Py( 0x000078d9378c93b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96be53730, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "process_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "process_type", py_key: Py( 0x000078d9378c9430, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bdb2130, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_metadata", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_metadata", py_key: Py( 0x000078d937a00300, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad552f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "ctime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "ctime", py_key: Py( 0x000078d9378145b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df55a70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "mtime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "mtime", py_key: Py( 0x000078d937814970, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e836600, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "label", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "label", py_key: Py( 0x000078d937815470, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dd070b0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "description", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "description", py_key: Py( 0x000078d937814930, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc44a30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "attributes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "attributes", py_key: Py( 0x000078d9378156f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96da2f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "extras", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "extras", py_key: Py( 0x000078d9378dbe70, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc59eb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "computer", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "computer", py_key: Py( 0x000078d9378d81b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bccb670, ), validator: FunctionAfter( FunctionAfterValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), func: Py( 0x000078d964df1540, ), config: Py( 0x000078d937814380, ), name: "function-after[validate_computer(), str]", field_name: None, info_arg: false, }, ), frozen: false, }, Field { name: "user", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "user", py_key: Py( 0x000078d9378dbe30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df46e30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_content", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_content", py_key: Py( 0x000078d93638ff00, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964c03e10, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Bytes( BytesValidator { strict: false, bytes_mode: ValBytesMode { ser: Utf8, }, }, ), min_length: None, max_length: None, name: "dict[str,bytes]", }, ), name: "nullable[dict[str,bytes]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,bytes]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "source", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "source", py_key: Py( 0x000078d9378db8b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e81efa0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Any( AnyValidator, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[any,any]", }, ), name: "nullable[dict[any,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[any,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "default_calc_job_plugin", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "default_calc_job_plugin", py_key: Py( 0x000078d93604d930, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bb58cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "use_double_quotes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "use_double_quotes", py_key: Py( 0x000078d93604eba0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad05930, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e755f60, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "with_mpi", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "with_mpi", py_key: Py( 0x000078d9378daeb0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce0cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Bool( BoolValidator { strict: false, }, ), name: "nullable[bool]", }, ), validate_default: false, copy_default: false, name: "default[nullable[bool]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "prepend_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "prepend_text", py_key: Py( 0x000078d9378db8f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "append_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "append_text", py_key: Py( 0x000078d9378da4b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "filepath_executable", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "filepath_executable", py_key: Py( 0x000078d93604d610, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ca7690, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "engine_command", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "engine_command", py_key: Py( 0x000078d9378dadf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce37f0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "image_name", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "image_name", py_key: Py( 0x000078d9378db430, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce3670, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "wrap_cmdline_params", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "wrap_cmdline_params", py_key: Py( 0x000078d9381143f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ca5ac0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e755f60, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, ], model_name: "Model", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000061aec673bd10, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x000078d96c0eca00, ), name: "Model", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, pk: Annotated[Optional[int], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, uuid: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, node_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, process_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_metadata: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, ctime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, mtime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, label: typing.Annotated[str, {'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], description: typing.Annotated[str, {'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', attributes: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, extras: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, computer: typing.Annotated[str, {'priority': 2}, {'short_name': '-Y'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], user: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_content: Annotated[Optional[dict[str, bytes]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, source: Annotated[Optional[dict], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}] = None, default_calc_job_plugin: Annotated[Optional[str], {'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, use_double_quotes: typing.Annotated[bool, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = False, with_mpi: Annotated[Optional[bool], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, prepend_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', append_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', filepath_executable: typing.Annotated[str, {'priority': 1}, {'short_name': '-X'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], engine_command: typing.Annotated[str, {'priority': 3}, {'short_name': '-E'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], image_name: typing.Annotated[str, {'priority': 2}, {'short_name': '-I'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], wrap_cmdline_params: typing.Annotated[bool, {'priority': 1}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = False) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>#
- model_config: ClassVar[ConfigDict] = {'defer_build': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'_CLS_COLLECTION': 'Type[CollectionType]', '_EMIT_CODE_DEPRECATION_WARNING': 'bool', '_KEY_ATTRIBUTE_APPEND_TEXT': 'str', '_KEY_ATTRIBUTE_DEFAULT_CALC_JOB_PLUGIN': 'str', '_KEY_ATTRIBUTE_ENGINE_COMMAND': 'str', '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'str', '_KEY_ATTRIBUTE_IMAGE_NAME': 'str', '_KEY_ATTRIBUTE_PREPEND_TEXT': 'str', '_KEY_ATTRIBUTE_USE_DOUBLE_QUOTES': 'str', '_KEY_ATTRIBUTE_WITH_MPI': 'str', '_KEY_ATTRIBUTE_WRAP_CMDLINE_PARAMS': 'str', '_KEY_EXTRA_IS_HIDDEN': 'str', '_SKIP_MODEL_INHERITANCE_CHECK': 'bool', '__plugin_type_string': 'ClassVar[str]', '__query_type_string': 'ClassVar[str]', '_export_format_replacements': 'Dict[str, str]', '_hash_ignored_attributes': 'Tuple[str, ...]', '_logger': 'AiidaLoggerType', '_updatable_attributes': 'Tuple[str, ...]'}#
- __init__(engine_command: str, image_name: str, **kwargs)[source]#
Construct a new instance.
- Parameters:
computer – The remote computer on which the executable is located.
filepath_executable – The absolute filepath of the executable on the remote computer.
- __module__ = 'aiida.orm.nodes.data.code.containerized'#
- __parameters__ = ()#
- _abc_impl = <_abc._abc_data object>#
- _logger: AiidaLoggerType = <Logger aiida.orm.nodes.data.code.containerized.ContainerizedCode (WARNING)>#
- property engine_command: str#
Return the engine command with image as template field of the containerized code.
- Returns:
The engine command of the containerized code
- fields = {'append_text': "QbStrField(attributes.append_text) -> <class 'str'>", 'attributes': 'QbDictField(attributes.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'computer': "QbStrField(attributes.computer) -> <class 'str'>", 'ctime': 'QbNumericField(ctime) -> typing.Optional[datetime.datetime]', 'default_calc_job_plugin': 'QbStrField(attributes.default_calc_job_plugin) -> ' 'typing.Optional[str]', 'description': "QbStrField(attributes.description) -> <class 'str'>", 'engine_command': "QbStrField(attributes.engine_command) -> <class 'str'>", 'extras': 'QbDictField(extras.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'filepath_executable': 'QbStrField(attributes.filepath_executable) -> <class ' "'str'>", 'image_name': "QbStrField(attributes.image_name) -> <class 'str'>", 'label': "QbStrField(attributes.label) -> <class 'str'>", 'mtime': 'QbNumericField(mtime) -> typing.Optional[datetime.datetime]', 'node_type': 'QbStrField(node_type) -> typing.Optional[str]', 'pk': 'QbNumericField(pk) -> typing.Optional[int]', 'prepend_text': "QbStrField(attributes.prepend_text) -> <class 'str'>", 'process_type': 'QbStrField(process_type) -> typing.Optional[str]', 'repository_content': 'QbDictField(repository_content) -> ' 'typing.Optional[dict[str, bytes]]', 'repository_metadata': 'QbDictField(repository_metadata) -> ' 'typing.Optional[typing.Dict[str, typing.Any]]', 'source': 'QbDictField(attributes.source.*) -> typing.Optional[dict]', 'use_double_quotes': "QbField(attributes.use_double_quotes) -> <class 'bool'>", 'user': 'QbNumericField(user) -> typing.Optional[int]', 'uuid': 'QbStrField(uuid) -> typing.Optional[str]', 'with_mpi': 'QbField(attributes.with_mpi) -> typing.Optional[bool]', 'wrap_cmdline_params': 'QbField(attributes.wrap_cmdline_params) -> <class ' "'bool'>"}#
- property filepath_executable: PurePath#
Return the filepath of the executable that this code represents.
Note
This is overridden from the base class since the path does not have to be absolute.
- Returns:
The filepath of the executable.
Data plugin representing an executable code on a remote computer.
This plugin should be used if an executable is pre-installed on a computer. The InstalledCode represents the code by
storing the absolute filepath of the relevant executable and the computer on which it is installed. The computer is
represented by an instance of aiida.orm.computers.Computer. Each time a aiida.engine.CalcJob is run
using an InstalledCode, it will run its executable on the associated computer.
- class aiida.orm.nodes.data.code.installed.InstalledCode(computer: Computer, filepath_executable: str, **kwargs)[source]#
Bases:
CodeData plugin representing an executable code on a remote computer.
- class Model(*, pk: int | None = None, uuid: str | None = None, node_type: str | None = None, process_type: str | None = None, repository_metadata: Dict[str, Any] | None = None, ctime: datetime | None = None, mtime: datetime | None = None, label: str, description: str = '', attributes: Dict[str, Any] | None = None, extras: Dict[str, Any] | None = None, computer: int | None = None, user: int | None = None, repository_content: dict[str, bytes] | None = None, source: dict | None = None, default_calc_job_plugin: str | None = None, use_double_quotes: bool = False, with_mpi: bool | None = None, prepend_text: str = '', append_text: str = '')[source]#
Bases:
ModelModel describing required information to create an instance.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'append_text': 'str', 'attributes': 'Optional[Dict[str, Any]]', 'computer': 'str', 'ctime': 'Optional[datetime.datetime]', 'default_calc_job_plugin': 't.Optional[str]', 'description': 'str', 'extras': 'Optional[Dict[str, Any]]', 'filepath_executable': 'str', 'label': 'str', 'model_config': 'ClassVar[ConfigDict]', 'mtime': 'Optional[datetime.datetime]', 'node_type': 'Optional[str]', 'pk': 'Optional[int]', 'prepend_text': 'str', 'process_type': 'Optional[str]', 'repository_content': 'Optional[dict[str, bytes]]', 'repository_metadata': 'Optional[Dict[str, Any]]', 'source': 'Optional[dict]', 'use_double_quotes': 'bool', 'user': 'Optional[int]', 'uuid': 'Optional[str]', 'with_mpi': 't.Optional[bool]'}#
- __dict__#
- __module__ = 'aiida.orm.nodes.data.code.installed'#
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}#
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True#
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'aiida.orm.nodes.data.code.installed.InstalledCode.Model'>, 'config': {'title': 'Model'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida.orm.nodes.data.code.installed.InstalledCode.Model'>>]}, 'ref': 'aiida.orm.nodes.data.code.installed.InstalledCode.Model:107403278751504', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'append_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be appended to the run line in all submit scripts for this code.', 'title': 'Append script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'attributes': {'metadata': {'pydantic_js_updates': {'description': 'The node attributes'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'computer': {'metadata': {'pydantic_js_updates': {'description': 'The remote computer on which the executable resides.', 'title': 'Computer'}}, 'schema': {'function': {'function': <bound method InstalledCode.Model.validate_computer of <class 'aiida.orm.nodes.data.code.installed.InstalledCode.Model'>>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'serialization': {'function': <function InstalledCode.Model.serialize_computer>, 'info_arg': True, 'is_field_serializer': True, 'type': 'function-plain'}, 'type': 'function-after'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'The creation time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'default_calc_job_plugin': {'metadata': {'pydantic_js_updates': {'description': 'Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', 'title': 'Default `CalcJob` plugin'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {'pydantic_js_updates': {'description': 'Human-readable description, ideally including version and compilation environment.', 'title': 'Description'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'The node extras'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'filepath_executable': {'metadata': {'pydantic_js_updates': {'description': 'Filepath of the executable on the remote computer.', 'title': 'Filepath executable'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'A unique label to identify the code by.', 'title': 'Label'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'The modification time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'pk': {'metadata': {'pydantic_js_updates': {'description': 'The primary key of the entity. Can be `None` if the entity is not yet stored.'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'prepend_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be prepended to the run line in all submit scripts for this code.', 'title': 'Prepend script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'process_type': {'metadata': {'pydantic_js_updates': {'description': 'The process type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_content': {'metadata': {'pydantic_js_updates': {'description': 'Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'bytes'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_metadata': {'metadata': {'pydantic_js_updates': {'description': 'Virtual hierarchy of the file repository.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'source': {'metadata': {'pydantic_js_updates': {'description': 'Source of the data.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'any'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'use_double_quotes': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', 'title': 'Escape using double quotes'}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'user': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the user who owns the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'with_mpi': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', 'title': 'Run with MPI'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'bool'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Model', 'type': 'model-fields'}, 'type': 'model'}#
The core schema of the model.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={'validate_computer': Decorator(cls_ref='aiida.orm.nodes.data.code.installed.InstalledCode.Model:107403278751504', cls_var_name='validate_computer', func=<bound method InstalledCode.Model.validate_computer of <class 'aiida.orm.nodes.data.code.installed.InstalledCode.Model'>>, shim=None, info=FieldValidatorDecoratorInfo(fields=('computer',), mode='after', check_fields=None, json_schema_input_type=PydanticUndefined))}, root_validators={}, field_serializers={'serialize_computer': Decorator(cls_ref='aiida.orm.nodes.data.code.installed.InstalledCode.Model:107403278751504', cls_var_name='serialize_computer', func=<function InstalledCode.Model.serialize_computer>, shim=None, info=FieldSerializerDecoratorInfo(fields=('computer',), mode='plain', return_type=PydanticUndefined, when_used='always', check_fields=None))}, model_serializers={}, model_validators={}, computed_fields={})#
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_extra__: dict[str, Any] | None#
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'append_text': FieldInfo(annotation=str, required=False, default='', title='Append script', description='Bash commands that should be appended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'attributes': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node attributes', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'computer': FieldInfo(annotation=str, required=True, title='Computer', description='The remote computer on which the executable resides.', metadata=[{'priority': 2}, {'short_name': '-Y'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'ctime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The creation time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'default_calc_job_plugin': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Default `CalcJob` plugin', description='Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', metadata=[{'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'description': FieldInfo(annotation=str, required=False, default='', title='Description', description='Human-readable description, ideally including version and compilation environment.', metadata=[{'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'extras': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node extras', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'filepath_executable': FieldInfo(annotation=str, required=True, title='Filepath executable', description='Filepath of the executable on the remote computer.', metadata=[{'priority': 1}, {'short_name': '-X'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'label': FieldInfo(annotation=str, required=True, title='Label', description='A unique label to identify the code by.', metadata=[{'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'mtime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The modification time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'node_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'pk': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The primary key of the entity. Can be `None` if the entity is not yet stored.', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'prepend_text': FieldInfo(annotation=str, required=False, default='', title='Prepend script', description='Bash commands that should be prepended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'process_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The process type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_content': FieldInfo(annotation=Union[dict[str, bytes], NoneType], required=False, default=None, description='Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_metadata': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='Virtual hierarchy of the file repository.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'source': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='Source of the data.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}]), 'use_double_quotes': FieldInfo(annotation=bool, required=False, default=False, title='Escape using double quotes', description='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'user': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the user who owns the node', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'uuid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The UUID of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'with_mpi': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Run with MPI', description='Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}])}#
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}#
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = {'_EMIT_CODE_DEPRECATION_WARNING': False, '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'filepath_executable', '_SKIP_MODEL_INHERITANCE_CHECK': True, '__annotations__': {'_EMIT_CODE_DEPRECATION_WARNING': 'bool', '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'str', '_SKIP_MODEL_INHERITANCE_CHECK': 'bool'}, '__doc__': 'Data plugin representing an executable code on a remote computer.', '__module__': 'aiida.orm.nodes.data.code.installed', '__qualname__': 'InstalledCode'}#
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None#
The name of the post-init method for the model, if defined.
- __pydantic_private__: dict[str, Any] | None#
Values of private attributes set on the model instance.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000061aec6471710, ), serializer: Fields( GeneralFieldsSerializer { fields: { "attributes": SerField { key_py: Py( 0x000078d96da2f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "with_mpi": SerField { key_py: Py( 0x000078d964ce0cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Bool( BoolSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "use_double_quotes": SerField { key_py: Py( 0x000078d96ad05930, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e755f60, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "description": SerField { key_py: Py( 0x000078d96dc44a30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_content": SerField { key_py: Py( 0x000078d964c03e10, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Bytes( BytesSerializer { bytes_mode: Utf8, }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, bytes]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "extras": SerField { key_py: Py( 0x000078d96dc59eb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "node_type": SerField { key_py: Py( 0x000078d96be53730, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "uuid": SerField { key_py: Py( 0x000078d96d566bf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "mtime": SerField { key_py: Py( 0x000078d96e836600, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "process_type": SerField { key_py: Py( 0x000078d96bdb2130, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "default_calc_job_plugin": SerField { key_py: Py( 0x000078d96bb58cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "computer": SerField { key_py: Py( 0x000078d96bccb670, ), alias: None, alias_py: None, serializer: Some( Function( FunctionPlainSerializer { func: Py( 0x000078d964dfbc40, ), name: "plain_function[serialize_computer]", function_name: "serialize_computer", return_serializer: Any( AnySerializer, ), fallback_serializer: None, when_used: Always, is_field_serializer: true, info_arg: true, }, ), ), required: true, serialize_by_alias: None, }, "source": SerField { key_py: Py( 0x000078d96e81efa0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Any( AnySerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[any, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "append_text": SerField { key_py: Py( 0x000078d96bd5f4f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_metadata": SerField { key_py: Py( 0x000078d96ad552f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "filepath_executable": SerField { key_py: Py( 0x000078d964ca7690, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "prepend_text": SerField { key_py: Py( 0x000078d96bd5f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "ctime": SerField { key_py: Py( 0x000078d96df55a70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "label": SerField { key_py: Py( 0x000078d96dd070b0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "pk": SerField { key_py: Py( 0x000078d96d544cf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "user": SerField { key_py: Py( 0x000078d96df46e30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 21, }, ), has_extra: false, root_model: false, name: "Model", }, ), definitions=[])#
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}#
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="Model", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "pk", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "pk", py_key: Py( 0x000078d937f36c30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d544cf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "uuid", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "uuid", py_key: Py( 0x000078d937f372f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d566bf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "node_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "node_type", py_key: Py( 0x000078d937f367b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96be53730, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "process_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "process_type", py_key: Py( 0x000078d937f37730, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bdb2130, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_metadata", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_metadata", py_key: Py( 0x000078d935e62920, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad552f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "ctime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "ctime", py_key: Py( 0x000078d937f378b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df55a70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "mtime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "mtime", py_key: Py( 0x000078d937f377b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e836600, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "label", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "label", py_key: Py( 0x000078d937f37af0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dd070b0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "description", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "description", py_key: Py( 0x000078d937f37a70, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc44a30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "attributes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "attributes", py_key: Py( 0x000078d937f37830, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96da2f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "extras", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "extras", py_key: Py( 0x000078d937ee1030, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc59eb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "computer", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "computer", py_key: Py( 0x000078d937ee37f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bccb670, ), validator: FunctionAfter( FunctionAfterValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), func: Py( 0x000078d964d43240, ), config: Py( 0x000078d937f37a00, ), name: "function-after[validate_computer(), str]", field_name: None, info_arg: false, }, ), frozen: false, }, Field { name: "user", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "user", py_key: Py( 0x000078d937d7c2f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df46e30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_content", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_content", py_key: Py( 0x000078d935e61cf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964c03e10, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Bytes( BytesValidator { strict: false, bytes_mode: ValBytesMode { ser: Utf8, }, }, ), min_length: None, max_length: None, name: "dict[str,bytes]", }, ), name: "nullable[dict[str,bytes]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,bytes]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "source", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "source", py_key: Py( 0x000078d937d7d2f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e81efa0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Any( AnyValidator, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[any,any]", }, ), name: "nullable[dict[any,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[any,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "default_calc_job_plugin", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "default_calc_job_plugin", py_key: Py( 0x000078d935e62a60, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bb58cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "use_double_quotes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "use_double_quotes", py_key: Py( 0x000078d935e62bf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad05930, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e755f60, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "with_mpi", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "with_mpi", py_key: Py( 0x000078d937d7e6f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce0cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Bool( BoolValidator { strict: false, }, ), name: "nullable[bool]", }, ), validate_default: false, copy_default: false, name: "default[nullable[bool]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "prepend_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "prepend_text", py_key: Py( 0x000078d937d7caf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "append_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "append_text", py_key: Py( 0x000078d937d7cbb0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "filepath_executable", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "filepath_executable", py_key: Py( 0x000078d935e63050, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ca7690, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "Model", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000061aec6471710, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x000078d96c0eca00, ), name: "Model", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, pk: Annotated[Optional[int], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, uuid: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, node_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, process_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_metadata: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, ctime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, mtime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, label: typing.Annotated[str, {'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], description: typing.Annotated[str, {'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', attributes: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, extras: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, computer: typing.Annotated[str, {'priority': 2}, {'short_name': '-Y'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], user: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_content: Annotated[Optional[dict[str, bytes]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, source: Annotated[Optional[dict], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}] = None, default_calc_job_plugin: Annotated[Optional[str], {'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, use_double_quotes: typing.Annotated[bool, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = False, with_mpi: Annotated[Optional[bool], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, prepend_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', append_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', filepath_executable: typing.Annotated[str, {'priority': 1}, {'short_name': '-X'}, {'orm_to_model': <function InstalledCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>#
- model_config: ClassVar[ConfigDict] = {'defer_build': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'_CLS_COLLECTION': 'Type[CollectionType]', '_EMIT_CODE_DEPRECATION_WARNING': 'bool', '_KEY_ATTRIBUTE_APPEND_TEXT': 'str', '_KEY_ATTRIBUTE_DEFAULT_CALC_JOB_PLUGIN': 'str', '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'str', '_KEY_ATTRIBUTE_PREPEND_TEXT': 'str', '_KEY_ATTRIBUTE_USE_DOUBLE_QUOTES': 'str', '_KEY_ATTRIBUTE_WITH_MPI': 'str', '_KEY_ATTRIBUTE_WRAP_CMDLINE_PARAMS': 'str', '_KEY_EXTRA_IS_HIDDEN': 'str', '_SKIP_MODEL_INHERITANCE_CHECK': 'bool', '__plugin_type_string': 'ClassVar[str]', '__query_type_string': 'ClassVar[str]', '_export_format_replacements': 'Dict[str, str]', '_hash_ignored_attributes': 'Tuple[str, ...]', '_logger': 'AiidaLoggerType', '_updatable_attributes': 'Tuple[str, ...]'}#
- __init__(computer: Computer, filepath_executable: str, **kwargs)[source]#
Construct a new instance.
- Parameters:
computer – The remote computer on which the executable is located.
filepath_executable – The absolute filepath of the executable on the remote computer.
- __module__ = 'aiida.orm.nodes.data.code.installed'#
- __parameters__ = ()#
- _abc_impl = <_abc._abc_data object>#
- _logger: AiidaLoggerType = <Logger aiida.orm.nodes.data.code.installed.InstalledCode (WARNING)>#
- _validate()[source]#
Validate the instance by checking that a computer has been defined.
:raises
aiida.common.exceptions.ValidationError: If the state of the node is invalid.
- can_run_on_computer(computer: Computer) bool[source]#
Return whether the code can run on a given computer.
- Parameters:
computer – The computer.
- Returns:
Trueif the provided computer is the same as the one configured for this code.
- fields = {'append_text': "QbStrField(attributes.append_text) -> <class 'str'>", 'attributes': 'QbDictField(attributes.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'computer': "QbStrField(attributes.computer) -> <class 'str'>", 'ctime': 'QbNumericField(ctime) -> typing.Optional[datetime.datetime]', 'default_calc_job_plugin': 'QbStrField(attributes.default_calc_job_plugin) -> ' 'typing.Optional[str]', 'description': "QbStrField(attributes.description) -> <class 'str'>", 'extras': 'QbDictField(extras.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'filepath_executable': 'QbStrField(attributes.filepath_executable) -> <class ' "'str'>", 'label': "QbStrField(attributes.label) -> <class 'str'>", 'mtime': 'QbNumericField(mtime) -> typing.Optional[datetime.datetime]', 'node_type': 'QbStrField(node_type) -> typing.Optional[str]', 'pk': 'QbNumericField(pk) -> typing.Optional[int]', 'prepend_text': "QbStrField(attributes.prepend_text) -> <class 'str'>", 'process_type': 'QbStrField(process_type) -> typing.Optional[str]', 'repository_content': 'QbDictField(repository_content) -> ' 'typing.Optional[dict[str, bytes]]', 'repository_metadata': 'QbDictField(repository_metadata) -> ' 'typing.Optional[typing.Dict[str, typing.Any]]', 'source': 'QbDictField(attributes.source.*) -> typing.Optional[dict]', 'use_double_quotes': "QbField(attributes.use_double_quotes) -> <class 'bool'>", 'user': 'QbNumericField(user) -> typing.Optional[int]', 'uuid': 'QbStrField(uuid) -> typing.Optional[str]', 'with_mpi': 'QbField(attributes.with_mpi) -> typing.Optional[bool]'}#
- property filepath_executable: PurePath#
Return the absolute filepath of the executable that this code represents.
- Returns:
The absolute filepath of the executable.
- property full_label: str#
Return the full label of this code.
The full label can be just the label itself but it can be something else. However, it at the very least has to include the label of the code.
- Returns:
The full label of the code.
- get_executable() PurePath[source]#
Return the executable that the submission script should execute to run the code.
- Returns:
The executable to be called in the submission script.
- validate_filepath_executable()[source]#
Validate the
filepath_executableattribute.Checks whether the executable exists on the remote computer if a transport can be opened to it. This method is intentionally not called in
_validateas to allow the creation ofCodeinstances whose computers can not yet be connected to and as to not require the overhead of opening transports in storing a new code.Note
If the
filepath_executableis not an absolute path, the check is skipped.- Raises:
ValidationError – if no transport could be opened or if the defined executable does not exist on the remote computer.
Data plugin represeting an executable code to be wrapped and called through a CalcJob plugin.
- class aiida.orm.nodes.data.code.legacy.Code(remote_computer_exec=None, local_executable=None, input_plugin_name=None, files=None, **kwargs)[source]#
Bases:
AbstractCodeA code entity. It can either be ‘local’, or ‘remote’.
Local code: it is a collection of files/dirs (added using the add_path() method), where one file is flagged as executable (using the set_local_executable() method).
Remote code: it is a pair (remotecomputer, remotepath_of_executable) set using the set_remote_computer_exec() method.
For both codes, one can set some code to be executed right before or right after the execution of the code, using the set_preexec_code() and set_postexec_code() methods (e.g., the set_preexec_code() can be used to load specific modules required for the code to be run).
- HIDDEN_KEY = 'hidden'#
- class Model(*, pk: int | None = None, uuid: str | None = None, node_type: str | None = None, process_type: str | None = None, repository_metadata: Dict[str, Any] | None = None, ctime: datetime | None = None, mtime: datetime | None = None, label: str, description: str = '', attributes: Dict[str, Any] | None = None, extras: Dict[str, Any] | None = None, computer: int | None = None, user: int | None = None, repository_content: dict[str, bytes] | None = None, source: dict | None = None, default_calc_job_plugin: str | None = None, use_double_quotes: bool = False, with_mpi: bool | None = None, prepend_text: str = '', append_text: str = '')[source]#
Bases:
Model- __abstractmethods__ = frozenset({})#
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'append_text': <class 'str'>, 'attributes': 'Optional[Dict[str, Any]]', 'computer': 'Optional[int]', 'ctime': 'Optional[datetime.datetime]', 'default_calc_job_plugin': 't.Optional[str]', 'description': 'str', 'extras': 'Optional[Dict[str, Any]]', 'input_plugin': typing.Optional[str], 'is_local': typing.Optional[bool], 'label': 'str', 'local_executable': typing.Optional[str], 'model_config': 'ClassVar[ConfigDict]', 'mtime': 'Optional[datetime.datetime]', 'node_type': 'Optional[str]', 'pk': 'Optional[int]', 'prepend_text': <class 'str'>, 'process_type': 'Optional[str]', 'remote_exec_path': typing.Optional[str], 'repository_content': 'Optional[dict[str, bytes]]', 'repository_metadata': 'Optional[Dict[str, Any]]', 'source': 'Optional[dict]', 'use_double_quotes': 'bool', 'user': 'Optional[int]', 'uuid': 'Optional[str]', 'with_mpi': 't.Optional[bool]'}#
- __dict__#
- __module__ = 'aiida.orm.nodes.data.code.legacy'#
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}#
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True#
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'aiida.orm.nodes.data.code.legacy.Code.Model'>, 'config': {'title': 'Model'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida.orm.nodes.data.code.legacy.Code.Model'>>]}, 'ref': 'aiida.orm.nodes.data.code.legacy.Code.Model:107403282682000', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'append_text': {'metadata': {'pydantic_js_updates': {'description': 'The code that will be put in the scheduler script after the execution of the code'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'attributes': {'metadata': {'pydantic_js_updates': {'description': 'The node attributes'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'computer': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the computer'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'The creation time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'default_calc_job_plugin': {'metadata': {'pydantic_js_updates': {'description': 'Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', 'title': 'Default `CalcJob` plugin'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {'pydantic_js_updates': {'description': 'Human-readable description, ideally including version and compilation environment.', 'title': 'Description'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'The node extras'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'input_plugin': {'metadata': {'pydantic_js_updates': {'description': 'The name of the input plugin to be used for this code'}}, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'model-field'}, 'is_local': {'metadata': {'pydantic_js_updates': {'description': 'Whether the code is local or remote'}}, 'schema': {'schema': {'type': 'bool'}, 'type': 'nullable'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'A unique label to identify the code by.', 'title': 'Label'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'local_executable': {'metadata': {'pydantic_js_updates': {'description': 'Path to a local executable'}}, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'The modification time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'pk': {'metadata': {'pydantic_js_updates': {'description': 'The primary key of the entity. Can be `None` if the entity is not yet stored.'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'prepend_text': {'metadata': {'pydantic_js_updates': {'description': 'The code that will be put in the scheduler script before the execution of the code'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'process_type': {'metadata': {'pydantic_js_updates': {'description': 'The process type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'remote_exec_path': {'metadata': {'pydantic_js_updates': {'description': 'Remote path to executable'}}, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'model-field'}, 'repository_content': {'metadata': {'pydantic_js_updates': {'description': 'Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'bytes'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_metadata': {'metadata': {'pydantic_js_updates': {'description': 'Virtual hierarchy of the file repository.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'source': {'metadata': {'pydantic_js_updates': {'description': 'Source of the data.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'any'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'use_double_quotes': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', 'title': 'Escape using double quotes'}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'user': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the user who owns the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'with_mpi': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', 'title': 'Run with MPI'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'bool'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Model', 'type': 'model-fields'}, 'type': 'model'}#
The core schema of the model.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_extra__: dict[str, Any] | None#
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'append_text': FieldInfo(annotation=str, required=False, default='', description='The code that will be put in the scheduler script after the execution of the code', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'attributes': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node attributes', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'computer': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the computer', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.computers.Computer'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'ctime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The creation time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'default_calc_job_plugin': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Default `CalcJob` plugin', description='Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', metadata=[{'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'description': FieldInfo(annotation=str, required=False, default='', title='Description', description='Human-readable description, ideally including version and compilation environment.', metadata=[{'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'extras': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node extras', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'input_plugin': FieldInfo(annotation=Union[str, NoneType], required=True, description='The name of the input plugin to be used for this code', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'is_local': FieldInfo(annotation=Union[bool, NoneType], required=True, description='Whether the code is local or remote', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'label': FieldInfo(annotation=str, required=True, title='Label', description='A unique label to identify the code by.', metadata=[{'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'local_executable': FieldInfo(annotation=Union[str, NoneType], required=True, description='Path to a local executable', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'mtime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The modification time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'node_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'pk': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The primary key of the entity. Can be `None` if the entity is not yet stored.', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'prepend_text': FieldInfo(annotation=str, required=False, default='', description='The code that will be put in the scheduler script before the execution of the code', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'process_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The process type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'remote_exec_path': FieldInfo(annotation=Union[str, NoneType], required=True, description='Remote path to executable', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'repository_content': FieldInfo(annotation=Union[dict[str, bytes], NoneType], required=False, default=None, description='Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_metadata': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='Virtual hierarchy of the file repository.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'source': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='Source of the data.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}]), 'use_double_quotes': FieldInfo(annotation=bool, required=False, default=False, title='Escape using double quotes', description='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'user': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the user who owns the node', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'uuid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The UUID of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'with_mpi': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Run with MPI', description='Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}])}#
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}#
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = {'__doc__': "A code entity.\n It can either be 'local', or 'remote'.\n\n * Local code: it is a collection of files/dirs (added using the add_path() method), where one file is flagged as executable (using the set_local_executable() method).\n\n * Remote code: it is a pair (remotecomputer, remotepath_of_executable) set using the set_remote_computer_exec() method.\n\n For both codes, one can set some code to be executed right before or right after\n the execution of the code, using the set_preexec_code() and set_postexec_code()\n methods (e.g., the set_preexec_code() can be used to load specific modules required\n for the code to be run).\n ", '__module__': 'aiida.orm.nodes.data.code.legacy', '__qualname__': 'Code'}#
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None#
The name of the post-init method for the model, if defined.
- __pydantic_private__: dict[str, Any] | None#
Values of private attributes set on the model instance.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000061aec6831090, ), serializer: Fields( GeneralFieldsSerializer { fields: { "pk": SerField { key_py: Py( 0x000078d96d544cf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "process_type": SerField { key_py: Py( 0x000078d96bdb2130, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "source": SerField { key_py: Py( 0x000078d96e81efa0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Any( AnySerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[any, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_metadata": SerField { key_py: Py( 0x000078d96ad552f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "ctime": SerField { key_py: Py( 0x000078d96df55a70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "use_double_quotes": SerField { key_py: Py( 0x000078d96ad05930, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e755f60, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "remote_exec_path": SerField { key_py: Py( 0x000078d964d50c60, ), alias: None, alias_py: None, serializer: Some( Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "local_executable": SerField { key_py: Py( 0x000078d964d50bc0, ), alias: None, alias_py: None, serializer: Some( Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "mtime": SerField { key_py: Py( 0x000078d96e836600, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "description": SerField { key_py: Py( 0x000078d96dc44a30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "label": SerField { key_py: Py( 0x000078d96dd070b0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "computer": SerField { key_py: Py( 0x000078d96bccb670, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "attributes": SerField { key_py: Py( 0x000078d96da2f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "default_calc_job_plugin": SerField { key_py: Py( 0x000078d96bb58cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "prepend_text": SerField { key_py: Py( 0x000078d96bd5f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "append_text": SerField { key_py: Py( 0x000078d96bd5f4f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "user": SerField { key_py: Py( 0x000078d96df46e30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "node_type": SerField { key_py: Py( 0x000078d96be53730, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "input_plugin": SerField { key_py: Py( 0x000078d964cfb130, ), alias: None, alias_py: None, serializer: Some( Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "extras": SerField { key_py: Py( 0x000078d96dc59eb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "with_mpi": SerField { key_py: Py( 0x000078d964ce0cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Bool( BoolSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "is_local": SerField { key_py: Py( 0x000078d964d410f0, ), alias: None, alias_py: None, serializer: Some( Nullable( NullableSerializer { serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "uuid": SerField { key_py: Py( 0x000078d96d566bf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_content": SerField { key_py: Py( 0x000078d964c03e10, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Bytes( BytesSerializer { bytes_mode: Utf8, }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, bytes]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 24, }, ), has_extra: false, root_model: false, name: "Model", }, ), definitions=[])#
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}#
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="Model", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "pk", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "pk", py_key: Py( 0x000078d936d62670, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d544cf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "uuid", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "uuid", py_key: Py( 0x000078d936e23b70, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d566bf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "node_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "node_type", py_key: Py( 0x000078d935dd3f70, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96be53730, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "process_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "process_type", py_key: Py( 0x000078d935dd3fb0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bdb2130, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_metadata", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_metadata", py_key: Py( 0x000078d936588d00, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad552f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "ctime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "ctime", py_key: Py( 0x000078d935dd3db0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df55a70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "mtime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "mtime", py_key: Py( 0x000078d935dd3f30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e836600, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "label", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "label", py_key: Py( 0x000078d935dd3cf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dd070b0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "description", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "description", py_key: Py( 0x000078d935dd3e70, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc44a30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "attributes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "attributes", py_key: Py( 0x000078d935dd3d70, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96da2f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "extras", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "extras", py_key: Py( 0x000078d93af10130, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc59eb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "computer", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "computer", py_key: Py( 0x000078d935dc3ab0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bccb670, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "user", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "user", py_key: Py( 0x000078d935dc1570, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df46e30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_content", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_content", py_key: Py( 0x000078d935dc8e40, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964c03e10, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Bytes( BytesValidator { strict: false, bytes_mode: ValBytesMode { ser: Utf8, }, }, ), min_length: None, max_length: None, name: "dict[str,bytes]", }, ), name: "nullable[dict[str,bytes]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,bytes]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "source", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "source", py_key: Py( 0x000078d935dc25b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e81efa0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Any( AnyValidator, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[any,any]", }, ), name: "nullable[dict[any,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[any,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "default_calc_job_plugin", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "default_calc_job_plugin", py_key: Py( 0x000078d935dc8f80, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bb58cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "use_double_quotes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "use_double_quotes", py_key: Py( 0x000078d935dc9200, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad05930, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e755f60, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "with_mpi", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "with_mpi", py_key: Py( 0x000078d935dc1bf0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce0cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Bool( BoolValidator { strict: false, }, ), name: "nullable[bool]", }, ), validate_default: false, copy_default: false, name: "default[nullable[bool]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "prepend_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "prepend_text", py_key: Py( 0x000078d935dc1d30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "append_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "append_text", py_key: Py( 0x000078d935dc1df0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "input_plugin", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "input_plugin", py_key: Py( 0x000078d935dc1ab0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964cfb130, ), validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), frozen: false, }, Field { name: "local_executable", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "local_executable", py_key: Py( 0x000078d935dc8800, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964d50bc0, ), validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), frozen: false, }, Field { name: "remote_exec_path", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "remote_exec_path", py_key: Py( 0x000078d935dc8a80, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964d50c60, ), validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), frozen: false, }, Field { name: "is_local", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "is_local", py_key: Py( 0x000078d935da72b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964d410f0, ), validator: Nullable( NullableValidator { validator: Bool( BoolValidator { strict: false, }, ), name: "nullable[bool]", }, ), frozen: false, }, ], model_name: "Model", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000061aec6831090, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x000078d96c0eca00, ), name: "Model", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, pk: Annotated[Optional[int], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, uuid: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, node_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, process_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_metadata: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, ctime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, mtime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, label: typing.Annotated[str, {'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], description: typing.Annotated[str, {'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', attributes: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, extras: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, computer: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.computers.Computer'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, user: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_content: Annotated[Optional[dict[str, bytes]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, source: Annotated[Optional[dict], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}] = None, default_calc_job_plugin: Annotated[Optional[str], {'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, use_double_quotes: typing.Annotated[bool, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = False, with_mpi: Annotated[Optional[bool], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, prepend_text: typing.Annotated[str, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', append_text: typing.Annotated[str, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', input_plugin: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], local_executable: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], remote_exec_path: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], is_local: Annotated[Optional[bool], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>#
- model_config: ClassVar[ConfigDict] = {'defer_build': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- __abstractmethods__ = frozenset({})#
- __init__(remote_computer_exec=None, local_executable=None, input_plugin_name=None, files=None, **kwargs)[source]#
Construct a new instance.
- Parameters:
default_calc_job_plugin – The entry point name of the default
CalcJobplugin to use.append_text – The text that should be appended to the run line in the job script.
prepend_text – The text that should be prepended to the run line in the job script.
use_double_quotes – Whether the command line invocation of this code should be escaped with double quotes.
with_mpi – Whether the command should be run as an MPI program.
wrap_cmdline_params – Whether to wrap the executable and all its command line parameters into quotes to form a single string. This is required to enable support for Docker with the
ContainerizedCode.is_hidden – Whether the code is hidden.
- __module__ = 'aiida.orm.nodes.data.code.legacy'#
- __parameters__ = ()#
- _abc_impl = <_abc._abc_data object>#
- _logger: AiidaLoggerType = <Logger aiida.orm.nodes.data.code.legacy.Code (WARNING)>#
- _set_local()[source]#
Set the code as a ‘local’ code, meaning that all the files belonging to the code will be copied to the cluster, and the file set with set_exec_filename will be run.
It also deletes the flags related to the local case (if any)
- _set_remote()[source]#
Set the code as a ‘remote’ code, meaning that the code itself has no files attached, but only a location on a remote computer (with an absolute path of the executable on the remote computer).
It also deletes the flags related to the local case (if any)
- _validate()[source]#
Validate information stored in Node object.
For the
Nodebase class, this check is always valid. Subclasses can override this method to perform additional checks and should usually callsuper()._validate()first!This method is called automatically before storing the node in the DB. Therefore, use
get()and similar methods that automatically read either from the DB or from the internal attribute cache.
- can_run_on(computer)[source]#
Return True if this code can run on the given computer, False otherwise.
Local codes can run on any machine; remote codes can run only on the machine on which they reside.
TODO: add filters to mask the remote machines on which a local code can run.
- can_run_on_computer(computer: Computer) bool[source]#
Return whether the code can run on a given computer.
- Parameters:
computer – The computer.
- Returns:
Trueif the code can run oncomputer,Falseotherwise.
- fields = {'append_text': "QbStrField(attributes.append_text) -> <class 'str'>", 'attributes': 'QbDictField(attributes.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'computer': 'QbNumericField(computer) -> typing.Optional[int]', 'ctime': 'QbNumericField(ctime) -> typing.Optional[datetime.datetime]', 'default_calc_job_plugin': 'QbStrField(attributes.default_calc_job_plugin) -> ' 'typing.Optional[str]', 'description': "QbStrField(attributes.description) -> <class 'str'>", 'extras': 'QbDictField(extras.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'input_plugin': 'QbStrField(attributes.input_plugin) -> typing.Optional[str]', 'is_local': 'QbField(attributes.is_local) -> typing.Optional[bool]', 'label': "QbStrField(attributes.label) -> <class 'str'>", 'local_executable': 'QbStrField(attributes.local_executable) -> ' 'typing.Optional[str]', 'mtime': 'QbNumericField(mtime) -> typing.Optional[datetime.datetime]', 'node_type': 'QbStrField(node_type) -> typing.Optional[str]', 'pk': 'QbNumericField(pk) -> typing.Optional[int]', 'prepend_text': "QbStrField(attributes.prepend_text) -> <class 'str'>", 'process_type': 'QbStrField(process_type) -> typing.Optional[str]', 'remote_exec_path': 'QbStrField(attributes.remote_exec_path) -> ' 'typing.Optional[str]', 'repository_content': 'QbDictField(repository_content) -> ' 'typing.Optional[dict[str, bytes]]', 'repository_metadata': 'QbDictField(repository_metadata) -> ' 'typing.Optional[typing.Dict[str, typing.Any]]', 'source': 'QbDictField(attributes.source.*) -> typing.Optional[dict]', 'use_double_quotes': "QbField(attributes.use_double_quotes) -> <class 'bool'>", 'user': 'QbNumericField(user) -> typing.Optional[int]', 'uuid': 'QbStrField(uuid) -> typing.Optional[str]', 'with_mpi': 'QbField(attributes.with_mpi) -> typing.Optional[bool]'}#
- property full_label#
Get full label of this code.
Returns label of the form <code-label>@<computer-name>.
- classmethod get(pk=None, label=None, machinename=None)[source]#
Get a Computer object with given identifier string, that can either be the numeric ID (pk), or the label (and computername) (if unique).
- Parameters:
pk – the numeric ID (pk) for code
label – the code label identifying the code to load
machinename – the machine name where code is setup
- Raises:
aiida.common.NotExistent – if no code identified by the given string is found
aiida.common.MultipleObjectsError – if the string cannot identify uniquely a code
ValueError – if neither a pk nor a label was passed in
- get_append_text()[source]#
Return the postexec_code, or an empty string if no post-exec code was defined.
- classmethod get_code_helper(label, machinename=None, backend=None)[source]#
- Parameters:
label – the code label identifying the code to load
machinename – the machine name where code is setup
- Raises:
aiida.common.NotExistent – if no code identified by the given string is found
aiida.common.MultipleObjectsError – if the string cannot identify uniquely a code
- get_description()[source]#
Return a string description of this Code instance.
- Returns:
string description of this Code instance
- get_execname()[source]#
Return the executable string to be put in the script. For local codes, it is ./LOCAL_EXECUTABLE_NAME For remote codes, it is the absolute path to the executable.
- get_executable() PurePath[source]#
Return the executable that the submission script should execute to run the code.
- Returns:
The executable to be called in the submission script.
- classmethod get_from_string(code_string)[source]#
Get a Computer object with given identifier string in the format label@machinename. See the note below for details on the string detection algorithm.
Note
the (leftmost) ‘@’ symbol is always used to split code and computername. Therefore do not use ‘@’ in the code name if you want to use this function (‘@’ in the computer name are instead valid).
- Parameters:
code_string – the code string identifying the code to load
- Raises:
aiida.common.NotExistent – if no code identified by the given string is found
aiida.common.MultipleObjectsError – if the string cannot identify uniquely a code
TypeError – if code_string is not of string type
- get_input_plugin_name()[source]#
Return the name of the default input plugin (or None if no input plugin was set.
- get_prepend_text() str[source]#
Return the code that will be put in the scheduler script before the execution, or an empty string if no pre-exec code was defined.
- get_use_double_quotes() bool[source]#
Return whether the command line invocation of this code should be escaped with double quotes.
- Returns:
True if to escape with double quotes, False otherwise which is also the default.
Determines whether the Code is hidden or not
- is_local()[source]#
Return True if the code is ‘local’, False if it is ‘remote’ (see also documentation of the set_local and set_remote functions).
- classmethod list_for_plugin(plugin, labels=True, backend=None)[source]#
Return a list of valid code strings for a given plugin.
- Parameters:
plugin – The string of the plugin.
labels – if True, return a list of code names, otherwise return the code PKs (integers).
- Returns:
a list of string, with the code names if labels is True, otherwise a list of integers with the code PKs.
- reveal()[source]#
Reveal the code (allows to show it in the verdi code list) By default, it is revealed
- set_append_text(code)[source]#
Pass a string of code that will be put in the scheduler script after the execution of the code.
- set_files(files)[source]#
Given a list of filenames (or a single filename string), add it to the path (all at level zero, i.e. without folders). Therefore, be careful for files with the same name!
- Todo:
decide whether to check if the Code must be a local executable to be able to call this function.
- set_input_plugin_name(input_plugin)[source]#
Set the name of the default input plugin, to be used for the automatic generation of a new calculation.
- set_local_executable(exec_name)[source]#
Set the filename of the local executable. Implicitly set the code as local.
- set_prepend_text(code)[source]#
Pass a string of code that will be put in the scheduler script before the execution of the code.
- set_remote_computer_exec(remote_computer_exec)[source]#
Set the code as remote, and pass the computer on which it resides and the absolute path on that computer.
- Parameters:
remote_computer_exec – a tuple (computer, remote_exec_path), where computer is a aiida.orm.Computer and remote_exec_path is the absolute path of the main executable on remote computer.
- set_use_double_quotes(use_double_quotes: bool)[source]#
Set whether the command line invocation of this code should be escaped with double quotes.
- Parameters:
use_double_quotes – True if to escape with double quotes, False otherwise.
- validate_remote_exec_path()[source]#
Validate the
remote_exec_pathattribute.Checks whether the executable exists on the remote computer if a transport can be opened to it. This method is intentionally not called in
_validateas to allow the creation ofCodeinstances whose computers can not yet be connected to and as to not require the overhead of opening transports in storing a new code.- Raises:
ValidationError – if no transport could be opened or if the defined executable does not exist on the remote computer.
Data plugin representing an executable code stored in AiiDA’s storage.
This plugin should be used for executables that are not already installed on the target computer, but instead are
available on the machine where AiiDA is running. The plugin assumes that the code is self-contained by a single
directory containing all the necessary files, including a main executable. When constructing a PortableCode, passing
the absolute filepath as filepath_files will make sure that all the files contained within are uploaded to AiiDA’s
storage. The filepath_executable should indicate the filename of the executable within that directory. Each time a
aiida.engine.CalcJob is run using a PortableCode, the uploaded files will be automatically copied to the
working directory on the selected computer and the executable will be run there.
- class aiida.orm.nodes.data.code.portable.PortableCode(filepath_executable: str | PurePath, filepath_files: str | PurePath, **kwargs)[source]#
Bases:
CodeData plugin representing an executable code stored in AiiDA’s storage.
- class Model(*, pk: int | None = None, uuid: str | None = None, node_type: str | None = None, process_type: str | None = None, repository_metadata: Dict[str, Any] | None = None, ctime: datetime | None = None, mtime: datetime | None = None, label: str, description: str = '', attributes: Dict[str, Any] | None = None, extras: Dict[str, Any] | None = None, computer: int | None = None, user: int | None = None, repository_content: dict[str, bytes] | None = None, source: dict | None = None, default_calc_job_plugin: str | None = None, use_double_quotes: bool = False, with_mpi: bool | None = None, prepend_text: str = '', append_text: str = '')[source]#
Bases:
ModelModel describing required information to create an instance.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[Dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_computed_fields__': 'ClassVar[Dict[str, ComputedFieldInfo]]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields__': 'ClassVar[Dict[str, FieldInfo]]', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[Dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_setattr_handlers__': 'ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]]', '__pydantic_validator__': 'ClassVar[SchemaValidator | PluggableSchemaValidator]', '__signature__': 'ClassVar[Signature]', 'append_text': 'str', 'attributes': 'Optional[Dict[str, Any]]', 'computer': 'Optional[int]', 'ctime': 'Optional[datetime.datetime]', 'default_calc_job_plugin': 't.Optional[str]', 'description': 'str', 'extras': 'Optional[Dict[str, Any]]', 'filepath_executable': 'str', 'filepath_files': 'str', 'label': 'str', 'model_config': 'ClassVar[ConfigDict]', 'mtime': 'Optional[datetime.datetime]', 'node_type': 'Optional[str]', 'pk': 'Optional[int]', 'prepend_text': 'str', 'process_type': 'Optional[str]', 'repository_content': 'Optional[dict[str, bytes]]', 'repository_metadata': 'Optional[Dict[str, Any]]', 'source': 'Optional[dict]', 'use_double_quotes': 'bool', 'user': 'Optional[int]', 'uuid': 'Optional[str]', 'with_mpi': 't.Optional[bool]'}#
- __dict__#
- __module__ = 'aiida.orm.nodes.data.code.portable'#
- __private_attributes__: ClassVar[Dict[str, ModelPrivateAttr]] = {}#
Metadata about the private attributes of the model.
- __pydantic_complete__: ClassVar[bool] = True#
Whether model building is completed, or if there are still undefined fields.
- __pydantic_computed_fields__: ClassVar[Dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'aiida.orm.nodes.data.code.portable.PortableCode.Model'>, 'config': {'title': 'Model'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida.orm.nodes.data.code.portable.PortableCode.Model'>>]}, 'ref': 'aiida.orm.nodes.data.code.portable.PortableCode.Model:107403281683952', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'append_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be appended to the run line in all submit scripts for this code.', 'title': 'Append script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'attributes': {'metadata': {'pydantic_js_updates': {'description': 'The node attributes'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'computer': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the computer'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'The creation time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'default_calc_job_plugin': {'metadata': {'pydantic_js_updates': {'description': 'Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', 'title': 'Default `CalcJob` plugin'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {'pydantic_js_updates': {'description': 'Human-readable description, ideally including version and compilation environment.', 'title': 'Description'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'The node extras'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'filepath_executable': {'metadata': {'pydantic_js_updates': {'description': 'Relative filepath of executable with directory of code files.', 'title': 'Filepath executable'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'filepath_files': {'metadata': {'pydantic_js_updates': {'description': 'Filepath to directory containing code files.', 'title': 'Code directory'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'A unique label to identify the code by.', 'title': 'Label'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'The modification time of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'pk': {'metadata': {'pydantic_js_updates': {'description': 'The primary key of the entity. Can be `None` if the entity is not yet stored.'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'prepend_text': {'metadata': {'pydantic_js_updates': {'description': 'Bash commands that should be prepended to the run line in all submit scripts for this code.', 'title': 'Prepend script'}}, 'schema': {'default': '', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'process_type': {'metadata': {'pydantic_js_updates': {'description': 'The process type of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_content': {'metadata': {'pydantic_js_updates': {'description': 'Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'bytes'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'repository_metadata': {'metadata': {'pydantic_js_updates': {'description': 'Virtual hierarchy of the file repository.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'source': {'metadata': {'pydantic_js_updates': {'description': 'Source of the data.'}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'any'}, 'type': 'dict', 'values_schema': {'type': 'any'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'use_double_quotes': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', 'title': 'Escape using double quotes'}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'user': {'metadata': {'pydantic_js_updates': {'description': 'The PK of the user who owns the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the node'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'with_mpi': {'metadata': {'pydantic_js_updates': {'description': 'Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', 'title': 'Run with MPI'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'bool'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'Model', 'type': 'model-fields'}, 'type': 'model'}#
The core schema of the model.
- __pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_extra__: dict[str, Any] | None#
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields__: ClassVar[Dict[str, FieldInfo]] = {'append_text': FieldInfo(annotation=str, required=False, default='', title='Append script', description='Bash commands that should be appended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'attributes': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node attributes', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'computer': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the computer', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.computers.Computer'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'ctime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The creation time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'default_calc_job_plugin': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Default `CalcJob` plugin', description='Entry point name of the default plugin (as listed in `verdi plugin list aiida.calculations`).', metadata=[{'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'description': FieldInfo(annotation=str, required=False, default='', title='Description', description='Human-readable description, ideally including version and compilation environment.', metadata=[{'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'extras': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='The node extras', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}]), 'filepath_executable': FieldInfo(annotation=str, required=True, title='Filepath executable', description='Relative filepath of executable with directory of code files.', metadata=[{'priority': 1}, {'short_name': '-X'}, {'orm_to_model': <function PortableCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'filepath_files': FieldInfo(annotation=str, required=True, title='Code directory', description='Filepath to directory containing code files.', metadata=[{'priority': 2}, {'short_name': '-F'}, {'orm_to_model': <function _export_filpath_files_from_repo>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': False}, {'is_subscriptable': False}]), 'label': FieldInfo(annotation=str, required=True, title='Label', description='A unique label to identify the code by.', metadata=[{'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'mtime': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The modification time of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'node_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'pk': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The primary key of the entity. Can be `None` if the entity is not yet stored.', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'prepend_text': FieldInfo(annotation=str, required=False, default='', title='Prepend script', description='Bash commands that should be prepended to the run line in all submit scripts for this code.', metadata=[{'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'process_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The process type of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_content': FieldInfo(annotation=Union[dict[str, bytes], NoneType], required=False, default=None, description='Dictionary of file repository content. Keys are relative filepaths and values are binary file contents encoded as base64.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'repository_metadata': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None, description='Virtual hierarchy of the file repository.', metadata=[{'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'source': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='Source of the data.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}]), 'use_double_quotes': FieldInfo(annotation=bool, required=False, default=False, title='Escape using double quotes', description='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}]), 'user': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='The PK of the user who owns the node', metadata=[{'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'uuid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The UUID of the node', metadata=[{'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}]), 'with_mpi': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Run with MPI', description='Whether the executable should be run as an MPI program. This option can be left unspecified in which case `None` will be set and it is left up to the calculation job plugin or inputs whether to run with MPI.', metadata=[{'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}])}#
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.
- __pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}#
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__: ClassVar[Dict[str, Any] | None] = {'_EMIT_CODE_DEPRECATION_WARNING': False, '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'filepath_executable', '_SKIP_MODEL_INHERITANCE_CHECK': True, '__annotations__': {'_EMIT_CODE_DEPRECATION_WARNING': 'bool', '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'str', '_SKIP_MODEL_INHERITANCE_CHECK': 'bool'}, '__doc__': "Data plugin representing an executable code stored in AiiDA's storage.", '__module__': 'aiida.orm.nodes.data.code.portable', '__qualname__': 'PortableCode'}#
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None#
The name of the post-init method for the model, if defined.
- __pydantic_private__: dict[str, Any] | None#
Values of private attributes set on the model instance.
- __pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model( ModelSerializer { class: Py( 0x000061aec673d5f0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "uuid": SerField { key_py: Py( 0x000078d96d566bf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "attributes": SerField { key_py: Py( 0x000078d96da2f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "default_calc_job_plugin": SerField { key_py: Py( 0x000078d96bb58cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "with_mpi": SerField { key_py: Py( 0x000078d964ce0cb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Bool( BoolSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "source": SerField { key_py: Py( 0x000078d96e81efa0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Any( AnySerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[any, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "node_type": SerField { key_py: Py( 0x000078d96be53730, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "label": SerField { key_py: Py( 0x000078d96dd070b0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "append_text": SerField { key_py: Py( 0x000078d96bd5f4f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "description": SerField { key_py: Py( 0x000078d96dc44a30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "process_type": SerField { key_py: Py( 0x000078d96bdb2130, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "mtime": SerField { key_py: Py( 0x000078d96e836600, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "user": SerField { key_py: Py( 0x000078d96df46e30, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "ctime": SerField { key_py: Py( 0x000078d96df55a70, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Datetime( DatetimeSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "computer": SerField { key_py: Py( 0x000078d96bccb670, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "filepath_executable": SerField { key_py: Py( 0x000078d964ca7690, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, "repository_metadata": SerField { key_py: Py( 0x000078d96ad552f0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "use_double_quotes": SerField { key_py: Py( 0x000078d96ad05930, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e755f60, ), ), serializer: Bool( BoolSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "repository_content": SerField { key_py: Py( 0x000078d964c03e10, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Bytes( BytesSerializer { bytes_mode: Utf8, }, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, bytes]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "extras": SerField { key_py: Py( 0x000078d96dc59eb0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Dict( DictSerializer { key_serializer: Str( StrSerializer, ), value_serializer: Any( AnySerializer, ), filter: SchemaFilter { include: None, exclude: None, }, name: "dict[str, any]", }, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "pk": SerField { key_py: Py( 0x000078d96d544cf0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e76ac20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, }, "prepend_text": SerField { key_py: Py( 0x000078d96bd5f4b0, ), alias: None, alias_py: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078d96e863420, ), ), serializer: Str( StrSerializer, ), }, ), ), required: true, serialize_by_alias: None, }, "filepath_files": SerField { key_py: Py( 0x000078d964df23f0, ), alias: None, alias_py: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, }, }, computed_fields: Some( ComputedFields( [], ), ), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None, }, required_fields: 22, }, ), has_extra: false, root_model: false, name: "Model", }, ), definitions=[])#
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}#
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__
- __pydantic_validator__: ClassVar[SchemaValidator | PluggableSchemaValidator] = SchemaValidator(title="Model", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "pk", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "pk", py_key: Py( 0x000078d935a210f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d544cf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "uuid", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "uuid", py_key: Py( 0x000078d935a23370, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96d566bf0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "node_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "node_type", py_key: Py( 0x000078d935a22570, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96be53730, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "process_type", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "process_type", py_key: Py( 0x000078d935a201b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bdb2130, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_metadata", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_metadata", py_key: Py( 0x000078d93623c170, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad552f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "ctime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "ctime", py_key: Py( 0x000078d935a21230, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df55a70, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "mtime", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "mtime", py_key: Py( 0x000078d935a211b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e836600, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, }, ), name: "nullable[datetime]", }, ), validate_default: false, copy_default: false, name: "default[nullable[datetime]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "label", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "label", py_key: Py( 0x000078d935a204b0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dd070b0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "description", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "description", py_key: Py( 0x000078d935a21670, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc44a30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "attributes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "attributes", py_key: Py( 0x000078d935a21830, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96da2f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "extras", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "extras", py_key: Py( 0x000078d935a20a30, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96dc59eb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[str,any]", }, ), name: "nullable[dict[str,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "computer", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "computer", py_key: Py( 0x000078d935a21ef0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bccb670, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "user", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "user", py_key: Py( 0x000078d935a23bb0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96df46e30, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "repository_content", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "repository_content", py_key: Py( 0x000078d935e61b60, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964c03e10, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), value_validator: Bytes( BytesValidator { strict: false, bytes_mode: ValBytesMode { ser: Utf8, }, }, ), min_length: None, max_length: None, name: "dict[str,bytes]", }, ), name: "nullable[dict[str,bytes]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[str,bytes]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "source", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "source", py_key: Py( 0x000078d935a22db0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96e81efa0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Dict( DictValidator { strict: false, key_validator: Any( AnyValidator, ), value_validator: Any( AnyValidator, ), min_length: None, max_length: None, name: "dict[any,any]", }, ), name: "nullable[dict[any,any]]", }, ), validate_default: false, copy_default: false, name: "default[nullable[dict[any,any]]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "default_calc_job_plugin", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "default_calc_job_plugin", py_key: Py( 0x000078d935a397a0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bb58cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), name: "nullable[str]", }, ), validate_default: false, copy_default: false, name: "default[nullable[str]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "use_double_quotes", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "use_double_quotes", py_key: Py( 0x000078d935a3a060, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96ad05930, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e755f60, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "with_mpi", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "with_mpi", py_key: Py( 0x000078d935a23970, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ce0cb0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e76ac20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Bool( BoolValidator { strict: false, }, ), name: "nullable[bool]", }, ), validate_default: false, copy_default: false, name: "default[nullable[bool]]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "prepend_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "prepend_text", py_key: Py( 0x000078d935a239f0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4b0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "append_text", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "append_text", py_key: Py( 0x000078d935a23470, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d96bd5f4f0, ), validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078d96e863420, ), ), on_error: Raise, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), validate_default: false, copy_default: false, name: "default[str]", undefined: Py( 0x000078d96c0eca00, ), }, ), frozen: false, }, Field { name: "filepath_executable", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "filepath_executable", py_key: Py( 0x000078d935a39c50, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964ca7690, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "filepath_files", lookup_key_collection: LookupKeyCollection { by_name: Simple( LookupPath { first_item: PathItemString { key: "filepath_files", py_key: Py( 0x000078d935a23df0, ), }, rest: [], }, ), by_alias: None, by_alias_then_name: None, }, name_py: Py( 0x000078d964df23f0, ), validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "Model", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x000061aec673d5f0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x000078d96c0eca00, ), name: "Model", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__: ClassVar[Signature] = <Signature (*, pk: Annotated[Optional[int], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, uuid: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, node_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, process_type: Annotated[Optional[str], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_metadata: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, ctime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, mtime: Annotated[Optional[datetime.datetime], {'priority': 0}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, label: typing.Annotated[str, {'priority': 0}, {'short_name': '-L'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], description: typing.Annotated[str, {'priority': 0}, {'short_name': '-D'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', attributes: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, extras: Annotated[Optional[Dict[str, Any]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': True}] = None, computer: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.computers.Computer'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, user: Annotated[Optional[int], {'priority': 0}, {'orm_class': <class 'aiida.orm.users.User'>}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, repository_content: Annotated[Optional[dict[str, bytes]], {'priority': 0}, {'orm_to_model': <function Node.Model.<lambda>>}, {'exclude_to_orm': True}, {'exclude_from_cli': True}, {'is_attribute': False}, {'is_subscriptable': False}] = None, source: Annotated[Optional[dict], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': True}, {'is_attribute': True}, {'is_subscriptable': True}] = None, default_calc_job_plugin: Annotated[Optional[str], {'priority': 0}, {'short_name': '-P'}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, use_double_quotes: typing.Annotated[bool, {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = False, with_mpi: Annotated[Optional[bool], {'priority': 0}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = None, prepend_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='PREPEND_TEXT: if there is any bash commands that should be prepended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', append_text: typing.Annotated[str, {'priority': 0}, {'option_cls': functools.partial(<class 'aiida.cmdline.params.options.interactive.TemplateInteractiveOption'>, extension='.bash', header='APPEND_TEXT: if there is any bash commands that should be appended to the executable call in all submit scripts for this code, type that between the equal signs below and save the file.', footer='All lines that start with `#=`: will be ignored.')}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}] = '', filepath_executable: typing.Annotated[str, {'priority': 1}, {'short_name': '-X'}, {'orm_to_model': <function PortableCode.Model.<lambda>>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': True}, {'is_subscriptable': False}], filepath_files: typing.Annotated[str, {'priority': 2}, {'short_name': '-F'}, {'orm_to_model': <function _export_filpath_files_from_repo>}, {'exclude_to_orm': False}, {'exclude_from_cli': False}, {'is_attribute': False}, {'is_subscriptable': False}]) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- _abc_impl = <_abc._abc_data object>#
- model_config: ClassVar[ConfigDict] = {'defer_build': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'_CLS_COLLECTION': 'Type[CollectionType]', '_EMIT_CODE_DEPRECATION_WARNING': 'bool', '_KEY_ATTRIBUTE_APPEND_TEXT': 'str', '_KEY_ATTRIBUTE_DEFAULT_CALC_JOB_PLUGIN': 'str', '_KEY_ATTRIBUTE_FILEPATH_EXECUTABLE': 'str', '_KEY_ATTRIBUTE_PREPEND_TEXT': 'str', '_KEY_ATTRIBUTE_USE_DOUBLE_QUOTES': 'str', '_KEY_ATTRIBUTE_WITH_MPI': 'str', '_KEY_ATTRIBUTE_WRAP_CMDLINE_PARAMS': 'str', '_KEY_EXTRA_IS_HIDDEN': 'str', '_SKIP_MODEL_INHERITANCE_CHECK': 'bool', '__plugin_type_string': 'ClassVar[str]', '__query_type_string': 'ClassVar[str]', '_export_format_replacements': 'Dict[str, str]', '_hash_ignored_attributes': 'Tuple[str, ...]', '_logger': 'AiidaLoggerType', '_updatable_attributes': 'Tuple[str, ...]'}#
- __init__(filepath_executable: str | PurePath, filepath_files: str | PurePath, **kwargs)[source]#
Construct a new instance.
Note
If the files necessary for this code are not all located in a single directory or the directory contains files that should not be uploaded, and so the
filepath_filescannot be used. One can use the methods of theaiida.orm.nodes.repository.NodeRepositoryclass. This can be accessed through thebase.repositoryattribute of the instance after it has been constructed. For example:code = PortableCode(filepath_executable='some_name.exe') code.put_object_from_file() code.put_object_from_filelike() code.put_object_from_tree()
- Parameters:
filepath_executable – The relative filepath of the executable within the directory of uploaded files.
filepath_files – The filepath to the directory containing all the files of the code.
- __module__ = 'aiida.orm.nodes.data.code.portable'#
- __parameters__ = ()#
- _abc_impl = <_abc._abc_data object>#
- _logger: AiidaLoggerType = <Logger aiida.orm.nodes.data.code.portable.PortableCode (WARNING)>#
- _validate()[source]#
Validate the instance by checking that an executable is defined and it is part of the repository files.
:raises
aiida.common.exceptions.ValidationError: If the state of the node is invalid.
- can_run_on_computer(computer: Computer) bool[source]#
Return whether the code can run on a given computer.
A
PortableCodeshould be able to be run on any computer in principle.- Parameters:
computer – The computer.
- Returns:
Trueif the provided computer is the same as the one configured for this code.
- fields = {'append_text': "QbStrField(attributes.append_text) -> <class 'str'>", 'attributes': 'QbDictField(attributes.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'computer': 'QbNumericField(computer) -> typing.Optional[int]', 'ctime': 'QbNumericField(ctime) -> typing.Optional[datetime.datetime]', 'default_calc_job_plugin': 'QbStrField(attributes.default_calc_job_plugin) -> ' 'typing.Optional[str]', 'description': "QbStrField(attributes.description) -> <class 'str'>", 'extras': 'QbDictField(extras.*) -> typing.Optional[typing.Dict[str, ' 'typing.Any]]', 'filepath_executable': 'QbStrField(attributes.filepath_executable) -> <class ' "'str'>", 'filepath_files': "QbStrField(filepath_files) -> <class 'str'>", 'label': "QbStrField(attributes.label) -> <class 'str'>", 'mtime': 'QbNumericField(mtime) -> typing.Optional[datetime.datetime]', 'node_type': 'QbStrField(node_type) -> typing.Optional[str]', 'pk': 'QbNumericField(pk) -> typing.Optional[int]', 'prepend_text': "QbStrField(attributes.prepend_text) -> <class 'str'>", 'process_type': 'QbStrField(process_type) -> typing.Optional[str]', 'repository_content': 'QbDictField(repository_content) -> ' 'typing.Optional[dict[str, bytes]]', 'repository_metadata': 'QbDictField(repository_metadata) -> ' 'typing.Optional[typing.Dict[str, typing.Any]]', 'source': 'QbDictField(attributes.source.*) -> typing.Optional[dict]', 'use_double_quotes': "QbField(attributes.use_double_quotes) -> <class 'bool'>", 'user': 'QbNumericField(user) -> typing.Optional[int]', 'uuid': 'QbStrField(uuid) -> typing.Optional[str]', 'with_mpi': 'QbField(attributes.with_mpi) -> typing.Optional[bool]'}#
- property filepath_executable: PurePath#
Return the relative filepath of the executable that this code represents.
- Returns:
The relative filepath of the executable.
- property full_label: str#
Return the full label of this code.
The full label can be just the label itself but it can be something else. However, it at the very least has to include the label of the code.
- Returns:
The full label of the code.
- get_executable() PurePath[source]#
Return the executable that the submission script should execute to run the code.
- Returns:
The executable to be called in the submission script.
- get_executable_cmdline_params(cmdline_params: list[str] | None = None) list[source]#
Return the list of executable with its command line parameters.
- Parameters:
cmdline_params – List of command line parameters provided by the
CalcJobplugin.- Returns:
List of the executable followed by its command line parameters.
- validate_working_directory(folder: Folder)[source]#
Validate content of the working directory created by the
CalcJobplugin.This method will be called by
presubmit()when a new calculation job is launched, passing theFolderthat was used by the plugin used for the calculation to create the input files for the working directory. This method can be overridden by implementations of theAbstractCodeclass that need to validate the contents of that folder.- Parameters:
folder – A sandbox folder that the
CalcJobplugin wrote input files to that will be copied to the working directory for the corresponding calculation job instance.- Raises:
PluginInternalError – The
CalcJobplugin created a file that has the same relative filepath as the executable for this portable code.
- aiida.orm.nodes.data.code.portable._export_filpath_files_from_repo(portable_code: PortableCode, repository_path: Path) str[source]#