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

Extract compliance tool to be its own package #245

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

s-heppner
Copy link
Contributor

@s-heppner s-heppner commented Mar 4, 2024

We extract the compliance_tool into its own
package, since the functionality is not needed
in the general SDK anymore.

When we removed the schema files, we overlooked
that JSON and XML serialization need them.
We probably need to find a way of fetching
them during runtime of the test to avoid having
to host them in our repository.

The new aas-compliance-tool can be found
here, when the process is finished.

The released package can be found on PyPI

The following steps still need to be done:

  • Make aas-compliance-tool public
  • Publish aas-compliance-tool on PyPI
  • Adapt CI to fetch the schema files when running
  • Notify the user if the schema files are missing

We extract the compliance_tool into its own
package, since the functionality is not needed
in the general SDK anymore.

The new aas-compliance-tool can be found
[here](https://github.com/rwth-iat/aas-compliance-tool).
When we removed the schema files, we overlooked
that JSON and XML serialization need them.
We probably need to find a way of fetching
them during runtime of the test to avoid having
to host them in our repository.
This removes the JSON Schema and XSD files that
stem from the aas-specs repository.
Instead, this adds the logic in the CI to fetch
these files at runtime.

Furthermore, we skip the unittests that make use
of the schema files when they do not exist.
@s-heppner s-heppner marked this pull request as ready for review March 15, 2024 14:37
@jkhsjdhjs
Copy link
Contributor

Hmm, this also removes all compliance tool tests. I thought it would be good to install the compliance tool via pip for our CI, but now that I think about it, it doesn't make sense as this test would always fail when changing something essential, e.g. when updating to DotAAS v3.1 eventually, as the compliance tool is only updated after the SDK.
Do you see a solution here? The tests are still important for us, as these are the only tests that ensure our compatibility with the official serialization formats. Sure, we have other tests that test the de-/serialization, but these only test the compatibility of our deserialization against our serialization.

@s-heppner
Copy link
Contributor Author

I think it's acceptable for these tests to be removed. Our next release will still be v3.0 of the metamodel and before we implement v3.1, we will switch to the classes from aas-core.
These are tested extensivly between the schematas and other generated SDK.
Furthermore, aas-core being the reference implementation from which the schemata are actually generated, we'd be basically sitting "on top the source of truth".

@jkhsjdhjs
Copy link
Contributor

Yes, but the adapters are still implemented manually and would remain untested. If aas-core provides a set of testfiles for JSON/XML/AASX this is fine.

@s-heppner
Copy link
Contributor Author

s-heppner commented Mar 16, 2024

No, the adapters are also part of aas-core:

We've already experimented with encapsulating with our functions to avoid breaking changes and it should work.

The way the SDK are tested, to my understanding, is using them to serialize and deserialize the generated example files from aas-core-testgen and then comparing the result, so it should be equivalent, or even better than our current tests.

However, I would still advocate to implement #109 in the future for further peace of mind that our modifications did not mess up anything.

Copy link
Contributor

@jkhsjdhjs jkhsjdhjs left a comment

Choose a reason for hiding this comment

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

Alright, in this case I don't see any problems here. LGTM 👍

@s-heppner s-heppner merged commit 09ce09d into eclipse-basyx:main Mar 27, 2024
8 checks passed
@s-heppner s-heppner deleted the Extract/ComplianceTool branch March 27, 2024 09:07
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.

2 participants