Lehrstuhl für Informations- und Automatisierungssysteme issueshttps://git.rwth-aachen.de/groups/acplt/-/issues2021-01-12T13:35:39+01:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/102Add optional serialization of `Referable.source`-attribute in JSON and XML2021-01-12T13:35:39+01:00Sebastian Heppners.heppner@iat.rwth-aachen.deAdd optional serialization of `Referable.source`-attribute in JSON and XMLIt is advantageous to be able to store source information in backends, for example for a Property with a deviating source (e.g. a sensor) compared to the rest of the AAS this property is part of.
Both the JSON and XML (de-)serializatio...It is advantageous to be able to store source information in backends, for example for a Property with a deviating source (e.g. a sensor) compared to the rest of the AAS this property is part of.
Both the JSON and XML (de-)serialization offer the option of adding optional additional content. The JSON schema specifically allows this, while the XML schema allows the adding of attributes to already existing elements. Therefore we would not loose schema compliance by adding the source information to the JSON and XML files.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/101model: Add string serialization/deserialization of Reference objects accordin...2021-01-12T13:36:19+01:00Michael Thiesmodel: Add string serialization/deserialization of Reference objects according to DotAAS sec. 5.2.1In Details of the Asset Administration Shell, section 5.2.1 (p. 95), a cannonical string representation of `Reference` objects is presented:
> In some mapping or serializations the Type “Reference” is converted into a single string. In ...In Details of the Asset Administration Shell, section 5.2.1 (p. 95), a cannonical string representation of `Reference` objects is presented:
> In some mapping or serializations the Type “Reference” is converted into a single string. In this case we recommend to use the following serilization:
>
> ```
> <Reference> ::= <Key>{,<Key>}*
> <Key> ::= (<KeyType>)(<Local>)[<KeyIdType>]<KeyValue>
> <KeyType> ::= value of AAS:Key/type
> <Local> ::= local | no-local
> <KeyIdType> ::= value of AAS:Key/.idType
> <KeyValue> ::= value of AAS:Key/value
> ```
>
> With `<Local> == local` if `AAS:Key/local = True` and `no-local` if `AAS:Key/local == False`.
>
> Examples:
> * `(ConceptDescription)(local)[IRDI]0173-1#02-BAA120#008`
> * `(GlobalReference)(no-local)[IRDI]0173-1#01-AFZ615#016`
> * `(Submodel)(local)[IRI]http://customer.com/demo/aas/1/1/1234859590,(Property)(local)[IdShort]Temperature`
(Plattform Industrie 4.0: "Details of the Asset Administration Shell – Part 1 - The exchange of information between partners in the value chain of Industrie 4.0 (Version 2.0.1)", CC BY-ND 4.0)
We could perfectly implement this representation as the `__str__` method of the `Reference` class and add a parser/constructor method like this:
```python3
@classmethod
def from_string(cls, value: str) -> "Reference":
# probably something with regex parsing here
```https://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/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/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/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/96examples.data.example_aas: Missing namespace initialization for `create_examp...2020-10-13T12:24:39+02:00Sebastian Heppners.heppner@iat.rwth-aachen.deexamples.data.example_aas: Missing namespace initialization for `create_example_submodel`If you try:
```
test_submodel = create_example_submodel()
test_submodel.get_referable("ExampleProperty")
```
you recieve:
```
KeyError: 'Referable with id_short ExampleProperty not found in this namespace'
```
This function (and possi...If you try:
```
test_submodel = create_example_submodel()
test_submodel.get_referable("ExampleProperty")
```
you recieve:
```
KeyError: 'Referable with id_short ExampleProperty not found in this namespace'
```
This function (and possibly all the other `create_example...`-functions) is/are missing the creation of a `NamespaceSet` containing all the sub-elements, something like:
```
example_submodel_namespace_set = NamespaceSet(parent=example_submodel, items=[example_property, ...])
example_submodel.namespace_element_sets = [example_submodel_namespace_set]
```
Though, shouldn't these namespaces in general be created automatically with initializing the objects?https://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/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/93aasx: Support AASX packages with XML + JSON parts (redundant serialization of...2020-10-28T11:52:35+01:00Michael Thiesaasx: Support AASX packages with XML + JSON parts (redundant serialization of same objects)https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/92compliance_tool: Use pretty-printing in example files2020-10-07T10:45:28+02:00Michael Thiescompliance_tool: Use pretty-printing in example filesThe compliance_tool should use the `pretty_print=True` resp. `indent=4` for the XML/JSON serializers when creating example files.
This way, it's easier to manually inspect the resulting files and a possible deserializer errors are easie...The compliance_tool should use the `pretty_print=True` resp. `indent=4` for the XML/JSON serializers when creating example files.
This way, it's easier to manually inspect the resulting files and a possible deserializer errors are easier to locate by their line numbers.Torben MinyTorben Minyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/91json/xml adapter: support serializing and deserializing stripped objects2021-01-12T13:36:29+01:00Leon Mauritz Möllerjson/xml adapter: support serializing and deserializing stripped objectsThe REST API requires serializing and deserializing stripped objects, without attributes for which a separate endpoint exists:
- `Qualifiable` (`SubmodelElement`, `DataElement`, `Submodel`) objects without the `qualifier` attribute
- `An...The REST API requires serializing and deserializing stripped objects, without attributes for which a separate endpoint exists:
- `Qualifiable` (`SubmodelElement`, `DataElement`, `Submodel`) objects without the `qualifier` attribute
- `AnnotatedRelationshipElement` without `annotation`
- `Entity` without `statements`
- `SubmodelElementCollection` without `value`
- `AssetAdministrationShell` without `views` and `submodel`
- `Submodel` without `submodel_element`
- **new in V3:** `HasExtension` (all `Referable`) objects without the `extension` attribute
Progress Tracker:
- [x] JSON Serialization
- [x] JSON Deserialization
- [ ] XML Serialization
- [x] XML Deserializationhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/90model: dataType of IEC61360ConceptDescription should be optional2020-10-07T17:17:51+02:00Torben Minymodel: dataType of IEC61360ConceptDescription should be optional**EDIT (MT)**: This is an issue in our Metamodel implementation. It must also be fixed in the deserialization and serialization accordingly.**EDIT (MT)**: This is an issue in our Metamodel implementation. It must also be fixed in the deserialization and serialization accordingly.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/89backend: Add a local file-based backend2021-01-12T13:36:48+01:00Sebastian Heppners.heppner@iat.rwth-aachen.debackend: Add a local file-based backendAdd a local backend for storing identifiable objects locally as json or xml filesAdd a local backend for storing identifiable objects locally as json or xml fileshttps://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/basys4.2/ccProfilesUA/-/issues/4Deploy docker build on server and make it public available2020-07-29T10:54:53+02:00Julian Grothoffj.grothoff@plt.rwth-aachen.deDeploy docker build on server and make it public availableDocker Build:
- [ ] Create a docker build in gitlab ci
- [ ] Deploy docker build to public docker repository on successful build from gitlab ci
Deploy on public available server
- [ ] Create or use server, that can run a docker containe...Docker Build:
- [ ] Create a docker build in gitlab ci
- [ ] Deploy docker build to public docker repository on successful build from gitlab ci
Deploy on public available server
- [ ] Create or use server, that can run a docker container in DMZ
- [ ] Make the server public available (firewall, routes, etc.)
- [ ] Update and restart docker container daily
Infos:
* https://www.innoq.com/de/articles/2018/10/continuous-integration-mit-docker-und-gitlab/#paketierendesdocker-images
* Host on dockerhub: `docker push acplt/basys:tagname`https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/87REST-API: vagueness/issues in specification2020-09-29T14:55:18+02:00Leon Mauritz MöllerREST-API: vagueness/issues in specificationThis is a collection of vagueness and issues of the [REST API specification](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1):
- It is unclear how exactly the [depth parameter](https://app.swaggerhub.co...This is a collection of vagueness and issues of the [REST API specification](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1):
- It is unclear how exactly the [depth parameter](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1#/Asset%20Administration%20Shell%20Interface/RetrieveAssetAdministrationShell) should behave, or more precisely, which effect the possible values `core`, `deep`, `embedded` and `resolve` should have on the returned object.
- The [AAS respository interface](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1#/Asset%20Administration%20Shell%20Repository%20Interface/RetrieveAssetAdministrationShellFromRepository) lacks specification.
- The response format is not specified for routes [`/submodel/values`](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1#/Submodel%20Interface/RetrieveSubmodelAsValueObject) and [`/submodel/table`](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1#/Submodel%20Interface/RetrieveSubmodelAsTable).
- Does the parameter [`identification.id`](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1#/Asset%20Administration%20Shell%20Interface/RetrieveAllSubmodels) contain the whole `identification` object or just the id attribute? Or does it work like a **str in str** filter?
- Syntax and semantics are unspecified for parameter `filter` of [`/aas/views`](https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShell-REST-API/v1#/Asset%20Administration%20Shell%20Interface/RetrieveAllViews).https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/86sample data: Create an Asset and a ConceptDescription, referenced by multiple...2021-01-12T13:36:55+01:00Michael Thiessample data: Create an Asset and a ConceptDescription, referenced by multiple AAShttps://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/84aasx: Add more failsafe error handling2021-01-12T13:37:00+01:00Michael Thiesaasx: Add more failsafe error handlingCurrently, AASX reading raises an uncaught exception when an OPC part, referred to by a `File` object is not found or a duplicate `Identification` is found. We should handle those exceptions to make AASX reading more failsafe.Currently, AASX reading raises an uncaught exception when an OPC part, referred to by a `File` object is not found or a duplicate `Identification` is found. We should handle those exceptions to make AASX reading more failsafe.