Skip to content
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

Update improve/V30RC02 with the bugfixes made to main #164

Closed
wants to merge 17 commits into from

Conversation

s-heppner
Copy link
Contributor

@s-heppner s-heppner commented Nov 15, 2023

This PR updates improve/V30RC02 by merging main into it.
This is not relevant for the upcoming v3.0 release.

David Niebert and others added 17 commits April 13, 2023 14:52
unittests add:
- AASReference.resolve()
- Namespace.remove_referable()
- NamespaceSet.__contains__()
changed testing of ref5. Due to #37 preventing the creation of a `Reference` without a key
Previously, how to contribute to Eclipse-BaSyx was not
very well defined.

We add an extensive contribution guideline outlining:
  - Issue creation
  - PR Workflow
  - Commit and PR Message Conventions
and reference it in the main `README.md`.
Furthermore, we move the "Codestyle and Testing" paragraph from the
main `README.md` to the `CONTRIBUTING.md`.
When deserializing XML we would previously only have a look at the first
child of an unnecessary wrapper element and ignore additional elements.
However, since some implemenetations like the AASX Package Explorer
generate schema-incompatible XML, this behavior is changed in a way such
that additional elements are no longer ignored, but also parsed instead.

Fix #71
Currently, we can pass a `failsafe` parameter in deserializing methods 
of JSON- and XML-adapters. 
The parameter determines whether a document should be parsed 
in a failsafe way. However, I cannot pass the parameter 
in the deserializing method of the AASX Reader 
because it does not have `**kwargs`. 

This commit adds `**kwargs` to deserializing methods of `AASXReader`, 
such that it is possible to pass the parameter and documents will 
be deserializend in a not failsafe mode.
If an assertion is contained within the same context as a statement,
that raises an error, the assertion is never executed, because the
raised error leaves the context.
Since a recent update, pycodestyle requires whitespaces between the last
comma and the backslash at the end of a line, where it is broken.
During construction of a `Decimal`, an `InvalidOperation` exception
may occur. Since the user only expects a `ValueError` from this function,
because all other parsers only raise `ValueError`s, the `InvalidOperation`
error-type is handled and re-raised as a `ValueError`.

Fix #99
Mypy appears to not like abstract classes in a context where only
concrete classes should be given:

```
Only concrete class can be given where
"tuple[type[Referable], KeyTypes]" is expected
```

However, the spec demands the four abstract classes
- `Event`
- `DataElement`
- `SubmodelElement`
- `SubmodelElementCollection`

to appear inside the `model.KeyTypes` Enum.
Therefore, we ignore these errors via `# type: ignore`.
The AAS Manager uses typehints to generate a list of possible types for
a value. Since `DateTimeStamp` was missing, it was impossible to store a
`DateTimeStamp` value via AAS Manager.
@s-heppner s-heppner added the enhancement Enhancement of an existing feature label Nov 15, 2023
@s-heppner s-heppner changed the title Update improve/V3.0RC02 with the bugfixes made to main Update improve/V30RC02 with the bugfixes made to main Nov 15, 2023
@s-heppner s-heppner marked this pull request as draft November 16, 2023 13:25
@s-heppner s-heppner deleted the branch improve/V30RC02 November 20, 2023 13:16
@s-heppner s-heppner closed this Nov 20, 2023
@s-heppner s-heppner added v3.0 and removed enhancement Enhancement of an existing feature labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants