Skip to content

Conversation

@somsonson
Copy link
Contributor

Implement the adapter and DictSupplementaryFileContainer of basyx-python-sdk.
We use the serialisation/deserialisation of aas-core3.0 of json/xml to write/read AASX packages.

Copy link
Contributor

@s-heppner s-heppner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been reviewing of what I thought was the design until I understood that there are actually two possible designs that we should probably discuss in more detail:

  1. Only add aasx.py and the ObjectStore, moving what you need from the other adapters into these modules and remove everything else completely to keep the framework as lightweight as possible
  2. Be (somewhat) backward compatible with the BaSyx-Python SDK and add the XML and JSON adapters with their outermost signatures and methods, so that users do not have to learn the new methods.

It seems you have followed the 2nd method, however with the tutorials, we already updated to the 1st one. I think both are viable and we should discuss.

@somsonson
Copy link
Contributor Author

I've been reviewing of what I thought was the design until I understood that there are actually two possible designs that we should probably discuss in more detail:

1. Only add `aasx.py` and the `ObjectStore`, moving what you need from the other adapters into these modules and remove everything else completely to keep the framework as lightweight as possible

2. Be (somewhat) backward compatible with the BaSyx-Python SDK and add the XML and JSON adapters with their outermost signatures and methods, so that users do not have to learn the new methods.

It seems you have followed the 2nd method, however with the tutorials, we already updated to the 1st one. I think both are viable and we should discuss.

The adapter actually is not backward compatible with the BaSyx-Python SDK. It just happens that we did not update the folder structure to actually match what has been done.
The adapter has been modified to use the types of aas_core3.0 and its json/xml serialisation functions.
The functionality of the original BaSyx-Python SDK was preserved while being as lightweight as possible.

@s-heppner
Copy link
Contributor

As far as I can see it, this lgtm now. Could you resolve the conflicts?

Copy link
Contributor

@s-heppner s-heppner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss which functionalities from the old adapters we really really need, or if we can get around using them, as to provide a more readable and minimalistic AASX adapter. Let's talk about that in our next meeting.

Frosty2500 and others added 25 commits December 9, 2024 18:10
The route now uses the submodel identifier instead of the submodel
reference.
The submodel routes of the AAS API `/shells/<aas_id>/submodels` are the
same already implemented as the submodel API, so we return a redirect
here, after checking that the AAS indeed has a reference to the
requested submodel.

`PUT` and `DELETE` are different, as we also have to update the AAS in
this case, either by adding a new updated reference in case of a `PUT`
request changes the submodel id, or by removing the submodel reference
for `DELETE` requests.
The `IdentifierConverter` is also used to decode values from URLs, that
aren't necessarily Identifiers, e.g. Qualifier types. Thus, a name like
`Base64URLConverter` suits its use better and is also more expressive.

For the same reasons, the key `identifier`, which was used for the
`IdentifierConverter`, is renamed to `base64url`.
Methods `_get_shell()` and `_get_shells()` are added similarly to
`_get_submodel()` and `_get_submodels()`, which were previously added in
a5c7d69.

Furthermore, when requesting multiple AAS/Submodels, we're now also
updating these in `_get_all_obj_of_type()` before returning them.
Finally, updating AAS/Submodel objects is also moved to `_get_obj_ts()`.
* adapter.http: implement the attachment routes

* adapter.http: fix codestyle errors

* adapter.http: implement recommended changes

* adapter.http: implement new recommended changes
jkhsjdhjs and others added 20 commits December 9, 2024 18:11
This change makes use of the `SupplementaryFileContainer` interface of
the AASX adapter. It allows the API to operate seamlessly on AASX files,
including the contained supplementary files, without having to access
the filesystem.

Furthermore, the support for the modification of `Blob` values is
removed (the spec prohibits it).
… match project structure. Simplify some functions of aasx.py
…eate_simple_aas.py: Implement tutorial comparable to the tutorial in the basyx python sdk
…import. sdk/basyx/aasx.py: Include sample codeblock for adapter usage. Update imports in tutorial files
@s-heppner
Copy link
Contributor

LGTM now. If you resolve the conflicts for rebasing, we can close this PR. Thanks for your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants