diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dedb827a..939a9147 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: # that you want to use to test the serialization adapter against. # Currently, we need to update this manually, however I'm afraid this is not possible to automatically infer, # since it's heavily dependant of the version of the AAS specification we support. - AAS_SPECS_RELEASE_TAG: "IDTA-01001-3-0-1_schemasV3.0.8" + AAS_SPECS_RELEASE_TAG: "IDTA-01001-3-1-2" services: couchdb: image: couchdb:3 diff --git a/README.md b/README.md index 9894d320..ed2bd6ac 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ for Industry 4.0 Systems. These are the implemented AAS specifications of the [current SDK release](https://github.com/eclipse-basyx/basyx-python-sdk/releases/latest), which can be also found on [PyPI](https://pypi.org/project/basyx-python-sdk/): -| Specification | Version | -|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Specification | Version | +|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Part 1: Metamodel | [v3.0.1 (01001-3-0-1)](https://industrialdigitaltwin.org/wp-content/uploads/2024/06/IDTA-01001-3-0-1_SpecificationAssetAdministrationShell_Part1_Metamodel.pdf) | -| Schemata (JSONSchema, XSD) | [v3.0.8 (IDTA-01001-3-0-1_schemasV3.0.8)](https://github.com/admin-shell-io/aas-specs/releases/tag/IDTA-01001-3-0-1_schemasV3.0.8) | -| Part 2: API | [v3.0 (01002-3-0)](https://industrialdigitaltwin.org/en/wp-content/uploads/sites/2/2023/06/IDTA-01002-3-0_SpecificationAssetAdministrationShell_Part2_API_.pdf) | -| Part 3a: Data Specification IEC 61360 | [v3.0 (01003-a-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01003-a-3-0_SpecificationAssetAdministrationShell_Part3a_DataSpecification_IEC61360.pdf) | -| Part 5: Package File Format (AASX) | [v3.0 (01005-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01005-3-0_SpecificationAssetAdministrationShell_Part5_AASXPackageFileFormat.pdf) | +| Schemata (JSONSchema, XSD) | [v3.0.8 (IDTA-01001-3-0-1_schemasV3.0.8)](https://github.com/admin-shell-io/aas-specs/releases/tag/IDTA-01001-3-0-1_schemasV3.0.8) | +| Part 2: API | [v3.0 (01002-3-0)](https://industrialdigitaltwin.org/en/wp-content/uploads/sites/2/2023/06/IDTA-01002-3-0_SpecificationAssetAdministrationShell_Part2_API_.pdf) | +| Part 3a: Data Specification IEC 61360 | [v3.1.1 (01003-a)](https://industrialdigitaltwin.org/wp-content/uploads/2025/08/IDTA-01003-a-3-1-1_AAS-Specification_Part3a_DataSpecification.pdf) | +| Part 5: Package File Format (AASX) | [v3.1 (01005)](https://industrialdigitaltwin.org/wp-content/uploads/2025/06/IDTA_01005-25-01_AAS-Specification_Part5_AASXPackageFileFormat.pdf) | If you need support to an older version of the specifications, please refer to our [prior releases](https://github.com/eclipse-basyx/basyx-python-sdk/releases). Each of them has a similar table at the top of the release notes. diff --git a/sdk/basyx/aas/adapter/aasx.py b/sdk/basyx/aas/adapter/aasx.py index 9833f342..bf1cedac 100644 --- a/sdk/basyx/aas/adapter/aasx.py +++ b/sdk/basyx/aas/adapter/aasx.py @@ -140,23 +140,31 @@ def read_into(self, object_store: model.AbstractObjectStore, :return: A set of the :class:`Identifiers ` of all :class:`~basyx.aas.model.base.Identifiable` objects parsed from the AASX file """ + # Format of supported and deprecated AASX relationship URL + AASX_REL_BASE = "http://admin-shell.io/aasx/relationships" + AASX_REL_BASE_DEPRECATED = "http://www.admin-shell.io/aasx/relationships" + RELATIONSHIP_TYPE_AASX_ORIGIN = f"{AASX_REL_BASE}/aasx-origin" + RELATIONSHIP_TYPE_AASX_ORIGIN_DEPRECATED = f"{AASX_REL_BASE_DEPRECATED}/aasx-origin" + # Find AASX-Origin part core_rels = self.reader.get_related_parts_by_type() try: aasx_origin_part = core_rels[RELATIONSHIP_TYPE_AASX_ORIGIN][0] except IndexError as e: - if core_rels.get("http://www.admin-shell.io/aasx/relationships/aasx-origin"): + if core_rels.get(RELATIONSHIP_TYPE_AASX_ORIGIN_DEPRECATED): # Since there are many AASX files with this (wrong) relationship URls in the wild, we make an exception # and try to read it anyway. However, we notify the user that this may lead to data loss, since it is # highly likely that the other relationship URLs are also wrong in that file. # See also [#383](https://github.com/eclipse-basyx/basyx-python-sdk/issues/383) for the discussion. - logger.warning("SPECIFICATION VIOLATED: The Relationship-URL in your AASX file " - "('http://www.admin-shell.io/aasx/relationships/aasx-origin') " - "is not valid, it should be 'http://admin-shell.io/aasx/relationships/aasx-origin'. " - "We try to read the AASX file anyway, but this cannot guaranteed in the future," - "and the file may not be fully readable, so data losses may occur." - "Please fix this and/or notify the source of the AASX.") - aasx_origin_part = core_rels["http://www.admin-shell.io/aasx/relationships/aasx-origin"][0] + logger.warning( + "Deprecated AASX relationship URL format used: '%s'. " + "The supported AASX relationship URL format is: '%s'. " + "Support for the deprecated form is kept for compatibility, but data losses may occur. " + "Please fix the format and notify the author of the given AASX.", + RELATIONSHIP_TYPE_AASX_ORIGIN_DEPRECATED, + RELATIONSHIP_TYPE_AASX_ORIGIN, + ) + aasx_origin_part = core_rels[RELATIONSHIP_TYPE_AASX_ORIGIN_DEPRECATED][0] else: raise ValueError("Not a valid AASX file: aasx-origin Relationship is missing.") from e