Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9c43465
fix redirect
Frosty2500 Dec 30, 2024
6969ae4
install locally instead from git
Frosty2500 Dec 30, 2024
7e55da7
update README and compose.yml
Frosty2500 Dec 31, 2024
6581547
fix server redirect path
Frosty2500 Dec 31, 2024
cf99983
raise error for invalid level
Frosty2500 Jan 1, 2025
e1c1a6f
show user that extent has not been implemented
Frosty2500 Jan 1, 2025
0f87e15
remove return code 422 since it is not specified in swagger
Frosty2500 Jan 1, 2025
bed3517
fix some typos
Frosty2500 Dec 29, 2024
b4e87cc
fix README.md
Frosty2500 Dec 29, 2024
cb1a11f
tutorial_serialization_deserialization: Fix missing import (#363)
Frosty2500 Jan 6, 2025
f0b7c34
README.md: Fix typo in Markdown Link
s-heppner Jan 2, 2025
1667641
compliance-tool: Fix compliance tool imports and unitests (#356)
Frosty2500 Jan 15, 2025
918acff
aasx.adapter: Fix `semantic_id` type deserialization of `ModelReferen…
JGrothoff Jan 15, 2025
8f9e28a
sdk: Update version of pyecma dependency in pyproject.toml
s-heppner Jan 20, 2025
c19bfd8
sdk: Move testing depencies to dev section in pyproject.toml (#369)
JGrothoff Jan 20, 2025
595b641
basyx.provider: Add SetObjectStore to provider (#340)
zrgt Jan 20, 2025
fc6103b
scripts.set_copyright_year: Add a CI check to ensure the copyright is…
Frosty2500 Feb 17, 2025
17950b9
sdk/.readthedocs.yaml: Install dependencies from pyproject.toml (#359)
Frosty2500 Feb 21, 2025
983113f
compliance_tool: add pyproject.toml (#361)
Frosty2500 Feb 21, 2025
c471b59
only copy sdk, update ci build of server
Frosty2500 Mar 31, 2025
d8b7daf
update copyright
Frosty2500 Mar 31, 2025
da018a6
add filtering by globalAssetId
Frosty2500 Apr 2, 2025
d7e2fc6
fix MyPy error
Frosty2500 Apr 2, 2025
db958fa
fix pycodestyle error
Frosty2500 Apr 3, 2025
b3c713a
adapt format of assetId filtering
Frosty2500 Apr 3, 2025
921ecc9
adapt cursor from 0-indexed to 1-indexed
Frosty2500 Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 57 additions & 36 deletions .github/workflows/ci.yml
Comment thread
Frosty2500 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
run:
working-directory: ./etc/scripts
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
Expand All @@ -29,12 +29,14 @@ jobs:
${{ env.X_PYTHON_MIN_VERSION }} \
${{ env.X_PYTHON_MAX_VERSION }}

- name: Check Python Versions coincide with the SDKs pyproject.toml
- name: Check Python Versions coincide with all pyproject.toml Files
run: |
python check_python_versions_coincide.py \
../../sdk/pyproject.toml \
${{ env.X_PYTHON_MIN_VERSION }} \
${{ env.X_PYTHON_MAX_VERSION }}
for file in ../../sdk/pyproject.toml ../../compliance_tool/pyproject.toml; do
python check_python_versions_coincide.py \
$file \
${{ env.X_PYTHON_MIN_VERSION }} \
${{ env.X_PYTHON_MAX_VERSION }}
done

# Todo: Check other pyproject.toml here as well, as we add them

Expand Down Expand Up @@ -72,7 +74,7 @@ jobs:
exit 1
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Collect schema files from aas-specs
Expand Down Expand Up @@ -104,7 +106,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
Expand All @@ -127,7 +129,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
Expand All @@ -153,7 +155,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
Expand All @@ -174,7 +176,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install dependencies
Expand All @@ -185,28 +187,45 @@ jobs:
run: |
python -m build

repository-check-copyright:
# This job checks that the copyright year in the header of all files is up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history is available
- name: Install required dependencies
run: |
sudo apt-get update
sudo apt-get install -y bash git
- name: Run copyright check
run: |
chmod +x ./etc/scripts/set_copyright_year.sh
./etc/scripts/set_copyright_year.sh --check


compliance-tool-test:
# This job runs the unittests on the python versions specified down at the matrix
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10", "3.12"]
python-version: ["3.9", "3.12"]
defaults:
run:
working-directory: ./compliance_tool

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
# install the local sdk in editable mode so it does not get overwritten
run: |
python -m pip install --upgrade pip
pip install coverage
pip install -r requirements.txt
pip install -e ../sdk[dev]
pip install .[dev]
- name: Test with coverage + unittest
run: |
coverage run --source=aas_compliance_tool -m unittest
Expand All @@ -223,16 +242,17 @@ jobs:
run:
working-directory: ./compliance_tool
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_VERSION }}
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
# install the local sdk in editable mode so it does not get overwritten
run: |
python -m pip install --upgrade pip
pip install pycodestyle mypy
pip install -r requirements.txt
pip install -e ../sdk[dev]
pip install .[dev]
- name: Check typing with MyPy
run: |
mypy ./aas_compliance_tool test
Expand All @@ -248,16 +268,17 @@ jobs:
run:
working-directory: ./compliance_tool
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_VERSION }}
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install Python dependencies
# install the local sdk in editable mode so it does not get overwritten
run: |
python -m pip install --upgrade pip
pip install pycodestyle mypy codeblocks
pip install -r requirements.txt
pip install -e ../sdk[dev]
pip install .[dev]
- name: Check typing with MyPy
run: |
mypy <(codeblocks python README.md)
Expand All @@ -276,18 +297,18 @@ jobs:
run:
working-directory: ./compliance_tool
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.X_PYTHON_VERSION }}
python-version: ${{ env.X_PYTHON_MIN_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install build
- name: Create source and wheel dist
run: |
python setup.py sdist bdist_wheel
python -m build

server-package:
# This job checks if we can build our server package
Expand All @@ -299,7 +320,7 @@ jobs:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
docker build -t basyx-python-server .
docker build -t basyx-python-server -f Dockerfile ..
- name: Run container
run: |
docker run -d --name basyx-python-server basyx-python-server
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ sdk/test/adapter/schemas

# Ignore dynamically generated version file
sdk/basyx/version.py
compliance_tool/aas_compliance_tool/version.py
Comment thread
Frosty2500 marked this conversation as resolved.

# ignore the content of the server storage
server/storage/
File renamed without changes.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ the further steps via the comments.
In order to effectively communicate, there are some conventions to respect when writing
commit messages and pull requests.

Similarily to when creating an issue, the commit title, as well as the PR title should
Similarly to when creating an issue, the commit title, as well as the PR title should
be as short as possible, ideally 72 characters or fewer using imperative language.
If a specific module is affected, please mention it at the beginning of the title.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ These are the currently implemented specifications:

| Specification | Version |
|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Part 1: Metamodel | [v3.0.1 (01001-3-1)](https://industrialdigitaltwin.org/wp-content/uploads/2024/06/IDTA-01001-3-0-1_SpecificationAssetAdministrationShell_Part1_Metamodel.pdf) |
| 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) |
Expand Down
2 changes: 1 addition & 1 deletion compliance_tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Following functionalities are supported:
* create an aasx file with xml or json files compliant to the official schema containing example Asset Administration
Shell elements
* check if a given xml or json file is compliant to the official schema
* check if a given xml, json or aasx file is readable even if it is not compliant to the offical schema
* check if a given xml, json or aasx file is readable even if it is not compliant to the official schema
* check if the data in a given xml, json or aasx file is the same as the example data
* check if two given xml, json or aasx files contain the same Asset Administration Shell elements in any order

Expand Down
11 changes: 6 additions & 5 deletions compliance_tool/aas_compliance_tool/cli.py
Comment thread
Frosty2500 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 the Eclipse BaSyx Authors
# Copyright (c) 2025 the Eclipse BaSyx Authors
#
# This program and the accompanying materials are made available under the terms of the MIT License, available in
# the LICENSE file of this project.
Expand All @@ -19,11 +19,12 @@

from basyx.aas.adapter import aasx
from basyx.aas.adapter.xml import write_aas_xml_file
from basyx.aas.compliance_tool import compliance_check_xml as compliance_tool_xml, \
compliance_check_json as compliance_tool_json, compliance_check_aasx as compliance_tool_aasx
from aas_compliance_tool import compliance_check_xml as compliance_tool_xml, \
compliance_check_json as compliance_tool_json, \
compliance_check_aasx as compliance_tool_aasx
from basyx.aas.adapter.json import write_aas_json_file
from basyx.aas.examples.data import create_example, create_example_aas_binding, TEST_PDF_FILE
from basyx.aas.compliance_tool.state_manager import ComplianceToolStateManager, Status
from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status


def parse_cli_arguments() -> argparse.ArgumentParser:
Expand Down Expand Up @@ -71,7 +72,7 @@ def parse_cli_arguments() -> argparse.ArgumentParser:
'f or file_compare: checks if two given files contain the same aas elements in any order')
parser.add_argument('file_1', help="path to file 1")
parser.add_argument('file_2', nargs='?', default=None, help="path to file 2: is required if action f or files is "
"choosen")
"chosen")
parser.add_argument('-v', '--verbose', help="Print detailed information for each check. Multiple -v options "
"increase the verbosity. 1: Detailed error information, 2: Additional "
"detailed success information", action='count', default=0)
Expand Down
6 changes: 3 additions & 3 deletions compliance_tool/aas_compliance_tool/compliance_check_aasx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 the Eclipse BaSyx Authors
# Copyright (c) 2025 the Eclipse BaSyx Authors
#
# This program and the accompanying materials are made available under the terms of the MIT License, available in
# the LICENSE file of this project.
Expand All @@ -19,14 +19,14 @@

import pyecma376_2

from . import compliance_check_json, compliance_check_xml
from aas_compliance_tool import compliance_check_json, compliance_check_xml
from basyx.aas import model
from basyx.aas.adapter import aasx
from basyx.aas.adapter.xml import xml_deserialization
from basyx.aas.adapter.json import json_deserialization
from basyx.aas.examples.data import example_aas, create_example_aas_binding
from basyx.aas.examples.data._helper import AASDataChecker, DataChecker
from .state_manager import ComplianceToolStateManager, Status
from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status


def check_deserialization(file_path: str, state_manager: ComplianceToolStateManager,
Expand Down
4 changes: 2 additions & 2 deletions compliance_tool/aas_compliance_tool/compliance_check_json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 the Eclipse BaSyx Authors
# Copyright (c) 2025 the Eclipse BaSyx Authors
#
# This program and the accompanying materials are made available under the terms of the MIT License, available in
# the LICENSE file of this project.
Expand All @@ -20,7 +20,7 @@
from basyx.aas.adapter.json import json_deserialization
from basyx.aas.examples.data import example_aas, create_example
from basyx.aas.examples.data._helper import AASDataChecker
from .state_manager import ComplianceToolStateManager, Status
from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status


JSON_SCHEMA_FILE = os.path.join(os.path.dirname(__file__), 'schemas/aasJSONSchema.json')
Expand Down
4 changes: 2 additions & 2 deletions compliance_tool/aas_compliance_tool/compliance_check_xml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 the Eclipse BaSyx Authors
# Copyright (c) 2025 the Eclipse BaSyx Authors
#
# This program and the accompanying materials are made available under the terms of the MIT License, available in
# the LICENSE file of this project.
Expand All @@ -20,7 +20,7 @@
from basyx.aas.adapter.xml import xml_deserialization
from basyx.aas.examples.data import example_aas, create_example
from basyx.aas.examples.data._helper import AASDataChecker
from .state_manager import ComplianceToolStateManager, Status
from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status


XML_SCHEMA_FILE = os.path.join(os.path.dirname(__file__), 'schemas/aasXMLSchema.xsd')
Expand Down
2 changes: 1 addition & 1 deletion compliance_tool/aas_compliance_tool/state_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 the Eclipse BaSyx Authors
# Copyright (c) 2025 the Eclipse BaSyx Authors
#
# This program and the accompanying materials are made available under the terms of the MIT License, available in
# the LICENSE file of this project.
Expand Down
Loading