From 777cec08c1e80815e93a6954ce6f786fa20b166a Mon Sep 17 00:00:00 2001 From: s-heppner Date: Mon, 13 Jan 2025 10:19:44 +0100 Subject: [PATCH] V3.1: Remove AASd-090 Since `Referable.category` has been deprecated in the metamodel, we remove the now unnecessary invariant `AASd-090` about `Data_element.category`. See [aas-specs#514]. [aas-specs#514]: https://github.com/admin-shell-io/aas-specs/issues/514 --- aas_core_meta/v3_1.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/aas_core_meta/v3_1.py b/aas_core_meta/v3_1.py index 45592fe..5589445 100644 --- a/aas_core_meta/v3_1.py +++ b/aas_core_meta/v3_1.py @@ -2954,26 +2954,8 @@ def __init__( self.value = value -Valid_categories_for_data_element: Set[str] = constant_set( - values=[ - "CONSTANT", - "PARAMETER", - "VARIABLE", - ], - description="""\ -Categories for :class:`Data_element` as defined in :constraintref:`AASd-090`""", -) - - # fmt: off @abstract -@invariant( - lambda self: - not (self.category is not None) - or self.category in Valid_categories_for_data_element, - "Constraint AASd-090: For data elements category shall be one " - "of the following values: CONSTANT, PARAMETER or VARIABLE.", -) # fmt: on class Data_element(Submodel_element): """ @@ -2982,13 +2964,6 @@ class Data_element(Submodel_element): A data element is a submodel element that has a value. The type of value differs for different subtypes of data elements. - - :constraint AASd-090: - - For data elements :attr:`category` shall be one of the following - values: ``CONSTANT``, ``PARAMETER`` or ``VARIABLE``. - - Default: ``VARIABLE`` """ def __init__( @@ -3018,14 +2993,6 @@ def __init__( embedded_data_specifications=embedded_data_specifications, ) - @implementation_specific - @non_mutating - @ensure(lambda result: result in Valid_categories_for_data_element) - def category_or_default(self) -> str: - # NOTE (mristin, 2022-04-7): - # This implementation will not be transpiled, but is given here as reference. - return self.category if self.category is not None else "VARIABLE" - # fmt: off @invariant(