Lehrstuhl für Informations- und Automatisierungssysteme issueshttps://git.rwth-aachen.de/groups/acplt/-/issues2021-01-12T13:33:19+01:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/118model: Implement Constraint AASd-026: check for duplicate semanticID in Colle...2021-01-12T13:33:19+01:00Michael Thiesmodel: Implement Constraint AASd-026: check for duplicate semanticID in Collections with allowDuplicates=falseSooner or later, we need to implement some look-up mechanism for SubmodelElements by semanticId to provide the relevant API methods. When we implemented this, we can use it to check the constraint as well.
In conjunction with #121Sooner or later, we need to implement some look-up mechanism for SubmodelElements by semanticId to provide the relevant API methods. When we implemented this, we can use it to check the constraint as well.
In conjunction with #121Torben MinyTorben Minyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/119Remove Asset object2021-10-28T21:15:44+02:00Michael ThiesRemove Asset objectAfter updating to DotAAS version 3.0-rc1, we can remove the Asset object from our model, since it does not provide any information anymore.
To do so, we should:
* remove class `Asset`
* drop Assets in deserialized files silently
* still...After updating to DotAAS version 3.0-rc1, we can remove the Asset object from our model, since it does not provide any information anymore.
To do so, we should:
* remove class `Asset`
* drop Assets in deserialized files silently
* still, add an empty `Assets` list to serlized files to stay compliant to the schemas
* remove KeyElements.ASSET
* change Keys with type==Asset to type==GlobalReference in deserialized files silently
* Mention how we handled assets in (module) docstring(s)https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/120aasx.writer: Add searching and adding referenced ConceptDescriptions to write...2021-01-12T13:38:58+01:00Michael Thiesaasx.writer: Add searching and adding referenced ConceptDescriptions to write_aashttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/121model: Implement CustomSet() with Objekts unique by definied attribute2021-01-12T13:32:15+01:00Torben Minymodel: Implement CustomSet() with Objekts unique by definied attributeFor HasExtension and Qualifiable custom sets are needed that contain objects that are unique based on an attribute.
The sets have to be similar to the namespace set, which contains referable objects unique by idshort.
Maybe there is an...For HasExtension and Qualifiable custom sets are needed that contain objects that are unique based on an attribute.
The sets have to be similar to the namespace set, which contains referable objects unique by idshort.
Maybe there is an elegant way to make it generic, so that dublicated code can be avoid.
In conjunction with #118Torben MinyTorben Minyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/122XSD: change `xs:sequence` to `xs:all`2021-01-20T11:08:21+01:00Leon Mauritz MöllerXSD: change `xs:sequence` to `xs:all`The XSD currently uses `xs:sequence` to define attributes of types. This requires the children of elements in XML documents to be in the exact same order as defined in the XSD, which results in the unnecessary work of re-ordering code-bl...The XSD currently uses `xs:sequence` to define attributes of types. This requires the children of elements in XML documents to be in the exact same order as defined in the XSD, which results in the unnecessary work of re-ordering code-blocks in serialization adapters, as seen in !67. Changing `xs:sequence` to `xs:all` would remove this limitation, allowing children in any order to be valid against the schema.
On the other hand I could see why you would want a certain order of elements. For example when manually inspecting XML documents (which can get quite large), a fixed order of elements would make objects easier to grasp.
But then again, you would most likely use XPath or good XML viewers to view such documents anyways.
What's your opinion on this?
forwarded to DotAAS-Group: [Issue 20](https://github.com/admin-shell-io/aas-specs/issues/20)https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/123Add typehint to SubmodelElementCollection.ordered2021-11-09T12:37:27+01:00Igor GarmaevAdd typehint to SubmodelElementCollection.orderedAdd typehint to SubmodelElementCollection.orderedAdd typehint to SubmodelElementCollection.orderedhttps://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"https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/125model: Refereable._set_id_short should change the id_short entry in the Names...2021-02-01T10:35:36+01:00Michael Thiesmodel: Refereable._set_id_short should change the id_short entry in the Namespace's _backend dictCurrently we only check for duplicate id_shorts in the same Namespace, when an id_short is changed (#100). However, we must also update the NamespaceSet with the new id_short of the Referable object to ensure correct duplicate checking a...Currently we only check for duplicate id_shorts in the same Namespace, when an id_short is changed (#100). However, we must also update the NamespaceSet with the new id_short of the Referable object to ensure correct duplicate checking and id_short-resolving in the future.
This must also be implemented for other unique attributes in the future (see #121).Torben MinyTorben Minyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/126model: Add Iterable[...] with correct specialization as base class of Namespa...2021-01-12T13:30:48+01:00Michael Thiesmodel: Add Iterable[...] with correct specialization as base class of Namespace and inheriting classeshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/127model: Referable.update_from() not working properly for contained Referable o...2021-01-27T13:47:54+01:00Ghost Usermodel: Referable.update_from() not working properly for contained Referable objectsHi there,
I was testing the examples folder - especially the backend couchdb part - and there is a problem with the line `example_submodel1.update()`. Lines above that work fine. Seems like there is something wrong with `.update()` and ...Hi there,
I was testing the examples folder - especially the backend couchdb part - and there is a problem with the line `example_submodel1.update()`. Lines above that work fine. Seems like there is something wrong with `.update()` and `.commit()` ?
I'm receiving these errors:
```
PS C:\Users\samed\Desktop\pyi40aas\aas\examples> & "C:/Program Files/Python37/python.exe" "c:/Users/samed/Desktop/pyi40aas/aas/examples/tutorial_backend_couchdb.py"
Traceback (most recent call last):
File "C:\Users\samed\AppData\Roaming\Python\Python37\site-packages\aas\backend\backends.py", line 154, in get_backend
return _backends_map[scheme]
KeyError: 'couchdb'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:/Users/samed/Desktop/pyi40aas/aas/examples/tutorial_backend_couchdb.py", line 118, in <module>
example_submodel1.update()
File "C:\Users\samed\AppData\Roaming\Python\Python37\site-packages\aas\model\base.py", line 507, in update
backends.get_backend(self.source).update_object(updated_object=self,
File "C:\Users\samed\AppData\Roaming\Python\Python37\site-packages\aas\backend\backends.py", line 156, in get_backend
raise UnknownBackendException("Could not find Backend for source '{}'".format(url)) from e
aas.backend.backends.UnknownBackendException: Could not find Backend for source 'couchdb://localhost:5984/aas_test/IRI-http%3A%2F%2Facplt.org%2FSubmodels%2FAssets%2FTestAsset%2FIdentification'
```
Thanks and kind regards,
Samedhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/128Add reprs for classes GDay, GMonth, GMonthDay, GYearMonth, GYear2021-01-25T14:25:23+01:00Igor GarmaevAdd reprs for classes GDay, GMonth, GMonthDay, GYearMonth, GYearAdd reprs for classes GDay, GMonth, GMonthDay, GYearMonth, GYear in model/datatypes.pyAdd reprs for classes GDay, GMonth, GMonthDay, GYearMonth, GYear in model/datatypes.pyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/129Add remove_file() in AbstractSupplementaryFileContainer class2021-01-25T14:41:25+01:00Igor GarmaevAdd remove_file() in AbstractSupplementaryFileContainer classAdd function `remove_file(self, name: str)` to the class `AbstractSupplementaryFileContainer` as it needs a functionality to delete files that are already placed in a container.Add function `remove_file(self, name: str)` to the class `AbstractSupplementaryFileContainer` as it needs a functionality to delete files that are already placed in a container.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/130Add property.setter for attributes of type NamespaceSet2021-01-25T16:24:07+01:00Igor GarmaevAdd property.setter for attributes of type NamespaceSetAll classes that inherit from class Namespace should have property.setter for each NamespaceSet attribute, so that each NamespaceSet attribute can be set with iterable object.
Example:
```
shell = AssetAdministrationShell(asset, identif...All classes that inherit from class Namespace should have property.setter for each NamespaceSet attribute, so that each NamespaceSet attribute can be set with iterable object.
Example:
```
shell = AssetAdministrationShell(asset, identification)
...
shell.view = [view1, view2, view3]
...
shell.view = (view1, view2)
```https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/131examples: These tutorials need updating2021-01-27T14:10:14+01:00Sebastian Heppners.heppner@iat.rwth-aachen.deexamples: These tutorials need updating- [ ] `tutorial_dynamic_model`: does not exist
- [ ] `docs/source/tutorials/tutorial_serialization_deserialization.rst`: Fix missing link to `tutorial_dynamic_model`
- [ ] `tutorial_create_simple_aas`: Introduction is outdated
- [ ] `tut...- [ ] `tutorial_dynamic_model`: does not exist
- [ ] `docs/source/tutorials/tutorial_serialization_deserialization.rst`: Fix missing link to `tutorial_dynamic_model`
- [ ] `tutorial_create_simple_aas`: Introduction is outdated
- [ ] `tutorial_serialization_deserialization`: Step 1 is outdated
One problem, that we currently have with the tutorials, is that we have to maintain two versions. Firstly, the `examples.tutorial` python modules and secondly the `docs/source/tutorials/*.rst` restructured text files. When we begin to host the documentation, I would propose we only keep the restructured text ones.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/132xml: IndexError when parsing XML with empty <qualifier/> tags2021-02-01T17:58:25+01:00Ghost Userxml: IndexError when parsing XML with empty <qualifier/> tagsI used the AASX Package Explorer (version 2021-01-16.alpha) to create a minimal AASX file with one asset, one AAS, one submodel and one property (see [test1.aasx](/uploads/d8346c248f78415c28e5a5f025cfe7f7/test1.aasx)). When opening the ...I used the AASX Package Explorer (version 2021-01-16.alpha) to create a minimal AASX file with one asset, one AAS, one submodel and one property (see [test1.aasx](/uploads/d8346c248f78415c28e5a5f025cfe7f7/test1.aasx)). When opening the file with PyI40AAS, I get an `IndexError`:
```
Traceback (most recent call last):
File "open-aas.py", line 16, in <module>
reader.read_into(object_store, file_store)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\aasx.py", line 139, in read_into
self._read_aas_part_into(aas_part, object_store, file_store, read_identifiables, override_existing)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\aasx.py", line 180, in _read_aas_part_into
for obj in self._parse_aas_part(part_name):
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\aasx.py", line 210, in _parse_aas_part
return read_aas_xml_file(p)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 1398, in read_aas_xml_file
read_aas_xml_file_into(object_store, file, **kwargs)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 1366, in read_aas_xml_file_into
for element in _child_construct_multiple(list_, element_tag, constructor, decoder_.failsafe):
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 326, in _failsafe_construct_multiple
parsed = _failsafe_construct(element, constructor, failsafe, **kwargs)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 280, in _failsafe_construct
return constructor(element, **kwargs)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 982, in construct_submodel
constructed = _failsafe_construct(submodel_element[0], cls.construct_submodel_element, cls.failsafe)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 280, in _failsafe_construct
return constructor(element, **kwargs)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 665, in construct_submodel_element
return cls.construct_data_element(element, abstract_class_name="SubmodelElement", **kwargs)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 685, in construct_data_element
return data_elements[element.tag](element, **kwargs)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 851, in construct_property
cls._amend_abstract_attributes(property_, element)
File "c:\users\krahlro\venv\aas\src\pyi40aas\aas\adapter\xml\xml_deserialization.py", line 446, in _amend_abstract_attributes
constructed = _failsafe_construct(constraint[0], cls.construct_constraint, cls.failsafe)
File "src\lxml\etree.pyx", line 1161, in lxml.etree._Element.__getitem__
IndexError: list index out of range
```
This is the code I used to open the file:
```python
filename = sys.argv[1]
try:
object_store = model.DictObjectStore()
file_store = aasx.DictSupplementaryFileContainer()
with aasx.AASXReader(filename) as reader:
reader.read_into(object_store, file_store)
cp = reader.get_core_properties()
print(filename, "SUCCESS", cp, sep="\t")
except:
print(filename, "ERROR", sep="\t", flush=True)
traceback.print_exc()
```
The error occurs both with the 0.2.0 release and the current development version 852c6f0a2571407030d9d49c8d72189a52dc9a85.https://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/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/rte-tools/rte/-/issues/1Build with OV_VALGRIND fails2021-03-18T23:01:03+01:00Michael ThiesBuild with OV_VALGRIND failsWhen enabling OV_VALGRIND, the OV build fails with the following error.
Compiler: gcc (Debian 8.3.0-6) 8.3.0
```txt
rte/core/ov/source/ov_vendortree.c:113:28: error: ‘ov_vendortree_getUseMalloc’ undeclared here (not in a function); did...When enabling OV_VALGRIND, the OV build fails with the following error.
Compiler: gcc (Debian 8.3.0-6) 8.3.0
```txt
rte/core/ov/source/ov_vendortree.c:113:28: error: ‘ov_vendortree_getUseMalloc’ undeclared here (not in a function); did you mean ‘ov_vendortree_getRTAlloc’?
{ "use_malloc", NULL, ov_vendortree_getUseMalloc, ov_vendortree_setUseMalloc },
^~~~~~~~~~~~~~~~~~~~~~~~~~
ov_vendortree_getRTAlloc
rte/core/ov/source/ov_vendortree.c:113:56: error: ‘ov_vendortree_setUseMalloc’ undeclared here (not in a function); did you mean ‘ov_vendortree_getRTAlloc’?
{ "use_malloc", NULL, ov_vendortree_getUseMalloc, ov_vendortree_setUseMalloc },
^~~~~~~~~~~~~~~~~~~~~~~~~~
ov_vendortree_getRTAlloc
```https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/135Get back Namespace base class in V30RC012021-04-09T17:13:29+02:00Igor GarmaevGet back Namespace base class in V30RC01The `get_referable`/`get_object_by_semantic_id` and `remove_referable`/`remove_object_by_semantic_id` functions are almost the same in classes `UniqueIdShortNamespace` and `UniqueSemanticIdNamespace`. It would be reasonable to add `Name...The `get_referable`/`get_object_by_semantic_id` and `remove_referable`/`remove_object_by_semantic_id` functions are almost the same in classes `UniqueIdShortNamespace` and `UniqueSemanticIdNamespace`. It would be reasonable to add `Namespace` base class with private methods that would generalize the get/remove funcs. These would then be reused in subclasses `UniqueIdShortNamespace` and `UniqueSemanticIdNamespace`Torben MinyTorben Minyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/136Update project structure in README.md2021-04-12T11:47:43+02:00Igor GarmaevUpdate project structure in README.mdAdd submodul `aas.backends` and his description to `Project Structure` part in README.MDAdd submodul `aas.backends` and his description to `Project Structure` part in README.MD