Skip to content

Commit

Permalink
mypy.ini: remove mypy.ini after fixing imports such that the config i…
Browse files Browse the repository at this point in the history
…s no more needed. .github/workflows/ci.yml: add line. sdk/basyx/tutorial_objectstore.py: fix import. sdk/test/test_objectstore.py: remove type ignores. sdk/basyx/__init__.py: add init for tutorial folder
  • Loading branch information
somsonson authored and s-heppner committed Sep 13, 2024
1 parent 18e9317 commit f796755
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ jobs:
run: |
ls
cd ./sdk
python -m build
python -m build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sdk/basyx_python_framework.egg-info/
/sdk/build
/dist/
/*.egg-info/
sdk/*.egg-info/
/docs/build/

# Coverage artifacts
Expand Down
2 changes: 0 additions & 2 deletions mypy.ini

This file was deleted.

Empty file added sdk/basyx/tutorial/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion sdk/basyx/tutorial/tutorial_objectstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: MIT

from sdk.basyx.object_store import ObjectStore
from basyx.object_store import ObjectStore
from aas_core3.types import Identifiable, AssetAdministrationShell, AssetInformation, AssetKind
import aas_core3.types as aas_types

Expand Down
8 changes: 5 additions & 3 deletions sdk/test/test_objectstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import unittest

from basyx.object_store import ObjectStore, ObjectProviderMultiplexer # type: ignore
from basyx.object_store import ObjectStore, ObjectProviderMultiplexer
from aas_core3.types import Identifiable, AssetAdministrationShell, AssetInformation, AssetKind
import aas_core3.types as aas_types

Expand All @@ -20,6 +20,9 @@ def setUp(self) -> None:
self.aas2 = AssetAdministrationShell(id="urn:x-test:aas2",
asset_information=AssetInformation(asset_kind=AssetKind.TYPE))

self.aas3 = AssetAdministrationShell(id="urn:x-test:aas3",
asset_information=AssetInformation(asset_kind=AssetKind.TYPE))

some_element = aas_types.Property(
id_short="some_property",
value_type=aas_types.DataTypeDefXSD.INT,
Expand Down Expand Up @@ -69,8 +72,7 @@ def test_store_retrieve(self) -> None:
object_store.add(self.aas1)
object_store.add(self.aas2)
self.assertIn(self.aas1, object_store)
property = aas_types.Property('test') # type: ignore
self.assertFalse(property in object_store)
self.assertFalse(self.aas3 in object_store)
aas3 = AssetAdministrationShell(id="urn:x-test:aas1", asset_information=AssetInformation(
global_asset_id="http://acplt.org/TestAsset/", asset_kind=AssetKind.NOT_APPLICABLE))
with self.assertRaises(KeyError) as cm:
Expand Down

0 comments on commit f796755

Please sign in to comment.