Lehrstuhl für Informations- und Automatisierungssysteme issueshttps://git.rwth-aachen.de/groups/acplt/-/issues2021-01-05T10:12:08+01:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/100model: Check idShort on change for duplicates in parent namespace2021-01-05T10:12:08+01:00Michael Thiesmodel: Check idShort on change for duplicates in parent namespacehttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/82XSD: prohibit empty strings for mandatory attributes2021-01-04T14:15:36+01:00Leon Mauritz MöllerXSD: prohibit empty strings for mandatory attributesThe current XSD Schema (v2.0.1) allows empty strings for mandatory values like `mimeType` of `blob_t` or `valueType` of `property_t`. This is because their types are given as `string`, which allows empty strings by default.
Possible fi...The current XSD Schema (v2.0.1) allows empty strings for mandatory values like `mimeType` of `blob_t` or `valueType` of `property_t`. This is because their types are given as `string`, which allows empty strings by default.
Possible fixes would be defining their minimum length as 1 or explicitely defining their allowed values. The latter would be quite a long list for `mimeType`, but certainly possible for `valueType`.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/113Make DictSupplementaryFileContainer iterable2020-11-25T10:42:59+01:00Igor GarmaevMake DictSupplementaryFileContainer iterableThe class `DictSupplementaryFileContainer` which will be used as file store is currently not iterable. I think it would make sense make it iterable through `_name_map`. Now it is not possible to get any file stored in `DictSupplementaryF...The class `DictSupplementaryFileContainer` which will be used as file store is currently not iterable. I think it would make sense make it iterable through `_name_map`. Now it is not possible to get any file stored in `DictSupplementaryFileContainer` with public methods or members without filenamehttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/110make `Namespace` iterable2020-11-25T10:42:59+01:00Leon Mauritz Möllermake `Namespace` iterable@zrgt suggested on Zulip, that classes like `Submodel` and `SubmodelElementCollection` should be iterable.
@mhthies suggested to make Namespaces iterable with an implementation similar to the following:
```py
class Namespace:
[…]
...@zrgt suggested on Zulip, that classes like `Submodel` and `SubmodelElementCollection` should be iterable.
@mhthies suggested to make Namespaces iterable with an implementation similar to the following:
```py
class Namespace:
[…]
def __iter__(self):
return itertools.chain.from_iterable(self.namespace_element_sets)
```
This would make all classes which inherit from `Namespace` iterable over their contained `NamespaceSet`s, namely `AssetAdministrationShell`, `Submodel`, `SubmodelElementCollection`, `AnnotatedRelationshipElement` and `Entity`.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/97model: Remove `_`-suffix from parameters of `__init__` functions2020-11-25T10:42:57+01:00Leon Mauritz Möllermodel: Remove `_`-suffix from parameters of `__init__` functionsRemove `_`-suffix from parameters like `submodel_` and `security_` in the `__init__` function of all classes of the `model`, as Igor suggested on Zulip.Remove `_`-suffix from parameters like `submodel_` and `security_` in the `__init__` function of all classes of the `model`, as Igor suggested on Zulip.Stable library APIhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/95model: Make abstract classes really abstract2020-11-25T10:42:57+01:00Igor Garmaevmodel: Make abstract classes really abstractNow all classes that are meant to be abstract are instantiable. That means they are not abstract. To solve the issue these classes must have abstract methods. I suggest to make `__init__` abstract for all these classesNow all classes that are meant to be abstract are instantiable. That means they are not abstract. To solve the issue these classes must have abstract methods. I suggest to make `__init__` abstract for all these classeshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/98model: Bug in __repr__ of AdministrativeInformation2020-11-25T10:42:56+01:00Igor Garmaevmodel: Bug in __repr__ of AdministrativeInformationi is missed in "AdminstrativeInformation"
```python
def __repr__(self) -> str:
return "AdminstrativeInformation(version={}, revision={})".format(self.version, self.revision)
```i is missed in "AdminstrativeInformation"
```python
def __repr__(self) -> str:
return "AdminstrativeInformation(version={}, revision={})".format(self.version, self.revision)
```https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/111compliance tool: Delete function "check if a given xml or json file is compli...2020-11-19T14:26:00+01:00Torben Minycompliance tool: Delete function "check if a given xml or json file is compliant to the official schema"This function suggests that a file conforms to the schema, but this is not true since many constraints are not included in the schema.This function suggests that a file conforms to the schema, but this is not true since many constraints are not included in the schema.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/99model: Most repr() funcs don't fulfill the requirement obj == eval(repr(obj))2020-11-16T15:08:43+01:00Igor Garmaevmodel: Most repr() funcs don't fulfill the requirement obj == eval(repr(obj)) Most repr() funcs of classes don't fulfill the requirement obj == eval(repr(obj))
For example:
repr of Key:
Current:
```python
def __repr__(self) -> str:
return "Key(local={}, id_type={}, value={})".format(self.local, sel... Most repr() funcs of classes don't fulfill the requirement obj == eval(repr(obj))
For example:
repr of Key:
Current:
```python
def __repr__(self) -> str:
return "Key(local={}, id_type={}, value={})".format(self.local, self.id_type.name, self.value)
```
Should be:
```python
def __repr__(self) -> str:
return "Key(type_={}, local={}, id_type={}, value={})".format(self.type, self.local, self.id_type.name, repr(self.value))
```
repr of Identifiable:
Current version looks like __str__ but not __repr__:
```python
def __repr__(self) -> str:
return "Identifier({}={})".format(self.id_type.name, self.id)
```
Should be:
```python
def __str__(self) -> str:
return "Identifier({}={})".format(self.id_type.name, self.id)
def __repr__(self) -> str:
return "Identifier(id_={}, id_type={})".format(repr(self.id), self.id_type.name)
```https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/78couchdb: Implement `update()` and `commit()` for all CouchDB objects2020-11-10T10:15:27+01:00Michael Thiescouchdb: Implement `update()` and `commit()` for all CouchDB objectsSebastian Heppners.heppner@iat.rwth-aachen.deSebastian Heppners.heppner@iat.rwth-aachen.dehttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/81aasx: Fix handling of File objects which refer to external URLs2020-11-06T10:53:50+01:00Michael Thiesaasx: Fix handling of File objects which refer to external URLsIt's currently unclear, what kind of values a `File` object may contain and how they should be interpreted. Probably, they are allowed to hold a full URL which refers to some webserver etc. as an alternative to relative and absolute path...It's currently unclear, what kind of values a `File` object may contain and how they should be interpreted. Probably, they are allowed to hold a full URL which refers to some webserver etc. as an alternative to relative and absolute paths (`./some_file.pdf` resp. `/some/path/to/some_file.pdf`), which refer to a local file.
We currently assume that all `File` objects within an AASX package refer to a supplementary file within that package. Thus, reading an AASX package file fails when it contains a `File` object refering to an external file via URL.
To fix that, we should distinguish between local and external references. However, currently the semantics of the `File.value` attribute's values are not clear from the standard (DotAAS), so we can only guess that the existence of the URL schema is the correct criterion.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/68Add AASX checks for compliance tool including tests2020-11-06T10:53:50+01:00Torben MinyAdd AASX checks for compliance tool including testshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/63adapter: Change JSON and XML parser interface to add objects directly into a ...2020-11-02T16:31:24+01:00Michael Thiesadapter: Change JSON and XML parser interface to add objects directly into a given AbstractObjectStoreThis allows to use a CouchDBObjectStore or other database-backed ObjectStores without collecting the objects in memory first.
The parser functions should return a set of Identifiers of the parsed objects instead.
See `aas.adapter.aasx....This allows to use a CouchDBObjectStore or other database-backed ObjectStores without collecting the objects in memory first.
The parser functions should return a set of Identifiers of the parsed objects instead.
See `aas.adapter.aasx.AASXReader.read_into()` [LINK](https://git.rwth-aachen.de/acplt/pyi40aas/-/blob/6278d03f6bbb5b22e707dc054382844f05794a3e/aas/adapter/aasx.py#L107), which already has a similar interface.
Progress:
- [x] JSON Deserialization
- [x] XML DeserializationStable library APIhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/107aasx: OPCPackageWriter.write_relationships() is called twice when submodel_sp...2020-11-02T15:02:36+01:00Leon Mauritz Mölleraasx: OPCPackageWriter.write_relationships() is called twice when submodel_split_parts is TrueThe following warnings are logged when running the AASX tests:
```
/usr/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'aasx/https___acplt_org_Test_AssetAdministrationShell/_rels/https___acplt_org_Test_AssetAdministrationShe...The following warnings are logged when running the AASX tests:
```
/usr/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'aasx/https___acplt_org_Test_AssetAdministrationShell/_rels/https___acplt_org_Test_AssetAdministrationShell.aas.xml.rels'
return self._open_to_write(zinfo, force_zip64=force_zip64)
/usr/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'aasx/https___acplt_org_Test_AssetAdministrationShell/_rels/https___acplt_org_Test_AssetAdministrationShell.aas.json.rels'
return self._open_to_write(zinfo, force_zip64=force_zip64)
```
These are caused by `AASXWriter.write_aas()` calling `write_relationships()` by itself when `submodel_split_parts` is `True`. Since `write_aas()` also calls `write_aas_objects()`, which also writes relationships, this results in two calls to `write_relationships()` for the same AAS, which in turn results in duplicate names being written to the file.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/85Improved update()/commit() functionality2020-11-02T09:16:47+01:00Michael ThiesImproved update()/commit() functionalityWe plan a full redesign of the `update()`/`commit()` functionality of AAS objects for synchronization with an external data source.
* Instead of overriding these functions for different data sources, all `Referable` objects will include...We plan a full redesign of the `update()`/`commit()` functionality of AAS objects for synchronization with an external data source.
* Instead of overriding these functions for different data sources, all `Referable` objects will include a `source` attribute with an URI representation of their data source. The URI's schema is used to determine the correct backend/client.
* `update()` and `commit()` should always effect the object itself and all (recursively) included objects
* If the object itself has no data source/backend itself, the next higher object with a data source is used to update the object's data.
* After the update, all included objects that are linked with an own data source are updated recursively in a top-down manner.
* An object is always committed to its own data source and the data sources of all its ancestors in the object hierarchy.
* The included objects are committed recursively. (TODO: Define order of committing.)Stable library APISebastian Heppners.heppner@iat.rwth-aachen.deSebastian Heppners.heppner@iat.rwth-aachen.dehttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/94aasx: Allow manual specification objects to be written to package2020-10-28T17:12:35+01:00Michael Thiesaasx: Allow manual specification objects to be written to packagehttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/88Inability to test for parameter `relative_path` in calls of `backends.Backend...2020-10-28T17:08:35+01:00Sebastian Heppners.heppner@iat.rwth-aachen.deInability to test for parameter `relative_path` in calls of `backends.Backend.update_object()` and `backends.Backend.commit_object()` from `model.base.Referable` using `unittest.mock.Mock`Especially during execution of the `model.base.Referable.commit()` function, the `relative_path` variable is built iteratively by traversing the Referable-tree. Whenever there is a nonempty source, the `backends.Backend.commit_object()` ...Especially during execution of the `model.base.Referable.commit()` function, the `relative_path` variable is built iteratively by traversing the Referable-tree. Whenever there is a nonempty source, the `backends.Backend.commit_object()` function is called with the current `relative_path`. Therefore, the `relative_path` variable is likely to change after a call. This is impractical, because `unittest.mock.call` seems to only log a reference to the variables that were used in that call, rather than saving a duplicate of the current state of those variables during function call.
Here is a minimal example that shows this behavior:
```
from unittest import mock
test_mock = mock.Mock()
test_parameter = ["only_entry_of_this_list"]
test_mock(argument=test_parameter)
test_parameter.append("another_entry_of_this_list")
test_mock.assert_has_calls([mock.call(argument=["only_entry_of_this_list"])])
```
leads to:
```
AssertionError: Calls not found.
Expected: [call(argument=['only_entry_of_this_list'])]
Actual: [call(argument=['only_entry_of_this_list', 'another_entry_of_this_list'])]
```
Therefore, it is impossible to check, if the `relative_path` has been correct during the time of the function call, using the `unittest.mock.Mock`-object.
While I have reviewed with the debugger, that the function gets called with the correct `relative_path` at each time, I don't see a way to "prove it" using unittests, without altering the actual code to allow for testing, which in my opinion shouldn't really be done.Sebastian Heppners.heppner@iat.rwth-aachen.deSebastian Heppners.heppner@iat.rwth-aachen.dehttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/75Change name of `timeout` parameter of update method2020-10-28T17:08:34+01:00Michael ThiesChange name of `timeout` parameter of update methodThe `timeout` is more like a "caching expiration timeout" of the object, not a timeout for the actual update.
Thus, we should rename it to avoid confusion.
Maybe we can introduce an additional (optional) timout parameter for the actual...The `timeout` is more like a "caching expiration timeout" of the object, not a timeout for the actual update.
Thus, we should rename it to avoid confusion.
Maybe we can introduce an additional (optional) timout parameter for the actual update (e.g. the HTTP timeout for the HTTP client and CouchDB client).Stable library APIhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/83model: ReferenceElement.value should have type Reference instead of AASReference2020-10-28T16:59:11+01:00Michael Thiesmodel: ReferenceElement.value should have type Reference instead of AASReferenceDotAAS describes the `value` attribute as follows:
> Reference to any other referable element of the same of any other AAS or a reference to an external object or entity.
Thus, References to other objects/entities than AAS objects are ...DotAAS describes the `value` attribute as follows:
> Reference to any other referable element of the same of any other AAS or a reference to an external object or entity.
Thus, References to other objects/entities than AAS objects are also allowed.
This needs to be fixed in the deserialization adapters as well.ahttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/105object store: Add functionality to get a referable object by path (Identifica...2020-10-28T16:44:53+01:00Torben Minyobject store: Add functionality to get a referable object by path (Identification, List(IdShort))