Problem of Customized child classes due to AAS Constraint 108 in SEList
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start with _check_constraints in SubmodelElementList and _submodel_element_list_to_json in json_serialization.py, then inspect the KEY_TYPES_CLASSES mapping. Determine how customized child classes should satisfy the constraint and serialization paths; the work is done when the chosen behavior is consistent for both cases.
Written by the indexing model from the issue text.
Description
The Constraint AASd-108 says: All first level child elements in a SubmodelElementList shall have the same
submodel element type as specified in SubmodelElementList/typeValueListElement.
The _check_constraints method in SubmodelElementList raises Exception if the child element in SubmodelElementList is not of the same Class as it is specified in typeValueListElement.
So if I define my SDK for a specific Submodel and define classes for it (e.g. SpecialProperty) which inherit from e.g. Property class, i get Errors:
- I set
SubmodelElementList/typeValueListElementtoProperty - I add to
SubmodelElementListmySpecialPropertyobject - I get error from
_check_constraints, becauseSpecialProperty!=Property. - If I set
SubmodelElementList/typeValueListElementtoSpecialProperty, I get error from_submodel_element_list_to_jsonin json_serialization.py becauseSpecialPropertyclass is not in KEY_TYPES_CLASSES dict
What are possible solutions here?
- Dominant language
- Python
- Stars
- 102
- Forks
- 52
- Avg merge
- 20d 17h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-basyx/basyx-python-sdk
-
bug high priority
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug high priority
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
eclipse-basyx/basyx-python-sdk#634 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug high priority
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
All issues in eclipse-basyx/basyx-python-sdk
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·