PyI40AAS issueshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues2022-01-20T18:13:00+01:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/152Example AAS with constraint violation2022-01-20T18:13:00+01:00Igor GarmaevExample AAS with constraint violationOperationVariable in ExampleOperation-Object from create_full_example() has kind=ModelingType.INSTANCE. It is a Constraint violation.OperationVariable in ExampleOperation-Object from create_full_example() has kind=ModelingType.INSTANCE. It is a Constraint violation.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/150IEC61360ConceptDescription recognized as ConceptDescription2022-01-19T07:38:33+01:00Igor GarmaevIEC61360ConceptDescription recognized as ConceptDescription"Weight" IEC61360ConceptDescription in [17_ABB.aasx](http://www.admin-shell-io.com/samples/aasx/17_ABB.aasx) is recognized as ConceptDescription."Weight" IEC61360ConceptDescription in [17_ABB.aasx](http://www.admin-shell-io.com/samples/aasx/17_ABB.aasx) is recognized as ConceptDescription.Leon Mauritz MöllerLeon Mauritz Möllerhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/145Fix id_short checks and default values2021-11-10T17:23:25+01:00Michael ThiesFix id_short checks and default valuesid_short constraint checks are broken on multiple branches. Additionally, they seem not to be standard compliant w.r.t. optional/mandatory-ness. And, the default value for optional id_short attributes in the constructor arguments (on V3....id_short constraint checks are broken on multiple branches. Additionally, they seem not to be standard compliant w.r.t. optional/mandatory-ness. And, the default value for optional id_short attributes in the constructor arguments (on V3.0RC02) should not be "NotSet", but None.
For mandatory id_short (according to the standard) we could still allow `id_short == None` as long as the object is not part of a Namespace (i.e. as long as `parent is None`).https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/134NamespaceSet: update_nss_from() on V30RC01 does not update Qualifiers and Ext...2021-02-22T12:25:17+01:00Michael ThiesNamespaceSet: update_nss_from() on V30RC01 does not update Qualifiers and Extensions correctlyThis issue is only relevant for the V30RC01 branch.
In the current version of the improve/V30RC01-branch, the `update_nss_from()` method of NamespaceSets does not consider Qualifiers and Extensions correctly. If a Referable object with ...This issue is only relevant for the V30RC01 branch.
In the current version of the improve/V30RC01-branch, the `update_nss_from()` method of NamespaceSets does not consider Qualifiers and Extensions correctly. If a Referable object with Qualifiers or Extensions is updated from another Referable object, only new and deleted Qualifiers/Extensions will be updated, whereas changed Qualifiers/Extensions are not updated. This is due to the missing code in `base.py` near line 1477: https://git.rwth-aachen.de/acplt/pyi40aas/-/blob/6711a5bb3f9d951e59d3c4311600b1b5a6413bd1/aas/model/base.py#L1477
Since Qualifiers and Extensions are not Referable and thus have no `update_from()` method, we cannot update them recursively. Instead, we should just replace the old objects with the new ones. In fact, this simplyfies the whole `update_nss_from()` behaviour: We don't have to divide into new, deleted and update Qualifiers/Extensions, but instead, we can simply remove all of these objects from `self` and move all of the ones from `other` into `self`. Thus, I propose to add a high-level `if` statement, that checks if the NamespaceSet uses the `id_short` attribute for identification: If it does, we can use the old behaviour of `update_nss_from()` (we don't even need to check the type of the objects), if not, we should use the simplified updating (deleting and moving).Leon Mauritz MöllerLeon Mauritz Möllerhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/133model: Uniqueness checks are not functional2021-02-22T09:59:23+01:00Leon Mauritz Möllermodel: Uniqueness checks are not functional`Referable.update_from()` patches the `self` object with the `other` object by iterating over the attributes of the `other` objects using the python built-in `vars()`. `vars()` only iterates over an objects attributes, not properties e.g...`Referable.update_from()` patches the `self` object with the `other` object by iterating over the attributes of the `other` objects using the python built-in `vars()`. `vars()` only iterates over an objects attributes, not properties e.g. getter/setter functions. The `id_short` attribute of `Referable` is a property, which performs additional checks when setting the `id_short`, such as checking for uniqueness within the namespace by searching the objects contained in the `parent` object. The actual value of the `id_short` is stored in the protected attribute `_id_short`.
Since `_id_short` is an attribute and `id_short` is a property, the `vars()` built-in returns the `_id_short` attribute instead of the `id_short` property, which causes `update_from()` to update the `_id_short` directly, skipping the setter function and thus the uniqueness check.
This is also the case for the `semantic_id` property of `HasSemantics`, which also checks for uniqueness.
A solution proposed by @sebastian.heppner and @mhthies is to add dictionaries to each class, mapping the protected attributes to the respective property. These dictionaries would then be searched by `update_from()`, which can then set the property instead of the attribute.
---
Another issue is that this uniqueness check is not performed for objects contained in one or more `AbstractObjectStore`, because these are not referenced by the `parent` attribute.
---
The third and final issue is located in `NamespaceSet.update_nss_from()`. [...]
---
Each fix has to be backported to the not yet existent `V2.0` branch.
**Progress Tracker:**
- [ ] Uniqueness not checked in `Referable.update_from()`
- [ ] No uniqueness check for objects inside an `AbstractObjectStore`
- [ ] `NamespaceSet.update_nss_from()`https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/124model: Fix docstring of AASReference.__init__ w.r.t. to target_type parameter2021-10-28T21:12:49+02:00Igor Garmaevmodel: Fix docstring of AASReference.__init__ w.r.t. to target_type parameterDelete `target_type` parameter in `__init__` of `AASReference`. Use for `type` type of last element of `key`.
If it is not possible, please fix doc of `__init__`: replace "type_" with "target_type"Delete `target_type` parameter in `__init__` of `AASReference`. Use for `type` type of last element of `key`.
If it is not possible, please fix doc of `__init__`: replace "type_" with "target_type"