PyI40AAS issueshttps://git.rwth-aachen.de/acplt/pyi40aas/-/issues2021-10-31T23:26:01+01:00https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/109read_aas_json_file(file) supports only file-like object2021-10-31T23:26:01+01:00Igor Garmaevread_aas_json_file(file) supports only file-like object`read_aas_json_file(file: IO, **kwargs)` in json_deserialization.py currently supports only file-like objects, but it should also support filenames`read_aas_json_file(file: IO, **kwargs)` in json_deserialization.py currently supports only file-like objects, but it should also support filenamesStable library APIhttps://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/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/151Add method for duplicating Referable objects (e.g. submodelelements)2022-01-14T13:39:53+01:00Jingyun ZhaoAdd method for duplicating Referable objects (e.g. submodelelements)I tried to add the same submodel elemement to different submodels, but it raised the following error:
raise ValueError("Object has already a parent, but it must not be part of two namespaces."
ValueError: Object has already a parent, but...I tried to add the same submodel elemement to different submodels, but it raised the following error:
raise ValueError("Object has already a parent, but it must not be part of two namespaces."
ValueError: Object has already a parent, but it must not be part of two namespaces.
Is there another method to duplicate a submodel element to another different submodel?https://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/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/112adapter: Allow passing a list of Identifiable objects to be ignored to read_a...2021-01-12T13:38:29+01:00Michael Thiesadapter: Allow passing a list of Identifiable objects to be ignored to read_aas_*_file()This feature is required by the AASXReader to silently ignore objects that are serialized redundantly in different formats (XML / JSON).
It should be implemented as an additional optional parameter, taking a `Set[Identifier]`.This feature is required by the AASXReader to silently ignore objects that are serialized redundantly in different formats (XML / JSON).
It should be implemented as an additional optional parameter, taking a `Set[Identifier]`.https://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/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/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/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/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/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.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/66test: cover serialization and deserialization of formulas2020-04-20T09:17:53+02:00Leon Mauritz Möllertest: cover serialization and deserialization of formulasThe serialization and deserialization of [`Formula`](https://git.rwth-aachen.de/acplt/pyaas/-/blob/fbe3f911a5d0c7acd8cc4c5114c0c499b4ba0eca/aas/model/base.py#L712)s is not tested by the current examples.
Thus lines 481-495 of the `json_d...The serialization and deserialization of [`Formula`](https://git.rwth-aachen.de/acplt/pyaas/-/blob/fbe3f911a5d0c7acd8cc4c5114c0c499b4ba0eca/aas/model/base.py#L712)s is not tested by the current examples.
Thus lines 481-495 of the `json_deserilization`, lines 169-173 of the `json_serialization` and lines 213-219 of the `xml_serialization` are not covered.https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/65adapter: Re-publish reader/writer functions and relevant classes from adapter...2020-04-14T15:03:51+02:00Michael Thiesadapter: Re-publish reader/writer functions and relevant classes from adapter.json and adapter.xml modulesImports of the (de)serialization functions should look like
```python
from aas.adapter.json import write_aas_json_file, read_json_aas_file
```
instead of
```python
from aas.adapter.json.json_serialization import write_aas_json_file
from ...Imports of the (de)serialization functions should look like
```python
from aas.adapter.json import write_aas_json_file, read_json_aas_file
```
instead of
```python
from aas.adapter.json.json_serialization import write_aas_json_file
from aas.adapter.json.json_deserialization import read_json_aas_file
```
Thus, we should import all classes of the "public interface" in the `aas.adpater.json.__init__` and `aas.adapter.xml.__init__` modules.