Skip to content

Update AASX (Part 5) to v3.1 - #486

Merged
s-heppner merged 2 commits into
eclipse-basyx:developfrom
rwth-iat:update/package_file_format_v3.1
May 5, 2026
Merged

Update AASX (Part 5) to v3.1#486
s-heppner merged 2 commits into
eclipse-basyx:developfrom
rwth-iat:update/package_file_format_v3.1

Conversation

@s-heppner

Copy link
Copy Markdown
Member

No description provided.

@s-heppner s-heppner added this to the Release 2.1.0 milestone Apr 29, 2026
@moritzsommer

Copy link
Copy Markdown
Contributor

AAS Part 5 (AASX) - Implemented Changes

@moritzsommer

Copy link
Copy Markdown
Contributor

Moreover, I updated:

@s-heppner
s-heppner marked this pull request as ready for review May 5, 2026 07:55

@zrgt zrgt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@s-heppner
s-heppner merged commit 2dffb74 into eclipse-basyx:develop May 5, 2026
15 checks passed
@s-heppner
s-heppner deleted the update/package_file_format_v3.1 branch May 5, 2026 09:07
s-heppner pushed a commit that referenced this pull request Jun 29, 2026
Previously compliance_tool tests relied on handcrafted examples.

Replaced examples by mocking the underlying sdk functionality to
just test the output parsing. Currently only for json and only for
'check_deserialization' and 'check_example'.

Applied the same refactoring to resulting equivalence check of json
implementation and the xml implementation.

Tests for the compliance check for aasx files were refactored so
they use mocking instead of actual files. Additional test cases
were added to ensure

 1. alignment of core properties is checked
 2. content of supplementary files is equal

Replace the old fixture-dependent subprocess tests with direct calls to
main() and parse_cli_arguments(), mocking compliance_check_* modules to
verify routing without touching the filesystem.

Previously the aasx file equivalence check would
 1. still execute subsequent steps if the loading of one file fails.
    This was caused by checking only if `state_manager.status is Status.FAILED`,
    missing that `Status.NOT_EXECUTED > Status.FAILED`.
 2. use blank assertions to ensure core_properties `created` attribute
    is of type `datetime.datetime`.
    This resulted in the compliance_tool failing with `AssertionError`
    in cases that were caused by (1).

Status guards for fast-failing are now corrected to take
`Status.NOT_EXECUTED` into account.
The assertions are removed and replaced with `DataChecker` checks
to inform the user gracefully on problems. `cast(...)` is used
to inform the type-checker about the `isinstance(...)` result.

Previously the supplementary files of the aasx container were not
tested for presence or equality although the check_aas_example did
it. Now a two-way check, coparing presence, content-type and sha256
is implemented. Tests were adapted to expect the additional step.

The previous check on the supplementary file was broken, as it
compared the sha256 value of the TestFile to itself.

Introduced a new step which checks for presence and equality of
supplementary file `/TestFile.pdf` in the AASX container.
Refactored the core property checks to no longer use `assert` in
combination with `try ... except AssertionError`.

The `failed_checks` is a property that returns a fresh iterator
at each call. With `mock_data_checker.return_value.failed_checks = iter([])`
only one iterator is created that may be exhausted at subsequent calls.

The introduced `PropertyMock` fixes this.

As the new test structure uses mocking extensively, the risk for
missing error cases in these tests increases. To overcome this
simple end-to-end integration tests are integrated now, which do
not use mocking but operate on real temporary files.

For all three adapters a full cycle is implemented:
 1.  create -> check_example (both success and fail)
 2.  create x2 -> check_file_equivalence (both sucess and fail)

The help output of the compliance tool is cleaned. Old fragments
of the long ago removed schema-checking functionality were still
in place.

Fixes #486
@s-heppner s-heppner mentioned this pull request Jul 16, 2026
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.

3 participants