forked from eclipse-basyx/basyx-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: change class AdministrativeInformation and Constraint AASd-005 #3
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typing: make implicit optional types explicit optional
backend.couchdb: Remove usage of deprecated HTTPResponse.getheader()
model.base: Fix AASReference.resolve() error messages
This fixes a bug that caused values of integer "0" to be deserialized to `None`.
Due to missing calls to the initializer function (__init__) of parent classes, not all superclasses were correctly initialized for classes that inherit from multiple classes (e.g. Submodel, SubmodelElement). https://stackoverflow.com/a/16310777/4780052
Rename supplementary_semantic_id to supplemental_semantic_id, as it's named in the spec. Use the official description of supplemental_semantic_id from the spec in the docstrings. Only implement the bare minimum of list functions for ConstrainedList. Other functions such as `append()`, `pop()` and `remove()` are inherited from MutableSequence and implemented via `__getitem__()`, `__len__()`, `insert()`, and `__delitem__()`. Document Constraint AASd-118 in HasSemantics docstring. Change type of `supplemental_semantic_id` in `__init__()` of classes that inherit from `HasSemantics`. Optional[ConstrainedList[Reference]] creates an ambiguity between None and an empty list, which both correspond to no supplemental semantic ids being present. Insead, initialize the set with an empty iterable. Also, instead of a ConstrainedList[Reference], use Iterable[Reference] as we don't want the users of this SDK to worry about ConstrainedList, it should be an implementation detail. Add item_set_hook to ConstrainedList. Similar to item_del_hook, it is actually not necessary for the HasSemantics constraint, but I only noticed that later when I re-read the HasSemantics constraint. Instead of raising a ValueError when a constraint is violated, raise an AASConstraintViolation, which is a special class of this SDK for exactly this purpose. Clean up the tests a bit, e.g. use pythons unittest assertion functions instead of raising a ValueError on error. Also split the tests by functionality in separate functions. Improve the ConstrainedListTest by verifying which values are passed to the hook functions.
- Use a dictionary called mapping that maps each object type to its corresponding serialization method.
annotation->in JSON: annotations
inputVariable->in JSON: inputVariables outputVariable->in JSON: outputVariables inoutputVariable->in JSON: inoutputVariables
externalAssetIds->specificAssetIds thumbnail->defaultThumbnail
externalAssetIds->specificAssetIds
subjectId->externalSubjectId
'value' is not required in Schema
'value' is optional in Schema
- Add `kind` attribute to Qualifier class - Init QualifierKind enum class - remove "modelType" in json de-/serialisation for Qualifier
Removed since V30RC02
…x-python-sdk into V30/AdministrativeInformation
dxvidnrt
changed the title
change class AdministrativeInformation and Constraint AASd-005
WIP: change class AdministrativeInformation and Constraint AASd-005
Apr 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add creator, templateId
Change Constraint AASd-005
Change repr()