Skip to content

Commit 39e3e69

Browse files
committed
Fix CI
1 parent 543dec5 commit 39e3e69

8 files changed

Lines changed: 35 additions & 18 deletions

File tree

compliance_tool/aas_compliance_tool/compliance_check_aasx.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,11 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
252252
state_manager.set_step_status(Status.FAILED)
253253
return
254254

255-
checker2.check(sha_file == files.get_sha256(obj2.value), "File of {} must be {}.".format(identifiable.value, obj2.value),
256-
value=obj2.value)
255+
checker2.check(
256+
sha_file == files.get_sha256(obj2.value),
257+
"File of {} must be {}.".format(identifiable.value, obj2.value),
258+
value=obj2.value
259+
)
257260
state_manager.add_log_records_from_data_checker(checker2)
258261
if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED):
259262
state_manager.set_step_status(Status.FAILED)

compliance_tool/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ requires-python = ">=3.10"
3838
dependencies = [
3939
"pyecma376-2>=0.2.4",
4040
"jsonschema>=4.21.1",
41-
"basyx-python-sdk>=1.0.0",
41+
"basyx-python-sdk @ file:../sdk",
4242
]
4343

4444
[project.optional-dependencies]

sdk/basyx/aas/adapter/aasx.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,10 @@ def write_aas_objects(self,
507507
A thin wrapper around :meth:`write_all_aas_objects` to ensure downwards compatibility
508508
509509
This method takes the AAS's :class:`~basyx.aas.model.base.Identifier` (as ``aas_id``) to retrieve it
510-
from the given object_store. If the list of written identifiables includes :class:`~basyx.aas.model.submodel.Submodel`
511-
identifiables, Supplementary files which are referenced by :class:`~basyx.aas.model.submodel.File` identifiables within
512-
those Submodels, are also added to the AASX package.
510+
from the given object_store. If the list of written identifiables includes
511+
:class:`~basyx.aas.model.submodel.Submodel` identifiables, Supplementary files which are referenced by
512+
:class:`~basyx.aas.model.submodel.File` identifiables within those Submodels, are also added to the AASX
513+
package.
513514
514515
.. attention::
515516
@@ -519,10 +520,11 @@ def write_aas_objects(self,
519520
:param part_name: Name of the Part within the AASX package to write the files to. Must be a valid ECMA376-2
520521
part name and unique within the package. The extension of the part should match the data format (i.e.
521522
'.json' if ``write_json`` else '.xml').
522-
:param object_ids: A list of :class:`Identifiers <basyx.aas.model.base.Identifier>` of the identifiables to be written
523-
to the AASX package. Only these :class:`~basyx.aas.model.base.Identifiable` identifiables (and included
524-
:class:`~basyx.aas.model.base.Referable` identifiables) are written to the package.
525-
:param object_store: The identifiables store to retrieve the :class:`~basyx.aas.model.base.Identifiable` identifiables from
523+
:param object_ids: A list of :class:`Identifiers <basyx.aas.model.base.Identifier>` of the identifiables to be
524+
written to the AASX package. Only these :class:`~basyx.aas.model.base.Identifiable` identifiables
525+
(and included :class:`~basyx.aas.model.base.Referable` identifiables) are written to the package.
526+
:param object_store: The identifiables store to retrieve the :class:`~basyx.aas.model.base.Identifiable`
527+
identifiables from
526528
:param file_store: The
527529
:class:`SupplementaryFileContainer <basyx.aas.adapter.aasx.AbstractSupplementaryFileContainer>`
528530
to retrieve supplementary files from (if there are any :class:`~basyx.aas.model.submodel.File`
@@ -550,7 +552,9 @@ def write_aas_objects(self,
550552
raise KeyError(f"Could not find identifiable {identifier!r} in IdentifiableStore")
551553
identifiables.add(the_identifiable)
552554

553-
self.write_all_aas_objects(part_name, identifiables, file_store, write_json, split_part, additional_relationships)
555+
self.write_all_aas_objects(
556+
part_name, identifiables, file_store, write_json, split_part, additional_relationships
557+
)
554558

555559
# TODO remove `split_part` parameter in future version.
556560
# Not required anymore since changes from DotAAS version 2.0.1 to 3.0RC01

sdk/basyx/aas/adapter/xml/xml_deserialization.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,10 +1421,16 @@ def read_aas_xml_element(file: PathOrIO, construct: XMLConstructables, failsafe:
14211421
return _failsafe_construct(element, constructor, decoder_.failsafe, **constructor_kwargs)
14221422

14231423

1424-
def read_aas_xml_file_into(object_store: model.AbstractObjectStore[model.Identifier, model.Identifiable], file: PathOrIO,
1425-
replace_existing: bool = False, ignore_existing: bool = False, failsafe: bool = True,
1426-
stripped: bool = False, decoder: Optional[Type[AASFromXmlDecoder]] = None,
1427-
**parser_kwargs: Any) -> Set[model.Identifier]:
1424+
def read_aas_xml_file_into(
1425+
object_store: model.AbstractObjectStore[model.Identifier, model.Identifiable],
1426+
file: PathOrIO,
1427+
replace_existing: bool = False,
1428+
ignore_existing: bool = False,
1429+
failsafe: bool = True,
1430+
stripped: bool = False,
1431+
decoder: Optional[Type[AASFromXmlDecoder]] = None,
1432+
**parser_kwargs: Any
1433+
) -> Set[model.Identifier]:
14281434
"""
14291435
Read an Asset Administration Shell XML file according to 'Details of the Asset Administration Shell', chapter 5.4
14301436
into a given :class:`ObjectStore <basyx.aas.model.provider.AbstractObjectStore>`.

sdk/basyx/aas/model/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ def __init__(self, key: Tuple[Key, ...], type_: Type[_RT], referred_semantic_id:
10491049
self.type: Type[_RT]
10501050
object.__setattr__(self, 'type', type_)
10511051

1052-
def resolve(self, provider_: "provider.AbstractObjectProvider[model.Identifier, model.Identifiable]") -> _RT:
1052+
def resolve(self, provider_: "provider.AbstractObjectProvider") -> _RT:
10531053
"""
10541054
Follow the :class:`~.Reference` and retrieve the :class:`~.Referable` object it points to
10551055

sdk/basyx/aas/model/provider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class DictObjectStore(DictIdentifiableStore):
158158
`DictObjectStore` has been renamed to :class:`~.DictIdentifiableStore` and will be removed in a future release.
159159
Please migrate to :class:`~.DictIdentifiableStore`.
160160
"""
161+
161162
def __init__(self, iterables: Iterable[_IT] = ()) -> None:
162163
warnings.warn(
163164
"`DictObjectStore` is deprecated and will be removed in a future release. Use "
@@ -232,6 +233,7 @@ class SetObjectStore(SetIdentifiableStore):
232233
`SetObjectStore` has been renamed to :class:`~.SetIdentifiableStore` and will be removed in a future release.
233234
Please migrate to :class:`~.SetIdentifiableStore`.
234235
"""
236+
235237
def __init__(self, objects: Iterable[_IT] = ()) -> None:
236238
warnings.warn(
237239
"`SetObjectStore` is deprecated and will be removed in a future release. Use `SetIdentifiableStore`"
@@ -254,7 +256,7 @@ class ObjectProviderMultiplexer(AbstractObjectProvider[_K, _V]):
254256
object
255257
"""
256258

257-
def __init__(self, registries: Optional[List[AbstractObjectProvider[ _K, _V]]] = None) -> None:
259+
def __init__(self, registries: Optional[List[AbstractObjectProvider[_K, _V]]] = None) -> None:
258260
self.providers: List[AbstractObjectProvider[_K, _V]] = registries if registries is not None else []
259261

260262
def get_item(self, key: _K) -> _V:

sdk/docs/source/model/provider.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ provider - Providers for storing and retrieving AAS-objects
33

44
.. automodule:: basyx.aas.model.provider
55

6+
.. autoclass:: _K
7+
.. autoclass:: _V
68
.. autoclass:: _IT

sdk/test/examples/test__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2024 the Eclipse BaSyx Authors
1+
# Copyright (c) 2025 the Eclipse BaSyx Authors
22
#
33
# This program and the accompanying materials are made available under the terms of the MIT License, available in
44
# the LICENSE file of this project.

0 commit comments

Comments
 (0)