diff --git a/src/aiida/orm/fields.py b/src/aiida/orm/fields.py index aefaf292c5..a57859d94b 100644 --- a/src/aiida/orm/fields.py +++ b/src/aiida/orm/fields.py @@ -12,10 +12,12 @@ import datetime import typing as t +from collections.abc import Sequence from copy import deepcopy from functools import singledispatchmethod from pprint import pformat from types import UnionType +from uuid import UUID from aiida.common.lang import isidentifier from aiida.common.warnings import warn_deprecation @@ -187,6 +189,29 @@ def __ge__(self, value): return QbFieldFilters(((self, '>=', value),)) +class QbBoolField(QbField): + """A boolean (`bool`) flavor of `QbField`.""" + + def as_filter(self) -> QbFieldFilters: + """Return a filter for only values that are True.""" + return QbFieldFilters(((self, '==', True),)) + + def __and__(self, other: QbFieldFilters | QbBoolField) -> QbFieldFilters: + """Return a filter for only values that are True and satisfy the other filter.""" + return self.as_filter() & other + + def __or__(self, other: QbFieldFilters | QbBoolField) -> QbFieldFilters: + """Return a filter for only values that are True or satisfy the other filter.""" + return self.as_filter() | other + + def __invert__(self) -> QbFieldFilters: + """Return a filter for only values that are not `True`. + + Some booleans are optional, so not `False`, but rather `None` (absent). + """ + return QbFieldFilters(((self, '!==', True),)) + + class QbArrayField(QbField): """An array (`list`) flavor of `QbField`.""" @@ -244,7 +269,7 @@ def has_key(self, value): """Return a filter for only values with these keys""" return QbFieldFilters(((self, 'has_key', value),)) - def __getitem__(self, key: str) -> QbAnyField: + def __getitem__(self, key: str) -> QbField: """Return a new `QbField` with a nested key.""" return QbAnyField( key=f'{self.key}.{key}', @@ -283,6 +308,13 @@ def __getattr__(self, key: str) -> QbField: raise AttributeError(key) + def __getitem__(self, key: str) -> QbField: + """Return a typed child field if known; otherwise return a generic QbAnyField.""" + children = getattr(self, '_typed_children', None) or {} + if key in children: + return children[key] + return super().__getitem__(key) + def __dir__(self) -> list[str]: """Expose typed children for autocompletion.""" children = getattr(self, '_typed_children', None) or {} @@ -350,13 +382,17 @@ def __eq__(self, other: object) -> bool: raise TypeError(f'cannot compare QbFieldFilters to {type(other)}') return self.filters == other.filters - def __and__(self, other: QbFieldFilters) -> QbFieldFilters: + def __and__(self, other: QbFieldFilters | QbBoolField) -> QbFieldFilters: """``a & b`` -> {'and': [`a.filters`, `b.filters`]}.""" - return self._resolve_redundancy(other, 'and') or QbFieldFilters({'and': [self.filters, other.filters]}) + qb_filters = other.as_filter() if isinstance(other, QbBoolField) else other + resolved = self._resolve_redundancy(qb_filters, 'and') + return resolved or QbFieldFilters({'and': [self.filters, qb_filters.filters]}) - def __or__(self, other: QbFieldFilters) -> QbFieldFilters: + def __or__(self, other: QbFieldFilters | QbBoolField) -> QbFieldFilters: """``a | b`` -> {'or': [`a.filters`, `b.filters`]}.""" - return self._resolve_redundancy(other, 'or') or QbFieldFilters({'or': [self.filters, other.filters]}) + qb_filters = other.as_filter() if isinstance(other, QbBoolField) else other + resolved = self._resolve_redundancy(qb_filters, 'or') + return resolved or QbFieldFilters({'or': [self.filters, qb_filters.filters]}) def __invert__(self) -> QbFieldFilters: """~(a > b) -> a !> b; ~(a !> b) -> a > b""" @@ -492,9 +528,11 @@ def add_field( root_type = extract_root_type(dtype) if dtype else None if root_type in (int, float, datetime.datetime): return QbNumericField(**kwargs) - elif root_type in (list, tuple): + elif root_type is bool: + return QbBoolField(**kwargs) + elif root_type in (list, tuple, Sequence): return QbArrayField(**kwargs) - elif root_type in (str, t.Literal): + elif root_type in (str, t.Literal, UUID): return QbStrField(**kwargs) elif root_type is dict: return QbDictField(**kwargs) diff --git a/src/aiida/orm/nodes/data/numeric.py b/src/aiida/orm/nodes/data/numeric.py index f515140099..154c032f2e 100644 --- a/src/aiida/orm/nodes/data/numeric.py +++ b/src/aiida/orm/nodes/data/numeric.py @@ -8,6 +8,8 @@ ########################################################################### """Module for defintion of base `Data` sub class for numeric based data types.""" +from aiida.orm.pydantic import OrmMetadataField + from .base import BaseType, to_aiida_type __all__ = ('NumericType',) @@ -42,6 +44,12 @@ def inner(self, other): class NumericType(BaseType): """Sub class of Data to store numbers, overloading common operators (``+``, ``*``, ...).""" + class AttributesModel(BaseType.AttributesModel): + value: int | float = OrmMetadataField( + title='Numeric value', + description='The value of the numeric data', + ) + @_left_operator def __add__(self, other): return self + other diff --git a/src/aiida/orm/querybuilder.py b/src/aiida/orm/querybuilder.py index 4bc70ec655..2cd1ca2f70 100644 --- a/src/aiida/orm/querybuilder.py +++ b/src/aiida/orm/querybuilder.py @@ -56,7 +56,7 @@ # re-usable type annotations EntityClsType = type[Union[entities.Entity, 'Process']] ProjectType = str | dict | Sequence[str | dict] -FilterType = dict[str, Any] | fields.QbFieldFilters +FilterType = dict[str, Any] | fields.QbFieldFilters | fields.QbBoolField OrderByType = dict | list[dict] | tuple[dict, ...] LOGGER = AIIDA_LOGGER.getChild('querybuilder') @@ -706,6 +706,8 @@ def add_filter(self, tagspec: str | EntityClsType, filter_spec: FilterType) -> Q @staticmethod def _process_filters(filters: FilterType) -> dict[str, Any]: """Process filters.""" + if isinstance(filters, fields.QbBoolField): + filters = filters.as_filter() if not isinstance(filters, (dict, fields.QbFieldFilters)): raise TypeError('Filters must be either a dictionary or QbFieldFilters') diff --git a/tests/orm/test_fields.py b/tests/orm/test_fields.py index 078aae16ee..aeb3860a97 100644 --- a/tests/orm/test_fields.py +++ b/tests/orm/test_fields.py @@ -8,6 +8,8 @@ ########################################################################### """Test for entity fields""" +import typing as t + import pytest from importlib_metadata import entry_points @@ -228,3 +230,93 @@ def test_query_subscriptable(): .all() ) assert result == [[1, 2]] + + +@pytest.mark.usefixtures('aiida_profile_clean') +def test_boolean_query(): + """Test using boolean fields in a query.""" + orm.Bool(True, label='true').store() + orm.Bool(False, label='false').store() + + def query(filters): + return ( + orm.QueryBuilder() + .append( + orm.Bool, + filters=filters, + project=orm.Bool.fields.value, + ) + .all(flat=True) + ) + + result = query(filters=orm.Bool.fields.value) + assert len(result) == 1 + assert result == [True] + + result = query(filters=~orm.Bool.fields.value) + assert len(result) == 1 + assert result == [False] + + result = query(filters=orm.Bool.fields.value | ~orm.Bool.fields.value) + assert len(result) == 2 + assert set(result) == {True, False} + + result = query(filters=~orm.Bool.fields.value & orm.Bool.fields.value) + assert len(result) == 0 + assert result == [] + + result = query(filters=(orm.Bool.fields.label == 'true') & orm.Bool.fields.value) + assert len(result) == 1 + assert result == [True] + + result = query(filters=~orm.Bool.fields.value & (orm.Bool.fields.label == 'false')) + assert len(result) == 1 + assert result == [False] + + +@pytest.mark.usefixtures('aiida_profile_clean') +def test_boolean_query_absent_attribute(): + """Test sparse boolean field negation. + + Flag-style attributes like ``paused`` are stored as ``True`` or not at all: ``unpause()`` + deletes the key rather than storing ``False``. So ``~field`` has to match every row where + the attribute is not ``True``, absent rows included. + """ + # One node stays paused: the `paused` attribute is stored as `True`. + paused_node = orm.CalculationNode().store() + paused_node.pause() + + # One node is paused and then unpaused: the `paused` attribute is deleted, not set to `False`. + unpaused_node = orm.CalculationNode().store() + unpaused_node.pause() + unpaused_node.unpause() + + # The stored state the query relies on: `True` on one node, absent on the other, even though + # the `.paused` property reads back `False` for the absent case (via `attributes.get(key, False)`). + assert paused_node.base.attributes.all == {'paused': True} + assert unpaused_node.base.attributes.all == {} + assert unpaused_node.paused is False + + def count(filters): + return orm.QueryBuilder().append(orm.CalculationNode, filters=filters).count() + + assert count(orm.CalculationNode.fields.paused) == 1 # only the paused node + assert count(~orm.CalculationNode.fields.paused) == 1 # only the unpaused node + assert count(orm.CalculationNode.fields.paused | ~orm.CalculationNode.fields.paused) == 2 # both + + +def test_attribute_field_access(): + """Test both modes of attribute field access.""" + node = orm.Int(42) + value_attr_field = node.fields.value + assert node.fields.attributes.value is value_attr_field + assert node.fields.attributes['value'] is value_attr_field + + +def test_unknown_attribute_field_access(): + """Test unknown attribute access returns a generic `QbAnyField`.""" + node = orm.Data() + unknown_attr = node.fields.attributes['unknown'] + assert isinstance(unknown_attr, orm.fields.QbAnyField) + assert unknown_attr.key == 'attributes.unknown' + assert unknown_attr.dtype is t.Any diff --git a/tests/orm/test_fields/fields_AuthInfo.yml b/tests/orm/test_fields/fields_AuthInfo.yml index 58dfaff2b8..e5ce522d10 100644 --- a/tests/orm/test_fields/fields_AuthInfo.yml +++ b/tests/orm/test_fields/fields_AuthInfo.yml @@ -1,7 +1,7 @@ auth_params: QbDictField('auth_params', dtype=dict[str, typing.Any], doc='Dictionary of authentication parameters') computer: QbNumericField('computer', dtype=, doc='The PK of the computer') -enabled: QbAnyField('enabled', dtype=, doc='Whether the instance is +enabled: QbBoolField('enabled', dtype=, doc='Whether the instance is enabled') metadata: QbDictField('metadata', dtype=dict[str, typing.Any], doc='Dictionary of metadata') diff --git a/tests/orm/test_fields/fields_Comment.yml b/tests/orm/test_fields/fields_Comment.yml index a69baa79ea..336cd80986 100644 --- a/tests/orm/test_fields/fields_Comment.yml +++ b/tests/orm/test_fields/fields_Comment.yml @@ -7,4 +7,4 @@ node: QbNumericField('node', dtype=, doc='Node PK that the comment attached to') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') user: QbNumericField('user', dtype=, doc='User PK that created the comment') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the comment') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the comment') diff --git a/tests/orm/test_fields/fields_Computer.yml b/tests/orm/test_fields/fields_Computer.yml index cf93ff033e..a6932f5234 100644 --- a/tests/orm/test_fields/fields_Computer.yml +++ b/tests/orm/test_fields/fields_Computer.yml @@ -9,4 +9,4 @@ scheduler_type: QbStrField('scheduler_type', dtype=, doc='Scheduler of the computer') transport_type: QbStrField('transport_type', dtype=, doc='Transport type of the computer') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the computer') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the computer') diff --git a/tests/orm/test_fields/fields_Group.yml b/tests/orm/test_fields/fields_Group.yml index 2a0573471f..9626c168a2 100644 --- a/tests/orm/test_fields/fields_Group.yml +++ b/tests/orm/test_fields/fields_Group.yml @@ -6,4 +6,4 @@ time: QbNumericField('time', dtype=, doc='The creatio time of the node, defaults to now (timezone-aware)') type_string: QbStrField('type_string', dtype=, doc='The type of the group') user: QbNumericField('user', dtype=, doc='The PK of the group owner') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the group') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the group') diff --git a/tests/orm/test_fields/fields_Log.yml b/tests/orm/test_fields/fields_Log.yml index c3999009f2..71794e8714 100644 --- a/tests/orm/test_fields/fields_Log.yml +++ b/tests/orm/test_fields/fields_Log.yml @@ -7,4 +7,4 @@ node: QbNumericField('node', dtype=, doc='Associated node') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') time: QbNumericField('time', dtype=, doc='The time at which the log was created') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.array.ArrayData.yml b/tests/orm/test_fields/fields_aiida.data.core.array.ArrayData.yml index 9dad258e38..a41854518a 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.array.ArrayData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.array.ArrayData.yml @@ -18,4 +18,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.array.bands.BandsData.yml b/tests/orm/test_fields/fields_aiida.data.core.array.bands.BandsData.yml index 05c156b5d3..ae83fe7e89 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.array.bands.BandsData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.array.bands.BandsData.yml @@ -21,11 +21,11 @@ node_type: QbStrField('node_type', dtype=typing.Literal['data.core.array.bands.B doc='The type of the node.') offset: QbArrayField('attributes.offset', dtype=list[float] | None, doc='Offset of kpoints') -pbc1: QbAnyField('attributes.pbc1', dtype=bool | None, doc='Periodicity in the first +pbc1: QbBoolField('attributes.pbc1', dtype=bool | None, doc='Periodicity in the first lattice vector direction') -pbc2: QbAnyField('attributes.pbc2', dtype=bool | None, doc='Periodicity in the second +pbc2: QbBoolField('attributes.pbc2', dtype=bool | None, doc='Periodicity in the second lattice vector direction') -pbc3: QbAnyField('attributes.pbc3', dtype=bool | None, doc='Periodicity in the third +pbc3: QbBoolField('attributes.pbc3', dtype=bool | None, doc='Periodicity in the third lattice vector direction') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_type: QbStrField('process_type', dtype=str | None, doc='The process type of @@ -37,4 +37,4 @@ units: QbStrField('attributes.units', dtype=str | None, doc='Units in which the in bands were stored') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.array.kpoints.KpointsData.yml b/tests/orm/test_fields/fields_aiida.data.core.array.kpoints.KpointsData.yml index dbc5b8a942..0170610637 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.array.kpoints.KpointsData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.array.kpoints.KpointsData.yml @@ -19,11 +19,11 @@ node_type: QbStrField('node_type', dtype=typing.Literal['data.core.array.kpoints doc='The type of the node.') offset: QbArrayField('attributes.offset', dtype=list[float] | None, doc='Offset of kpoints') -pbc1: QbAnyField('attributes.pbc1', dtype=bool | None, doc='Periodicity in the first +pbc1: QbBoolField('attributes.pbc1', dtype=bool | None, doc='Periodicity in the first lattice vector direction') -pbc2: QbAnyField('attributes.pbc2', dtype=bool | None, doc='Periodicity in the second +pbc2: QbBoolField('attributes.pbc2', dtype=bool | None, doc='Periodicity in the second lattice vector direction') -pbc3: QbAnyField('attributes.pbc3', dtype=bool | None, doc='Periodicity in the third +pbc3: QbBoolField('attributes.pbc3', dtype=bool | None, doc='Periodicity in the third lattice vector direction') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_type: QbStrField('process_type', dtype=str | None, doc='The process type of @@ -33,4 +33,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.array.projection.ProjectionData.yml b/tests/orm/test_fields/fields_aiida.data.core.array.projection.ProjectionData.yml index 47ff756f1b..149b284a11 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.array.projection.ProjectionData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.array.projection.ProjectionData.yml @@ -18,4 +18,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.array.trajectory.TrajectoryData.yml b/tests/orm/test_fields/fields_aiida.data.core.array.trajectory.TrajectoryData.yml index 3e74d4c2fa..5f263d7f65 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.array.trajectory.TrajectoryData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.array.trajectory.TrajectoryData.yml @@ -21,4 +21,4 @@ source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the d symbols: QbArrayField('attributes.symbols', dtype=list[str], doc='List of symbols') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.array.xy.XyData.yml b/tests/orm/test_fields/fields_aiida.data.core.array.xy.XyData.yml index e13f5da290..81410b4582 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.array.xy.XyData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.array.xy.XyData.yml @@ -18,12 +18,12 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') x_name: QbStrField('attributes.x_name', dtype=, doc='The name of the x array') x_units: QbStrField('attributes.x_units', dtype=, doc='The units of the x array') -y_names: QbAnyField('attributes.y_names', dtype=collections.abc.Sequence[str], doc='The +y_names: QbArrayField('attributes.y_names', dtype=collections.abc.Sequence[str], doc='The names of the y arrays') -y_units: QbAnyField('attributes.y_units', dtype=collections.abc.Sequence[str], doc='The +y_units: QbArrayField('attributes.y_units', dtype=collections.abc.Sequence[str], doc='The units of the y arrays') diff --git a/tests/orm/test_fields/fields_aiida.data.core.base.BaseType.yml b/tests/orm/test_fields/fields_aiida.data.core.base.BaseType.yml index 3257a81cdb..b38c0ba1e6 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.base.BaseType.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.base.BaseType.yml @@ -18,5 +18,5 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') value: QbAnyField('attributes.value', dtype=typing.Any, doc='The value of the data') diff --git a/tests/orm/test_fields/fields_aiida.data.core.bool.Bool.yml b/tests/orm/test_fields/fields_aiida.data.core.bool.Bool.yml index 304a6dcc5e..36461b5ec9 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.bool.Bool.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.bool.Bool.yml @@ -18,6 +18,6 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -value: QbAnyField('attributes.value', dtype=, doc='The value of the +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +value: QbBoolField('attributes.value', dtype=, doc='The value of the boolean') diff --git a/tests/orm/test_fields/fields_aiida.data.core.cif.CifData.yml b/tests/orm/test_fields/fields_aiida.data.core.cif.CifData.yml index 9e6352e7ca..b2fc1225cb 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.cif.CifData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.cif.CifData.yml @@ -30,4 +30,4 @@ spacegroup_numbers: QbArrayField('attributes.spacegroup_numbers', dtype=list[str | None, doc='List of space group numbers of the structure') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.code.Code.yml b/tests/orm/test_fields/fields_aiida.data.core.code.Code.yml index 3d9e932f24..95e5298838 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.code.Code.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.code.Code.yml @@ -12,7 +12,7 @@ description: QbStrField('description', dtype=, doc='The node descri extras: QbDictField('extras', dtype=dict[str, typing.Any], doc='The node extras') input_plugin: QbStrField('attributes.input_plugin', dtype=str | None, doc='The name of the input plugin to be used for this code') -is_local: QbAnyField('attributes.is_local', dtype=bool | None, doc='Whether the code +is_local: QbBoolField('attributes.is_local', dtype=bool | None, doc='Whether the code is local or remote') label: QbStrField('label', dtype=, doc='The node label') local_executable: QbStrField('attributes.local_executable', dtype=str | None, doc='Path @@ -31,17 +31,17 @@ remote_exec_path: QbStrField('attributes.remote_exec_path', dtype=str | None, do repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') -use_double_quotes: QbAnyField('attributes.use_double_quotes', dtype=, +use_double_quotes: QbBoolField('attributes.use_double_quotes', dtype=, doc='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -with_mpi: QbAnyField('attributes.with_mpi', dtype=bool | None, doc='Whether the executable +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +with_mpi: QbBoolField('attributes.with_mpi', dtype=bool | None, doc='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') -wrap_cmdline_params: QbAnyField('attributes.wrap_cmdline_params', dtype=, +wrap_cmdline_params: QbBoolField('attributes.wrap_cmdline_params', dtype=, doc='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') diff --git a/tests/orm/test_fields/fields_aiida.data.core.code.abstract.AbstractCode.yml b/tests/orm/test_fields/fields_aiida.data.core.code.abstract.AbstractCode.yml index 439adb9c23..896e285696 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.code.abstract.AbstractCode.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.code.abstract.AbstractCode.yml @@ -24,17 +24,17 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') -use_double_quotes: QbAnyField('attributes.use_double_quotes', dtype=, +use_double_quotes: QbBoolField('attributes.use_double_quotes', dtype=, doc='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -with_mpi: QbAnyField('attributes.with_mpi', dtype=bool | None, doc='Whether the executable +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +with_mpi: QbBoolField('attributes.with_mpi', dtype=bool | None, doc='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') -wrap_cmdline_params: QbAnyField('attributes.wrap_cmdline_params', dtype=, +wrap_cmdline_params: QbBoolField('attributes.wrap_cmdline_params', dtype=, doc='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') diff --git a/tests/orm/test_fields/fields_aiida.data.core.code.containerized.ContainerizedCode.yml b/tests/orm/test_fields/fields_aiida.data.core.code.containerized.ContainerizedCode.yml index b11b173389..aa61abf270 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.code.containerized.ContainerizedCode.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.code.containerized.ContainerizedCode.yml @@ -32,17 +32,17 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') -use_double_quotes: QbAnyField('attributes.use_double_quotes', dtype=, +use_double_quotes: QbBoolField('attributes.use_double_quotes', dtype=, doc='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -with_mpi: QbAnyField('attributes.with_mpi', dtype=bool | None, doc='Whether the executable +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +with_mpi: QbBoolField('attributes.with_mpi', dtype=bool | None, doc='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') -wrap_cmdline_params: QbAnyField('attributes.wrap_cmdline_params', dtype=, +wrap_cmdline_params: QbBoolField('attributes.wrap_cmdline_params', dtype=, doc='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') diff --git a/tests/orm/test_fields/fields_aiida.data.core.code.installed.InstalledCode.yml b/tests/orm/test_fields/fields_aiida.data.core.code.installed.InstalledCode.yml index 6d70732836..4aa0c79ed1 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.code.installed.InstalledCode.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.code.installed.InstalledCode.yml @@ -27,17 +27,17 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') -use_double_quotes: QbAnyField('attributes.use_double_quotes', dtype=, +use_double_quotes: QbBoolField('attributes.use_double_quotes', dtype=, doc='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -with_mpi: QbAnyField('attributes.with_mpi', dtype=bool | None, doc='Whether the executable +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +with_mpi: QbBoolField('attributes.with_mpi', dtype=bool | None, doc='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') -wrap_cmdline_params: QbAnyField('attributes.wrap_cmdline_params', dtype=, +wrap_cmdline_params: QbBoolField('attributes.wrap_cmdline_params', dtype=, doc='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') diff --git a/tests/orm/test_fields/fields_aiida.data.core.code.portable.PortableCode.yml b/tests/orm/test_fields/fields_aiida.data.core.code.portable.PortableCode.yml index 4805f884bf..2b6a10cf24 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.code.portable.PortableCode.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.code.portable.PortableCode.yml @@ -26,17 +26,17 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') -use_double_quotes: QbAnyField('attributes.use_double_quotes', dtype=, +use_double_quotes: QbBoolField('attributes.use_double_quotes', dtype=, doc='Whether the executable and arguments of the code in the submission script should be escaped with single or double quotes') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -with_mpi: QbAnyField('attributes.with_mpi', dtype=bool | None, doc='Whether the executable +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +with_mpi: QbBoolField('attributes.with_mpi', dtype=bool | None, doc='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') -wrap_cmdline_params: QbAnyField('attributes.wrap_cmdline_params', dtype=, +wrap_cmdline_params: QbBoolField('attributes.wrap_cmdline_params', dtype=, doc='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') diff --git a/tests/orm/test_fields/fields_aiida.data.core.dict.Dict.yml b/tests/orm/test_fields/fields_aiida.data.core.dict.Dict.yml index 19cdf9f289..965420d277 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.dict.Dict.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.dict.Dict.yml @@ -18,4 +18,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.enum.EnumData.yml b/tests/orm/test_fields/fields_aiida.data.core.enum.EnumData.yml index e2c428ec52..62cd8fca56 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.enum.EnumData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.enum.EnumData.yml @@ -21,5 +21,5 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') value: QbAnyField('attributes.value', dtype=typing.Any, doc='The member value') diff --git a/tests/orm/test_fields/fields_aiida.data.core.float.Float.yml b/tests/orm/test_fields/fields_aiida.data.core.float.Float.yml index 097f5ad6d4..5fc738d99f 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.float.Float.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.float.Float.yml @@ -18,6 +18,6 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') value: QbNumericField('attributes.value', dtype=, doc='The value of the float') diff --git a/tests/orm/test_fields/fields_aiida.data.core.folder.FolderData.yml b/tests/orm/test_fields/fields_aiida.data.core.folder.FolderData.yml index fa4eedd0e6..b158d4b42b 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.folder.FolderData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.folder.FolderData.yml @@ -18,4 +18,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.int.Int.yml b/tests/orm/test_fields/fields_aiida.data.core.int.Int.yml index 322837f5ec..6a19ad1fe8 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.int.Int.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.int.Int.yml @@ -18,6 +18,6 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') value: QbNumericField('attributes.value', dtype=, doc='The value of the integer') diff --git a/tests/orm/test_fields/fields_aiida.data.core.jsonable.JsonableData.yml b/tests/orm/test_fields/fields_aiida.data.core.jsonable.JsonableData.yml index fa9484f91e..90b486f3f6 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.jsonable.JsonableData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.jsonable.JsonableData.yml @@ -22,4 +22,4 @@ the_module: QbStrField('attributes.@module', '@module', dtype=, doc module name of the wrapped object') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.list.List.yml b/tests/orm/test_fields/fields_aiida.data.core.list.List.yml index e26fa98391..7522bbd793 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.list.List.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.list.List.yml @@ -18,6 +18,6 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') value: QbArrayField('attributes.list', 'list', dtype=list[typing.Any], doc='Content of the data') diff --git a/tests/orm/test_fields/fields_aiida.data.core.numeric.NumericType.yml b/tests/orm/test_fields/fields_aiida.data.core.numeric.NumericType.yml index 03f2a2177f..e66858adad 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.numeric.NumericType.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.numeric.NumericType.yml @@ -18,5 +18,6 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') -value: QbAnyField('attributes.value', dtype=typing.Any, doc='The value of the data') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') +value: QbNumericField('attributes.value', dtype=int | float, doc='The value of the + numeric data') diff --git a/tests/orm/test_fields/fields_aiida.data.core.orbital.OrbitalData.yml b/tests/orm/test_fields/fields_aiida.data.core.orbital.OrbitalData.yml index 0f1659590f..0c130db93c 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.orbital.OrbitalData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.orbital.OrbitalData.yml @@ -18,4 +18,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.remote.RemoteData.yml b/tests/orm/test_fields/fields_aiida.data.core.remote.RemoteData.yml index 44dcbb52a3..8f2a7143a9 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.remote.RemoteData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.remote.RemoteData.yml @@ -21,4 +21,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.RemoteStashData.yml b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.RemoteStashData.yml index 96c97c1f16..d15d0e001f 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.RemoteStashData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.RemoteStashData.yml @@ -20,4 +20,4 @@ stash_mode: QbAnyField('attributes.stash_mode', dtype=, doc='T mode with which the data was stashed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.compress.RemoteStashCompressedData.yml b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.compress.RemoteStashCompressedData.yml index 7e5c7ab311..c94a097d8e 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.compress.RemoteStashCompressedData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.compress.RemoteStashCompressedData.yml @@ -3,11 +3,11 @@ attributes: QbAttributesField('attributes', dtype=, doc='The creation time of the node') -dereference: QbAnyField('attributes.dereference', dtype=, doc='The format - of the compression used when stashed') +dereference: QbBoolField('attributes.dereference', dtype=, doc='The + format of the compression used when stashed') description: QbStrField('description', dtype=, doc='The node description') extras: QbDictField('extras', dtype=dict[str, typing.Any], doc='The node extras') -fail_on_missing: QbAnyField('attributes.fail_on_missing', dtype=, doc='Whether +fail_on_missing: QbBoolField('attributes.fail_on_missing', dtype=, doc='Whether stashing should fail if any files are missing') label: QbStrField('label', dtype=, doc='The node label') mtime: QbNumericField('mtime', dtype=, doc='The modification @@ -28,4 +28,4 @@ target_basepath: QbStrField('attributes.target_basepath', dtype=, d the target basepath') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.custom.RemoteStashCustomData.yml b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.custom.RemoteStashCustomData.yml index f1b25c9e2f..e24d8f0bd8 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.custom.RemoteStashCustomData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.custom.RemoteStashCustomData.yml @@ -24,4 +24,4 @@ target_basepath: QbStrField('attributes.target_basepath', dtype=, d the target basepath') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.folder.RemoteStashFolderData.yml b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.folder.RemoteStashFolderData.yml index 3e02a7aec5..7c9d1051d9 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.remote.stash.folder.RemoteStashFolderData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.remote.stash.folder.RemoteStashFolderData.yml @@ -5,7 +5,7 @@ ctime: QbNumericField('ctime', dtype=, doc='The creat time of the node') description: QbStrField('description', dtype=, doc='The node description') extras: QbDictField('extras', dtype=dict[str, typing.Any], doc='The node extras') -fail_on_missing: QbAnyField('attributes.fail_on_missing', dtype=, doc='Whether +fail_on_missing: QbBoolField('attributes.fail_on_missing', dtype=, doc='Whether stashing should fail if any files are missing') label: QbStrField('label', dtype=, doc='The node label') mtime: QbNumericField('mtime', dtype=, doc='The modification @@ -26,4 +26,4 @@ target_basepath: QbStrField('attributes.target_basepath', dtype=, d the target basepath') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.singlefile.SinglefileData.yml b/tests/orm/test_fields/fields_aiida.data.core.singlefile.SinglefileData.yml index 79575f157f..e516b5a205 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.singlefile.SinglefileData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.singlefile.SinglefileData.yml @@ -20,4 +20,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.str.Str.yml b/tests/orm/test_fields/fields_aiida.data.core.str.Str.yml index b3527f817c..fb919ee02c 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.str.Str.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.str.Str.yml @@ -18,5 +18,5 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') value: QbStrField('attributes.value', dtype=, doc='The value of the string') diff --git a/tests/orm/test_fields/fields_aiida.data.core.structure.StructureData.yml b/tests/orm/test_fields/fields_aiida.data.core.structure.StructureData.yml index 965968fed4..88c33beb70 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.structure.StructureData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.structure.StructureData.yml @@ -13,11 +13,11 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['data.core.structure.StructureData.'], doc='The type of the node.') -pbc1: QbAnyField('attributes.pbc1', dtype=, doc='Whether periodic in +pbc1: QbBoolField('attributes.pbc1', dtype=, doc='Whether periodic in the a direction') -pbc2: QbAnyField('attributes.pbc2', dtype=, doc='Whether periodic in +pbc2: QbBoolField('attributes.pbc2', dtype=, doc='Whether periodic in the b direction') -pbc3: QbAnyField('attributes.pbc3', dtype=, doc='Whether periodic in +pbc3: QbBoolField('attributes.pbc3', dtype=, doc='Whether periodic in the c direction') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_type: QbStrField('process_type', dtype=str | None, doc='The process type of @@ -28,4 +28,4 @@ sites: QbArrayField('attributes.sites', dtype=list[dict], doc='The atomic sites' source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.data.core.upf.UpfData.yml b/tests/orm/test_fields/fields_aiida.data.core.upf.UpfData.yml index eace59fa06..7c8bb42683 100644 --- a/tests/orm/test_fields/fields_aiida.data.core.upf.UpfData.yml +++ b/tests/orm/test_fields/fields_aiida.data.core.upf.UpfData.yml @@ -20,4 +20,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.data.Data.yml b/tests/orm/test_fields/fields_aiida.node.data.Data.yml index 167acba2be..1a25d7dece 100644 --- a/tests/orm/test_fields/fields_aiida.node.data.Data.yml +++ b/tests/orm/test_fields/fields_aiida.node.data.Data.yml @@ -17,4 +17,4 @@ repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.A source: QbDictField('attributes.source', dtype=dict | None, doc='Source of the data') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.ProcessNode.yml b/tests/orm/test_fields/fields_aiida.node.process.ProcessNode.yml index 4b1adbc8b2..9625554e7f 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.ProcessNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.ProcessNode.yml @@ -15,7 +15,7 @@ label: QbStrField('label', dtype=, doc='The node label') mtime: QbNumericField('mtime', dtype=, doc='The modification time of the node') node_type: QbStrField('node_type', dtype=, doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -28,8 +28,8 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type the node') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.calculation.CalculationNode.yml b/tests/orm/test_fields/fields_aiida.node.process.calculation.CalculationNode.yml index b0294c4a14..743170b5d4 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.calculation.CalculationNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.calculation.CalculationNode.yml @@ -16,7 +16,7 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['process.calculation.CalculationNode.'], doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -29,8 +29,8 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type the node') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.calculation.calcfunction.CalcFunctionNode.yml b/tests/orm/test_fields/fields_aiida.node.process.calculation.calcfunction.CalcFunctionNode.yml index 6cf79a3943..abe0e6133e 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.calculation.calcfunction.CalcFunctionNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.calculation.calcfunction.CalcFunctionNode.yml @@ -16,7 +16,7 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['process.calculation.calcfunction.CalcFunctionNode.'], doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -29,8 +29,8 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type the node') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.calculation.calcjob.CalcJobNode.yml b/tests/orm/test_fields/fields_aiida.node.process.calculation.calcjob.CalcJobNode.yml index 2a3b8caf1b..189569defd 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.calculation.calcjob.CalcJobNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.calculation.calcjob.CalcJobNode.yml @@ -13,7 +13,7 @@ exit_message: QbStrField('attributes.exit_message', dtype=str | None, doc='The p exit_status: QbNumericField('attributes.exit_status', dtype=int | None, doc='The process exit status') extras: QbDictField('extras', dtype=dict[str, typing.Any], doc='The node extras') -imported: QbAnyField('attributes.imported', dtype=bool | None, doc='Whether the node +imported: QbBoolField('attributes.imported', dtype=bool | None, doc='Whether the node has been migrated') job_id: QbStrField('attributes.job_id', dtype=str | None, doc='The scheduler job id') label: QbStrField('label', dtype=, doc='The node label') @@ -23,7 +23,7 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['process.calculation.calcjob.CalcJobNode.'], doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -38,20 +38,20 @@ remote_workdir: QbStrField('attributes.remote_workdir', dtype=str | None, doc='T path to the remote (on cluster) scratch folder') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -retrieve_list: QbAnyField('attributes.retrieve_list', dtype=collections.abc.Sequence[str +retrieve_list: QbArrayField('attributes.retrieve_list', dtype=collections.abc.Sequence[str | tuple[str, str, int]] | None, doc='The list of files to retrieve from the remote cluster') -retrieve_temporary_list: QbAnyField('attributes.retrieve_temporary_list', dtype=collections.abc.Sequence[str +retrieve_temporary_list: QbArrayField('attributes.retrieve_temporary_list', dtype=collections.abc.Sequence[str | tuple[str, str, int]] | None, doc='The list of temporary files to retrieve from the remote cluster') scheduler_lastchecktime: QbNumericField('attributes.scheduler_lastchecktime', dtype=datetime.datetime | None, doc='The last time the scheduler was checked, in isoformat') scheduler_state: QbStrField('attributes.scheduler_state', dtype=str | None, doc='The state of the scheduler') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') state: QbStrField('attributes.state', dtype=str | None, doc='The active state of the calculation job') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.workflow.WorkflowNode.yml b/tests/orm/test_fields/fields_aiida.node.process.workflow.WorkflowNode.yml index 455a5b3b2c..b5be95f812 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.workflow.WorkflowNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.workflow.WorkflowNode.yml @@ -16,7 +16,7 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['process.workflow.WorkflowNode.'], doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -29,8 +29,8 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type the node') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.workflow.workchain.WorkChainNode.yml b/tests/orm/test_fields/fields_aiida.node.process.workflow.workchain.WorkChainNode.yml index 4aac7b82d4..15a7f0ddb5 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.workflow.workchain.WorkChainNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.workflow.workchain.WorkChainNode.yml @@ -16,7 +16,7 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['process.workflow.workchain.WorkChainNode.'], doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -29,8 +29,8 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type the node') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node') diff --git a/tests/orm/test_fields/fields_aiida.node.process.workflow.workfunction.WorkFunctionNode.yml b/tests/orm/test_fields/fields_aiida.node.process.workflow.workfunction.WorkFunctionNode.yml index 8c3d9373db..6ef4f3a285 100644 --- a/tests/orm/test_fields/fields_aiida.node.process.workflow.workfunction.WorkFunctionNode.yml +++ b/tests/orm/test_fields/fields_aiida.node.process.workflow.workfunction.WorkFunctionNode.yml @@ -16,7 +16,7 @@ mtime: QbNumericField('mtime', dtype=, doc='The modif time of the node') node_type: QbStrField('node_type', dtype=typing.Literal['process.workflow.workfunction.WorkFunctionNode.'], doc='The type of the node.') -paused: QbAnyField('attributes.paused', dtype=bool | None, doc='Whether the process +paused: QbBoolField('attributes.paused', dtype=bool | None, doc='Whether the process is paused') pk: QbNumericField('pk', dtype=, doc='The primary key of the entity') process_label: QbStrField('attributes.process_label', dtype=str | None, doc='The process @@ -29,8 +29,8 @@ process_type: QbStrField('process_type', dtype=str | None, doc='The process type the node') repository_metadata: QbDictField('repository_metadata', dtype=dict[str, typing.Any], doc='Virtual hierarchy of the file repository') -sealed: QbAnyField('attributes.sealed', dtype=, doc='Whether the node +sealed: QbBoolField('attributes.sealed', dtype=, doc='Whether the node is sealed') user: QbNumericField('user', dtype=, doc='The PK of the user who owns the node') -uuid: QbAnyField('uuid', dtype=, doc='The UUID of the node') +uuid: QbStrField('uuid', dtype=, doc='The UUID of the node')