-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aasx.adapter: Fix
semantic_id
type deserialization of `ModelReferen…
…ce` (#337) Previously, if the `semantic_id` was a `ModelReference`, it very often had the generic `type` "`model.Referable`" instead of the actual type of the object it points to. This lead to a bug in the AASX writer, where `ConceptDescription`s were not written to the AASX, even though they existed in the `ObjectStore`. This fixes this problem by tackling three separate points: 1. In `json_deserialization.py`, we now infer the `type` of the `ModelReference` via the Reference's last `Key`. This is more of a hotfix and issue #367 tracks the creation of a better solution. 2. In `aasx.py`, an unneccessary `logger.info` call is removed, that previously cluttered the output of the writer if a `semantic_id` was not pointing to a `ConceptDescription`, which is not something worth noting. Furthermore, we improve other log messages. 3. In `examples.data._helper`, we improve the test for `semantic_id` equality, namely by comparing the `ModelReference`'s attributes explicitly, when it happens to be one, instead of relying on simple string comparision.
- Loading branch information
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
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
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
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