PyI40AAS issueshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues2021-10-06T09:47:01+02:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/142model.aas: Initializing an AssetAdministrationShell does not add the submodel...2021-10-06T09:47:01+02:00Sebastian Heppners.heppner@iat.rwth-aachen.demodel.aas: Initializing an AssetAdministrationShell does not add the submodel to the proper NamespaceWhen initializing an AssetAdministrationShell (like in the examples):
```
submodel = model.Submodel(
identification=model.Identifier(
id_="https://example.com/resources/sm/testSubmodel",
id_type=model.Identif...When initializing an AssetAdministrationShell (like in the examples):
```
submodel = model.Submodel(
identification=model.Identifier(
id_="https://example.com/resources/sm/testSubmodel",
id_type=model.IdentifierType.IRI
),
id_short="SimulationModels"
)
aas = model.AssetAdministrationShell(
asset=model.AASReference.from_referable(model.Asset(
kind=model.AssetKind.INSTANCE,
identification=model.Identifier(
id_="https://example.com/resources/asset/{}".format(id_short),
id_type=model.IdentifierType.IRI
)
)),
identification=model.Identifier(
id_="https://example.com/resources/aas/{}".format(id_short),
id_type=model.IdentifierType.IRI
),
submodel={model.AASReference.from_referable(submodel)}
)
```
the submodel is not added to the AAS namespace:
```
s = aas.get_referable(id_short="SimulationModels")
>> KeyError: 'Referable with id_short SimulationModels not found in this namespace'
```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/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/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/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/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)