PyI40AAS issueshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues2022-01-10T13:13:22+01:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/148Add new class MimeType2022-01-10T13:13:22+01:00Igor GarmaevAdd new class MimeTypeMimeType is defined now as: `MimeType = str`. It's reasonable to create a new class MimeType where e.g. some of typical types are presented as class variables. A new class would also be usefull for type checking: now it's allowed to set ...MimeType is defined now as: `MimeType = str`. It's reasonable to create a new class MimeType where e.g. some of typical types are presented as class variables. A new class would also be usefull for type checking: now it's allowed to set any param to str where MimeType is required and it will not be detected. In a class it will also be possible to check if structure of MimeType value is correct.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/147Add new class LangStringSet2022-01-10T12:50:17+01:00Igor GarmaevAdd new class LangStringSetLangStringSet is defined now as: `LangStringSet = Dict[str, str]`
It's reasonable to create a new class LangStringSet where it's possible to choose e.g. default language to show in repr. A new class would also be usefull for type checkin...LangStringSet is defined now as: `LangStringSet = Dict[str, str]`
It's reasonable to create a new class LangStringSet where it's possible to choose e.g. default language to show in repr. A new class would also be usefull for type checking: now it's allowed to set any param to Dict[str, str] where LangStringSet required and it will not be detected.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/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/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/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/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/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/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/117model: Implement Constraint AASd-003: idShort shall be compared case-insensitive2021-01-12T13:33:24+01:00Michael Thiesmodel: Implement Constraint AASd-003: idShort shall be compared case-insensitiveThis can be implemented by adding a `.lower()` to the idShort in all places in `NamespaceSet` where the idShort is used as key for the internal dict, including item access, `.get()`, item deletion and item insertion.This can be implemented by adding a `.lower()` to the idShort in all places in `NamespaceSet` where the idShort is used as key for the internal dict, including item access, `.get()`, item deletion and item insertion.Torben MinyTorben Minyhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/114Update to Version 3.0RC012021-01-12T13:34:29+01:00Torben MinyUpdate to Version 3.0RC01The following changes have been made compared to version 2.0.1:
- Strings must not be empty
- Constraints are now included in the respective class descriptions (Go through here, what is missing in our implementation)
- AssetIdentificatio...The following changes have been made compared to version 2.0.1:
- Strings must not be empty
- Constraints are now included in the respective class descriptions (Go through here, what is missing in our implementation)
- AssetIdentificationModel was added to the AAS
- ConceptDictionaries were removed
- SemanticID only optional
- Key.local was removed
- Entity.asset => Entity.globalAssetId and Entity.externalAssetId
- New classes Extension, HasExtension, IdentifierKeyValuePair
- DisplayName for referables introduced
- allowDuplicates in SMC is now clarified: Allow duplicates of semanticIdsTorben MinyTorben Minyhttps://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/79Make DictObjectStore thread-safe (including object attribute access)2021-01-12T13:37:07+01:00Michael ThiesMake DictObjectStore thread-safe (including object attribute access)We need a concept for thread-safe object and attribute access to allow building multi-threaded applications. This is especially required to build a scalable web API using WSGI.We need a concept for thread-safe object and attribute access to allow building multi-threaded applications. This is especially required to build a scalable web API using WSGI.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/18model: Merge KeyType and IdentifierType2021-01-12T13:37:45+01:00Michael Thiesmodel: Merge KeyType and IdentifierTypeStable library APIhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/17model: Subclass Identifier for different id types and use native types for id2021-01-12T13:37:57+01:00Michael Thiesmodel: Subclass Identifier for different id types and use native types for idStable library APIhttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues/11Add factory and / or manager module for simple construction of AASes2021-01-18T17:28:12+01:00Michael ThiesAdd factory and / or manager module for simple construction of AASesThe factory functions (which may be methods of a manager, that also includes an ObjectStore) should encapsulate all the boilerplate code required for constructing an AAS, constructing and adding a submodule, etc.The factory functions (which may be methods of a manager, that also includes an ObjectStore) should encapsulate all the boilerplate code required for constructing an AAS, constructing and adding a submodule, etc.