Skip to content

Commit 6ce2c62

Browse files
committed
Resolve change requests
1 parent 0a1fd2b commit 6ce2c62

13 files changed

Lines changed: 125 additions & 125 deletions

compliance_tool/aas_compliance_tool/compliance_check_aasx.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ def check_deserialization(file_path: str, state_manager: ComplianceToolStateMana
7373
try:
7474
# read given file
7575
state_manager.add_step('Read file')
76-
id_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
76+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
7777
files = aasx.DictSupplementaryFileContainer()
78-
reader.read_into(id_store, files)
78+
reader.read_into(identifiable_store, files)
7979
new_cp = reader.get_core_properties()
8080
state_manager.set_step_status(Status.SUCCESS)
8181
except (ValueError, KeyError) as error:
@@ -85,7 +85,7 @@ def check_deserialization(file_path: str, state_manager: ComplianceToolStateMana
8585
finally:
8686
reader.close()
8787

88-
return id_store, files, new_cp
88+
return identifiable_store, files, new_cp
8989

9090

9191
def check_schema(file_path: str, state_manager: ComplianceToolStateManager) -> None:
@@ -174,7 +174,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
174174
logger_example.propagate = False
175175
logger_example.setLevel(logging.INFO)
176176

177-
obj_store, files, cp_new = check_deserialization(file_path, state_manager)
177+
identifiable_store, files, cp_new = check_deserialization(file_path, state_manager)
178178

179179
if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED):
180180
state_manager.add_step('Check if data is equal to example data')
@@ -187,7 +187,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
187187

188188
state_manager.add_step('Check if data is equal to example data')
189189
example_data = create_example_aas_binding()
190-
checker.check_identifiable_store(obj_store, example_data)
190+
checker.check_identifiable_store(identifiable_store, example_data)
191191
state_manager.add_log_records_from_data_checker(checker)
192192

193193
if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED):
@@ -241,7 +241,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
241241
identifiable = example_data.get_item("https://acplt.org/Test_Submodel")
242242
for id_short in list_of_id_shorts:
243243
identifiable = identifiable.get_referable(id_short)
244-
obj2 = obj_store.get_item("https://acplt.org/Test_Submodel")
244+
obj2 = identifiable_store.get_item("https://acplt.org/Test_Submodel")
245245
for id_short in list_of_id_shorts:
246246
obj2 = obj2.get_referable(id_short)
247247
try:
@@ -283,9 +283,9 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag
283283
logger.propagate = False
284284
logger.setLevel(logging.INFO)
285285

286-
obj_store_1, files_1, cp_1 = check_deserialization(file_path_1, state_manager, 'first')
286+
identifiable_store_1, files_1, cp_1 = check_deserialization(file_path_1, state_manager, 'first')
287287

288-
obj_store_2, files_2, cp_2 = check_deserialization(file_path_2, state_manager, 'second')
288+
identifiable_store_2, files_2, cp_2 = check_deserialization(file_path_2, state_manager, 'second')
289289

290290
if state_manager.status is Status.FAILED:
291291
state_manager.add_step('Check if data in files are equal')
@@ -297,7 +297,7 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag
297297
checker = AASDataChecker(raise_immediately=False, **kwargs)
298298
try:
299299
state_manager.add_step('Check if data in files are equal')
300-
checker.check_identifiable_store(obj_store_1, obj_store_2)
300+
checker.check_identifiable_store(identifiable_store_1, identifiable_store_2)
301301
except (KeyError, AssertionError) as error:
302302
state_manager.set_step_status(Status.FAILED)
303303
logger.error(error)

compliance_tool/aas_compliance_tool/compliance_check_json.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ def check_deserialization(file_path: str, state_manager: ComplianceToolStateMana
149149
state_manager.add_step('Read file {} and check if it is deserializable'.format(file_info))
150150
else:
151151
state_manager.add_step('Read file and check if it is deserializable')
152-
obj_store = json_deserialization.read_aas_json_file(file_to_be_checked, failsafe=True)
152+
identifiable_store = json_deserialization.read_aas_json_file(file_to_be_checked, failsafe=True)
153153

154154
state_manager.set_step_status_from_log()
155155

156-
return obj_store
156+
return identifiable_store
157157

158158

159159
def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager, **kwargs) -> None:
@@ -174,7 +174,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
174174
logger_example.propagate = False
175175
logger_example.setLevel(logging.INFO)
176176

177-
obj_store = check_deserialization(file_path, state_manager)
177+
identifiable_store = check_deserialization(file_path, state_manager)
178178

179179
if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED):
180180
state_manager.add_step('Check if data is equal to example data')
@@ -184,7 +184,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
184184
checker = AASDataChecker(raise_immediately=False, **kwargs)
185185

186186
state_manager.add_step('Check if data is equal to example data')
187-
checker.check_identifiable_store(obj_store, create_example())
187+
checker.check_identifiable_store(identifiable_store, create_example())
188188

189189
state_manager.add_log_records_from_data_checker(checker)
190190

@@ -208,9 +208,9 @@ def check_json_files_equivalence(file_path_1: str, file_path_2: str, state_manag
208208
logger.propagate = False
209209
logger.setLevel(logging.INFO)
210210

211-
obj_store_1 = check_deserialization(file_path_1, state_manager, 'first')
211+
identifiable_store_1 = check_deserialization(file_path_1, state_manager, 'first')
212212

213-
obj_store_2 = check_deserialization(file_path_2, state_manager, 'second')
213+
identifiable_store_2 = check_deserialization(file_path_2, state_manager, 'second')
214214

215215
if state_manager.status is Status.FAILED:
216216
state_manager.add_step('Check if data in files are equal')
@@ -220,7 +220,7 @@ def check_json_files_equivalence(file_path_1: str, file_path_2: str, state_manag
220220
checker = AASDataChecker(raise_immediately=False, **kwargs)
221221
try:
222222
state_manager.add_step('Check if data in files are equal')
223-
checker.check_identifiable_store(obj_store_1, obj_store_2)
223+
checker.check_identifiable_store(identifiable_store_1, identifiable_store_2)
224224
except (KeyError, AssertionError) as error:
225225
state_manager.set_step_status(Status.FAILED)
226226
logger.error(error)

compliance_tool/aas_compliance_tool/compliance_check_xml.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ def check_deserialization(file_path: str, state_manager: ComplianceToolStateMana
148148
state_manager.add_step('Read file {} and check if it is deserializable'.format(file_info))
149149
else:
150150
state_manager.add_step('Read file and check if it is deserializable')
151-
obj_store = xml_deserialization.read_aas_xml_file(file_to_be_checked, failsafe=True)
151+
identifiable_store = xml_deserialization.read_aas_xml_file(file_to_be_checked, failsafe=True)
152152

153153
state_manager.set_step_status_from_log()
154154

155-
return obj_store
155+
return identifiable_store
156156

157157

158158
def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager, **kwargs) -> None:
@@ -173,7 +173,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
173173
logger_example.propagate = False
174174
logger_example.setLevel(logging.INFO)
175175

176-
obj_store = check_deserialization(file_path, state_manager)
176+
identifiable_store = check_deserialization(file_path, state_manager)
177177

178178
if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED):
179179
state_manager.add_step('Check if data is equal to example data')
@@ -183,7 +183,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
183183
checker = AASDataChecker(raise_immediately=False, **kwargs)
184184

185185
state_manager.add_step('Check if data is equal to example data')
186-
checker.check_identifiable_store(obj_store, create_example())
186+
checker.check_identifiable_store(identifiable_store, create_example())
187187

188188
state_manager.add_log_records_from_data_checker(checker)
189189

@@ -207,9 +207,9 @@ def check_xml_files_equivalence(file_path_1: str, file_path_2: str, state_manage
207207
logger.propagate = False
208208
logger.setLevel(logging.INFO)
209209

210-
obj_store_1 = check_deserialization(file_path_1, state_manager, 'first')
210+
identifiable_store_1 = check_deserialization(file_path_1, state_manager, 'first')
211211

212-
obj_store_2 = check_deserialization(file_path_2, state_manager, 'second')
212+
identifiable_store_2 = check_deserialization(file_path_2, state_manager, 'second')
213213

214214
if state_manager.status is Status.FAILED:
215215
state_manager.add_step('Check if data in files are equal')
@@ -219,7 +219,7 @@ def check_xml_files_equivalence(file_path_1: str, file_path_2: str, state_manage
219219
checker = AASDataChecker(raise_immediately=False, **kwargs)
220220
try:
221221
state_manager.add_step('Check if data in files are equal')
222-
checker.check_identifiable_store(obj_store_1, obj_store_2)
222+
checker.check_identifiable_store(identifiable_store_1, identifiable_store_2)
223223
except (KeyError, AssertionError) as error:
224224
state_manager.set_step_status(Status.FAILED)
225225
logger.error(error)

sdk/basyx/aas/examples/data/__init__.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def create_example() -> model.DictIdentifiableStore:
3333
3434
:return: object store
3535
"""
36-
obj_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
37-
obj_store.update(example_aas.create_full_example())
38-
obj_store.update(example_aas_mandatory_attributes.create_full_example())
39-
obj_store.update(example_aas_missing_attributes.create_full_example())
40-
obj_store.add(example_submodel_template.create_example_submodel_template())
41-
return obj_store
36+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
37+
identifiable_store.update(example_aas.create_full_example())
38+
identifiable_store.update(example_aas_mandatory_attributes.create_full_example())
39+
identifiable_store.update(example_aas_missing_attributes.create_full_example())
40+
identifiable_store.add(example_submodel_template.create_example_submodel_template())
41+
return identifiable_store
4242

4343

4444
def create_example_aas_binding() -> model.DictIdentifiableStore:
@@ -49,18 +49,18 @@ def create_example_aas_binding() -> model.DictIdentifiableStore:
4949
5050
:return: object store
5151
"""
52-
obj_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
53-
obj_store.update(example_aas.create_full_example())
54-
obj_store.update(example_aas_mandatory_attributes.create_full_example())
55-
obj_store.update(example_aas_missing_attributes.create_full_example())
56-
obj_store.add(example_submodel_template.create_example_submodel_template())
52+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
53+
identifiable_store.update(example_aas.create_full_example())
54+
identifiable_store.update(example_aas_mandatory_attributes.create_full_example())
55+
identifiable_store.update(example_aas_missing_attributes.create_full_example())
56+
identifiable_store.add(example_submodel_template.create_example_submodel_template())
5757

58-
aas = obj_store.get_item('https://acplt.org/Test_AssetAdministrationShell')
59-
sm = obj_store.get_item('https://acplt.org/Test_Submodel_Template')
58+
aas = identifiable_store.get_item('https://acplt.org/Test_AssetAdministrationShell')
59+
sm = identifiable_store.get_item('https://acplt.org/Test_Submodel_Template')
6060
assert (isinstance(aas, model.aas.AssetAdministrationShell)) # make mypy happy
6161
assert (isinstance(sm, model.submodel.Submodel)) # make mypy happy
6262
aas.submodel.add(model.ModelReference.from_referable(sm))
6363

64-
cd = obj_store.get_item('https://acplt.org/Test_ConceptDescription_Mandatory')
64+
cd = identifiable_store.get_item('https://acplt.org/Test_ConceptDescription_Mandatory')
6565
assert (isinstance(cd, model.concept.ConceptDescription)) # make mypy happy
66-
return obj_store
66+
return identifiable_store

sdk/basyx/aas/examples/data/example_aas.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ def create_full_example() -> model.DictIdentifiableStore:
5555
5656
:return: :class:`~basyx.aas.model.provider.DictIdentifiableStore`
5757
"""
58-
id_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
59-
id_store.add(create_example_asset_identification_submodel())
60-
id_store.add(create_example_bill_of_material_submodel())
61-
id_store.add(create_example_submodel())
62-
id_store.add(create_example_concept_description())
63-
id_store.add(create_example_asset_administration_shell())
64-
return id_store
58+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
59+
identifiable_store.add(create_example_asset_identification_submodel())
60+
identifiable_store.add(create_example_bill_of_material_submodel())
61+
identifiable_store.add(create_example_submodel())
62+
identifiable_store.add(create_example_concept_description())
63+
identifiable_store.add(create_example_asset_administration_shell())
64+
return identifiable_store
6565

6666

6767
def create_example_asset_identification_submodel() -> model.Submodel:
@@ -891,6 +891,6 @@ def check_example_submodel(checker: AASDataChecker, submodel: model.Submodel) ->
891891
checker.check_submodel_equal(submodel, expected_submodel)
892892

893893

894-
def check_full_example(checker: AASDataChecker, id_store: model.DictIdentifiableStore) -> None:
894+
def check_full_example(checker: AASDataChecker, identifiable_store: model.DictIdentifiableStore) -> None:
895895
expected_data = create_full_example()
896-
checker.check_identifiable_store(id_store, expected_data)
896+
checker.check_identifiable_store(identifiable_store, expected_data)

sdk/basyx/aas/examples/data/example_aas_mandatory_attributes.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ def create_full_example() -> model.DictIdentifiableStore:
3030
3131
:return: :class:`~basyx.aas.model.provider.DictIdentifiableStore`
3232
"""
33-
id_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
34-
id_store.add(create_example_submodel())
35-
id_store.add(create_example_empty_submodel())
36-
id_store.add(create_example_concept_description())
37-
id_store.add(create_example_asset_administration_shell())
38-
id_store.add(create_example_empty_asset_administration_shell())
39-
return id_store
33+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
34+
identifiable_store.add(create_example_submodel())
35+
identifiable_store.add(create_example_empty_submodel())
36+
identifiable_store.add(create_example_concept_description())
37+
identifiable_store.add(create_example_asset_administration_shell())
38+
identifiable_store.add(create_example_empty_asset_administration_shell())
39+
return identifiable_store
4040

4141

4242
def create_example_submodel() -> model.Submodel:
@@ -235,6 +235,6 @@ def check_example_empty_submodel(checker: AASDataChecker, submodel: model.Submod
235235
checker.check_submodel_equal(submodel, expected_submodel)
236236

237237

238-
def check_full_example(checker: AASDataChecker, id_store: model.DictIdentifiableStore) -> None:
238+
def check_full_example(checker: AASDataChecker, identifiable_store: model.DictIdentifiableStore) -> None:
239239
expected_data = create_full_example()
240-
checker.check_identifiable_store(id_store, expected_data)
240+
checker.check_identifiable_store(identifiable_store, expected_data)

sdk/basyx/aas/examples/data/example_aas_missing_attributes.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ def create_full_example() -> model.DictIdentifiableStore:
2525
2626
:return: :class:`basyx.aas.model.provider.DictIdentifiableStore`
2727
"""
28-
id_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
29-
id_store.add(create_example_submodel())
30-
id_store.add(create_example_concept_description())
31-
id_store.add(create_example_asset_administration_shell())
32-
return id_store
28+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
29+
identifiable_store.add(create_example_submodel())
30+
identifiable_store.add(create_example_concept_description())
31+
identifiable_store.add(create_example_asset_administration_shell())
32+
return identifiable_store
3333

3434

3535
def create_example_submodel() -> model.Submodel:
@@ -413,6 +413,6 @@ def check_example_submodel(checker: AASDataChecker, submodel: model.Submodel) ->
413413
checker.check_submodel_equal(submodel, expected_submodel)
414414

415415

416-
def check_full_example(checker: AASDataChecker, id_store: model.DictIdentifiableStore) -> None:
416+
def check_full_example(checker: AASDataChecker, identifiable_store: model.DictIdentifiableStore) -> None:
417417
expected_data = create_full_example()
418-
checker.check_identifiable_store(id_store, expected_data)
418+
checker.check_identifiable_store(identifiable_store, expected_data)

sdk/basyx/aas/examples/data/example_submodel_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2025 the Eclipse BaSyx Authors
1+
# Copyright (c) 2026 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.
@@ -339,7 +339,7 @@ def check_example_submodel(checker: AASDataChecker, submodel: model.Submodel) ->
339339
checker.check_submodel_equal(submodel, expected_submodel)
340340

341341

342-
def check_full_example(checker: AASDataChecker, id_store: model.DictIdentifiableStore) -> None:
342+
def check_full_example(checker: AASDataChecker, identifiable_store: model.DictIdentifiableStore) -> None:
343343
expected_data: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
344344
expected_data.add(create_example_submodel_template())
345-
checker.check_identifiable_store(id_store, expected_data)
345+
checker.check_identifiable_store(identifiable_store, expected_data)

sdk/basyx/aas/examples/tutorial_serialization_deserialization.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@
9393

9494
# step 4.1: creating an IdentifiableStore containing the objects to be serialized
9595
# For more information, take a look into `tutorial_storage.py`
96-
id_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
97-
id_store.add(submodel)
98-
id_store.add(aashell)
96+
identifiable_store: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore()
97+
identifiable_store.add(submodel)
98+
identifiable_store.add(aashell)
9999

100100
# step 4.2: writing the contents of the IdentifiableStore to a JSON file
101-
basyx.aas.adapter.json.write_aas_json_file('data.json', id_store)
101+
basyx.aas.adapter.json.write_aas_json_file('data.json', identifiable_store)
102102

103103
# We can pass the additional keyword argument `indent=4` to `write_aas_json_file()` to format the JSON file in a more
104104
# human-readable (but much more space-consuming) manner.
105105

106106
# step 4.3: writing the contents of the IdentifiableStore to an XML file
107-
basyx.aas.adapter.xml.write_aas_xml_file('data.xml', id_store)
107+
basyx.aas.adapter.xml.write_aas_xml_file('data.xml', identifiable_store)
108108

109109

110110
##################################################################

0 commit comments

Comments
 (0)