Skip to content

Commit

Permalink
Merge branch 'develop' into add_pyproject.toml_compliance_tool
Browse files Browse the repository at this point in the history
  • Loading branch information
s-heppner committed Jan 15, 2025
2 parents be0c20a + 1ca495f commit bb860ef
Show file tree
Hide file tree
Showing 26 changed files with 100 additions and 91 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
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
Expand Down Expand Up @@ -227,10 +227,10 @@ jobs:
working-directory: ./compliance_tool
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
- 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: |
Expand All @@ -253,10 +253,10 @@ jobs:
working-directory: ./compliance_tool
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
- 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: |
Expand All @@ -282,10 +282,10 @@ jobs:
working-directory: ./compliance_tool
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
- 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
Expand Down
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 the Eclipse BaSyx Authors
# Copyright (c) 2024 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) 2024 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) 2024 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) 2024 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) 2024 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
Empty file added compliance_tool/setup.py
Empty file.
10 changes: 5 additions & 5 deletions compliance_tool/test/files/test_demo_full_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
},
{
"language": "de",
"text": "Ein Beispiel-BillofMaterial-Submodel f\u00fcr eine Test-Anwendung"
"text": "Ein Beispiel-BillOfMaterial-Submodel f\u00fcr eine Test-Anwendung"
}
],
"modelType": "Submodel",
Expand Down Expand Up @@ -1309,7 +1309,7 @@
},
{
"language": "de",
"text": "Beispielswert f\u00fcr ein MulitLanguageProperty-Element"
"text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element"
}
],
"valueId": {
Expand Down Expand Up @@ -2281,7 +2281,7 @@
},
{
"language": "de",
"text": "Beispiel MulitLanguageProperty Element"
"text": "Beispiel MultiLanguageProperty Element"
}
],
"modelType": "MultiLanguageProperty",
Expand All @@ -2301,7 +2301,7 @@
},
{
"language": "de",
"text": "Beispielswert f\u00fcr ein MulitLanguageProperty-Element"
"text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element"
}
]
},
Expand Down Expand Up @@ -2825,7 +2825,7 @@
},
{
"language": "de",
"text": "Beispiel MulitLanguageProperty Element"
"text": "Beispiel MultiLanguageProperty Element"
}
],
"modelType": "MultiLanguageProperty",
Expand Down
10 changes: 5 additions & 5 deletions compliance_tool/test/files/test_demo_full_example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Ein Beispiel-BillofMaterial-Submodel für eine Test-Anwendung</aas:text>
<aas:text>Ein Beispiel-BillOfMaterial-Submodel für eine Test-Anwendung</aas:text>
</aas:langStringTextType>
</aas:description>
<aas:administration>
Expand Down Expand Up @@ -1424,7 +1424,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispielswert für ein MulitLanguageProperty-Element</aas:text>
<aas:text>Beispielwert für ein MultiLanguageProperty-Element</aas:text>
</aas:langStringTextType>
</aas:value>
<aas:valueId>
Expand Down Expand Up @@ -2109,7 +2109,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispiel MulitLanguageProperty Element</aas:text>
<aas:text>Beispiel MultiLanguageProperty Element</aas:text>
</aas:langStringTextType>
</aas:description>
<aas:semanticId>
Expand All @@ -2128,7 +2128,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispielswert für ein MulitLanguageProperty-Element</aas:text>
<aas:text>Beispielwert für ein MultiLanguageProperty-Element</aas:text>
</aas:langStringTextType>
</aas:value>
</aas:multiLanguageProperty>
Expand Down Expand Up @@ -2632,7 +2632,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispiel MulitLanguageProperty Element</aas:text>
<aas:text>Beispiel MultiLanguageProperty Element</aas:text>
</aas:langStringTextType>
</aas:description>
<aas:semanticId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
},
{
"language": "de",
"text": "Ein Beispiel-BillofMaterial-Submodel f\u00fcr eine Test-Anwendung"
"text": "Ein Beispiel-BillOfMaterial-Submodel f\u00fcr eine Test-Anwendung"
}
],
"modelType": "Submodel",
Expand Down Expand Up @@ -1317,7 +1317,7 @@
},
{
"language": "de",
"text": "Beispielswert f\u00fcr ein MulitLanguageProperty-Element"
"text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element"
}
],
"valueId": {
Expand Down Expand Up @@ -2289,7 +2289,7 @@
},
{
"language": "de",
"text": "Beispiel MulitLanguageProperty Element"
"text": "Beispiel MultiLanguageProperty Element"
}
],
"modelType": "MultiLanguageProperty",
Expand All @@ -2309,7 +2309,7 @@
},
{
"language": "de",
"text": "Beispielswert f\u00fcr ein MulitLanguageProperty-Element"
"text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element"
}
]
},
Expand Down Expand Up @@ -2833,7 +2833,7 @@
},
{
"language": "de",
"text": "Beispiel MulitLanguageProperty Element"
"text": "Beispiel MultiLanguageProperty Element"
}
],
"modelType": "MultiLanguageProperty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
},
{
"language": "de",
"text": "Ein Beispiel-BillofMaterial-Submodel f\u00fcr eine Test-Anwendung"
"text": "Ein Beispiel-BillOfMaterial-Submodel f\u00fcr eine Test-Anwendung"
}
],
"modelType": "Submodel",
Expand Down Expand Up @@ -1309,7 +1309,7 @@
},
{
"language": "de",
"text": "Beispielswert f\u00fcr ein MulitLanguageProperty-Element"
"text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element"
}
],
"valueId": {
Expand Down Expand Up @@ -2281,7 +2281,7 @@
},
{
"language": "de",
"text": "Beispiel MulitLanguageProperty Element"
"text": "Beispiel MultiLanguageProperty Element"
}
],
"modelType": "MultiLanguageProperty",
Expand All @@ -2301,7 +2301,7 @@
},
{
"language": "de",
"text": "Beispielswert f\u00fcr ein MulitLanguageProperty-Element"
"text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element"
}
]
},
Expand Down Expand Up @@ -2825,7 +2825,7 @@
},
{
"language": "de",
"text": "Beispiel MulitLanguageProperty Element"
"text": "Beispiel MultiLanguageProperty Element"
}
],
"modelType": "MultiLanguageProperty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Ein Beispiel-BillofMaterial-Submodel für eine Test-Anwendung</aas:text>
<aas:text>Ein Beispiel-BillOfMaterial-Submodel für eine Test-Anwendung</aas:text>
</aas:langStringTextType>
</aas:description>
<aas:administration>
Expand Down Expand Up @@ -1424,7 +1424,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispielswert für ein MulitLanguageProperty-Element</aas:text>
<aas:text>Beispielwert für ein MultiLanguageProperty-Element</aas:text>
</aas:langStringTextType>
</aas:value>
<aas:valueId>
Expand Down Expand Up @@ -2109,7 +2109,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispiel MulitLanguageProperty Element</aas:text>
<aas:text>Beispiel MultiLanguageProperty Element</aas:text>
</aas:langStringTextType>
</aas:description>
<aas:semanticId>
Expand All @@ -2128,7 +2128,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispielswert für ein MulitLanguageProperty-Element</aas:text>
<aas:text>Beispielwert für ein MultiLanguageProperty-Element</aas:text>
</aas:langStringTextType>
</aas:value>
</aas:multiLanguageProperty>
Expand Down Expand Up @@ -2632,7 +2632,7 @@
</aas:langStringTextType>
<aas:langStringTextType>
<aas:language>de</aas:language>
<aas:text>Beispiel MulitLanguageProperty Element</aas:text>
<aas:text>Beispiel MultiLanguageProperty Element</aas:text>
</aas:langStringTextType>
</aas:description>
<aas:semanticId>
Expand Down
Loading

0 comments on commit bb860ef

Please sign in to comment.