Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract compliance tool to be its own package #245

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
python-version: ["3.8", "3.10", "3.12"]
env:
COUCHDB_ADMIN_PASSWORD: "yo0Quai3"
AAS_SPECS_RELEASE_TAG: "V3.0.7"
services:
couchdb:
image: couchdb:3
Expand All @@ -28,6 +29,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Collect schema files from aas-specs
run: |
mkdir -p ./test/adapter/schema
curl -sSL -o ./test/adapter/schema/aasJSONSchema.json https://raw.githubusercontent.com/admin-shell-io/aas-specs/${{ env.AAS_SPECS_RELEASE_TAG }}/schemas/json/aas.json
curl -sSL -o ./test/adapter/schema/aasXMLSchema.xsd https://raw.githubusercontent.com/admin-shell-io/aas-specs/${{ env.AAS_SPECS_RELEASE_TAG }}/schemas/xml/AAS.xsd
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@

# customized config files
/test/test_config.ini
# Schema files needed for testing
/test/adapter/schemas
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ The BaSyx Python SDK project provides the `basax.aas` Python package with 6 subm
* `basyx.aas.model`: The AAS metamodel implemented in python
* `basyx.aas.adapter`: Adapters for various file formats
* `basyx.aas.backend`: Backend infrastructure for storing and retrieving AAS objects
* `basyx.aas.compliance_tool`: Compliance checker for AAS files
* `basyx.aas.util`: Provides utilities
* `basyx.aas.examples`: Example data and tutorials

Expand Down Expand Up @@ -152,22 +151,7 @@ A detailed, complete API documentation is available on Read the Docs: https://ba

### Compliance Tool

The Eclipse BaSyx Python SDK project contains a compliance tool for testing xml and json files is provided in the
`basyx.aas.compliance_tool`-package. Following functionalities are supported:

* create an xml or json file compliant to the official schema containing example Asset Administration Shell elements
* 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 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

Invoking should work with either `python -m basyx.aas.compliance_tool.cli` or (when installed correctly and PATH is set
correctly) with `aas-compliance-check` on the command line.

For further usage information consider the `basyx.aas.compliance_tool`-package or invoke with
`python -m basyx.aas.compliance_tool.cli --help` respectively `aas-compliance-check --help`.
The compliance tool functionality moved to [github.com/rwth-iat/aas-compliance-tool](https://github.com/rwth-iat/aas-compliance-tool).

## Contributing

Expand Down
3 changes: 0 additions & 3 deletions basyx/aas/adapter/json/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
AAS objects within a JSON file and return them as BaSyx Python SDK
:class:`ObjectStore <basyx.aas.model.provider.AbstractObjectStore>`.
"""
import os.path

from .json_serialization import AASToJsonEncoder, StrippedAASToJsonEncoder, write_aas_json_file, object_store_to_json
from .json_deserialization import AASFromJsonDecoder, StrictAASFromJsonDecoder, StrippedAASFromJsonDecoder, \
StrictStrippedAASFromJsonDecoder, read_aas_json_file, read_aas_json_file_into

JSON_SCHEMA_FILE = os.path.join(os.path.dirname(__file__), 'aasJSONSchema.json')
Loading
Loading