diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ded4cb0e..9ccd99446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ env: X_PYTHON_VERSION: "3.12" jobs: - test: + sdk-test: # This job runs the unittests on the python versions specified down at the matrix runs-on: ubuntu-latest strategy: @@ -28,6 +28,9 @@ jobs: env: COUCHDB_USER: "admin" COUCHDB_PASSWORD: ${{ env.COUCHDB_ADMIN_PASSWORD }} + defaults: + run: + working-directory: ./sdk steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -54,9 +57,12 @@ jobs: run: | coverage report -m - static-analysis: + sdk-static-analysis: # This job runs static code analysis, namely pycodestyle and mypy runs-on: ubuntu-latest + defaults: + run: + working-directory: ./sdk steps: - uses: actions/checkout@v2 - name: Set up Python ${{ env.X_PYTHON_VERSION }} @@ -74,9 +80,12 @@ jobs: run: | pycodestyle --count --max-line-length 120 basyx test - readme-codeblocks: + sdk-readme-codeblocks: # This job runs the same static code analysis (mypy and pycodestyle) on the codeblocks in our docstrings. runs-on: ubuntu-latest + defaults: + run: + working-directory: ./sdk steps: - uses: actions/checkout@v2 - name: Set up Python ${{ env.X_PYTHON_VERSION }} @@ -97,9 +106,12 @@ jobs: run: | codeblocks python README.md | python - docs: + sdk-docs: # This job checks, if the automatically generated documentation using sphinx can be compiled runs-on: ubuntu-latest + defaults: + run: + working-directory: ./sdk steps: - uses: actions/checkout@v2 - name: Set up Python ${{ env.X_PYTHON_VERSION }} @@ -115,9 +127,12 @@ jobs: run: | SPHINXOPTS="-a -E -n -W --keep-going" make -C docs html - package: + sdk-package: # This job checks if we can build our SDK package runs-on: ubuntu-latest + defaults: + run: + working-directory: ./sdk steps: - uses: actions/checkout@v2 - name: Set up Python ${{ env.X_PYTHON_VERSION }} diff --git a/.gitignore b/.gitignore index eb5b0c468..463a0f0f2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,27 +4,27 @@ /.mypy_cache/ # Typical virtualenv dir -/venv/ +venv/ # IDE settings -/.idea/ +.idea/ # Python distribution artifacts -/build/ -/dist/ -/*.egg-info/ -/docs/build/ +build/ +dist/ +*.egg-info/ +docs/build/ # Coverage artifacts -/.coverage -/htmlcov/ -/docs/build/ -/.hypothesis/ +.coverage +htmlcov/ +docs/build/ +.hypothesis/ # customized config files -/test/test_config.ini +sdk/test/test_config.ini # Schema files needed for testing -/test/adapter/schemas +sdk/test/adapter/schemas # Ignore dynamically generated version file -basyx/version.py +sdk/basyx/version.py diff --git a/README.md b/README.md index ac30e4054..c2f8a83e6 100644 --- a/README.md +++ b/README.md @@ -6,33 +6,28 @@ The Eclipse BaSyx Python project focuses on providing a Python implementation of for Industry 4.0 Systems. These are the currently implemented specifications: -| Specification | Version | -|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Part 1: Metamodel | [v3.0 (01001-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/06/IDTA-01001-3-0_SpecificationAssetAdministrationShell_Part1_Metamodel.pdf) | -| Part 2: API | not implemented yet | +| Specification | Version | +|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Part 1: Metamodel | [v3.0 (01001-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/06/IDTA-01001-3-0_SpecificationAssetAdministrationShell_Part1_Metamodel.pdf) | +| 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) | -| Part 5: Package File Format (AASX) | [v3.0 (01005-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01005-3-0_SpecificationAssetAdministrationShell_Part5_AASXPackageFileFormat.pdf) | +| Part 5: Package File Format (AASX) | [v3.0 (01005-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01005-3-0_SpecificationAssetAdministrationShell_Part5_AASXPackageFileFormat.pdf) | ## Features - -* Modelling of AASs as Python objects - * **except for**: *HasDataSpecification* -* Reading and writing of AASX package files -* (De-)serialization of AAS objects into/from JSON and XML -* Storing of AAS objects in CouchDB, Backend infrastructure for easy expansion -* Compliance checking of AAS XML and JSON files - - -### Project Structure - -The BaSyx Python SDK project provides the `basax.aas` Python package with 6 submodules: - -* `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.util`: Provides utilities -* `basyx.aas.examples`: Example data and tutorials - +This repository is structured into separate packages. +The `sdk` directory provides the AAS metamodel as Python objects and fundamental functionalities to handle AAS. +The `server` is to be determined. +The `compliance_tool` is to be determined. + +* SDK + * Modelling of AASs as Python objects + * **except for**: *HasDataSpecification* + * Reading and writing of AASX package files + * (De-)serialization of AAS objects into/from JSON and XML + * Storing of AAS objects in CouchDB, Backend infrastructure for easy expansion + * Compliance checking of AAS XML and JSON files +* Server (tbd) +* Compliance Tool (tbd) ## License @@ -52,110 +47,9 @@ If the changes do not warrant a release, the decision is postponed to the next m Additionally, security fixes may be released at any point. - -## Dependencies - -The BaSyx Python SDK requires the following Python packages to be installed for production usage. These dependencies are listed in -`setup.py` to be fetched automatically when installing with `pip`: -* `lxml` (BSD 3-clause License, using `libxml2` under MIT License) -* `python-dateutil` (BSD 3-clause License) -* `pyecma376-2` (Apache License v2.0) -* `urllib3` (MIT License) -* `Werkzeug` (BSD 3-clause License) - -Optional production usage dependencies: -* For using the Compliance Tool to validate JSON files against the JSON Schema: `jsonschema` and its -dependencies (MIT License, Apache License, PSF License) - -Development/testing/documentation/example dependencies (see `requirements.txt`): -* `jsonschema` and its dependencies (MIT License, Apache License, PSF License) - -Dependencies for building the documentation (see `docs/add-requirements.txt`): -* `Sphinx` and its dependencies (BSD 2-clause License, MIT License, Apache License) -* `sphinx-rtd-theme` and its dependencies (MIT License, PSF License) -* `sphinx-argparse` (MIT License) - - -## Getting Started - -### Installation - -Eclipse BaSyx Python SDK can be installed from PyPI, the Python Package Index, just as nearly every other Python package: -```bash -pip install basyx-python-sdk -``` - -For working with the current development version, you can also install the package directly from GitHub, using Pip's Git feature: -```bash -pip install git+https://github.com/eclipse-basyx/basyx-python-sdk.git@main -``` - -You may want to use a Python's `venv` or a similar tool to install BaSyx Python SDK and its dependencies only in a project-specific local environment. - - -### Example - -The following code example shows how to create a `Submodel` with a `Property` serialize it into an XML file using the -Eclipse BaSyx Python SDK: - -Create a `Submodel`: -```python -from basyx.aas import model # Import all BaSyx Python SDK classes from the model package - -identifier = 'https://acplt.org/Simple_Submodel' -submodel = model.Submodel(identifier) -``` - -Create a `Property` and add it to the `Submodel`: -```python -# create an external reference to a semantic description of the property -semantic_reference = model.ExternalReference( - (model.Key( - type_=model.KeyTypes.GLOBAL_REFERENCE, - value='http://acplt.org/Properties/SimpleProperty' - ),) -) -property = model.Property( - id_short='ExampleProperty', # Identifying string of the element within the submodel namespace - value_type=model.datatypes.String, # Data type of the value - value='exampleValue', # Value of the property - semantic_id=semantic_reference # set the semantic reference -) -submodel.submodel_element.add(property) -``` - -Serialize the `Submodel` to XML: -```python -from basyx.aas.adapter.xml import write_aas_xml_file - -data: model.DictObjectStore[model.Identifiable] = model.DictObjectStore() -data.add(submodel) -write_aas_xml_file(file='Simple_Submodel.xml', data=data) -``` - - -### Examples and Tutorials - -For further examples and tutorials, check out the `basyx.aas.examples`-package. Here is a quick overview: - -* [`tutorial_create_simple_aas`](./basyx/aas/examples/tutorial_create_simple_aas.py): Create an Asset Administration Shell, including an Asset object and a Submodel -* [`tutorial_storage`](./basyx/aas/examples/tutorial_storage.py): Manage a larger number of Asset Administration Shells in an ObjectStore and resolve references -* [`tutorial_serialization_deserialization`](./basyx/aas/examples/tutorial_serialization_deserialization.py): Use the JSON and XML serialization/deserialization for single objects or full standard-compliant files -* [`tutorial_aasx`](./basyx/aas/examples/tutorial_aasx.py): Export Asset Administration Shells with related objects and auxiliary files to AASX package files -* [`tutorial_backend_couchdb`](./basyx/aas/examples/tutorial_backend_couchdb.py): Use the *Backends* interface (`update()/commit()` methods) to manage and retrieve AAS objects in a CouchDB document database - - -### Documentation - -A detailed, complete API documentation is available on Read the Docs: https://basyx-python-sdk.readthedocs.io - -### Compliance Tool - -The compliance tool functionality moved to [github.com/rwth-iat/aas-compliance-tool](https://github.com/rwth-iat/aas-compliance-tool). - ## Contributing -For contributing with issues and code, please see our [Contribution Guideline](CONTRIBUTING.md). +For contributing with issues and code, please see our [Contribution Guideline](../CONTRIBUTING.md). ### Eclipse Contributor Agreement diff --git a/.readthedocs.yaml b/sdk/.readthedocs.yaml similarity index 100% rename from .readthedocs.yaml rename to sdk/.readthedocs.yaml diff --git a/sdk/README.md b/sdk/README.md new file mode 100644 index 000000000..fde12b465 --- /dev/null +++ b/sdk/README.md @@ -0,0 +1,136 @@ +# Eclipse BaSyx Python SDK + +(formerly known as PyI40AAS – Python Industry 4.0 Asset Administration Shell) + +The Eclipse BaSyx Python project focuses on providing a Python implementation of the Asset Administration Shell (AAS) +for Industry 4.0 Systems. + +## Features + +* Modelling of AASs as Python objects + * **except for**: *HasDataSpecification* +* Reading and writing of AASX package files +* (De-)serialization of AAS objects into/from JSON and XML +* Storing of AAS objects in CouchDB, Backend infrastructure for easy expansion +* Compliance checking of AAS XML and JSON files + + +### Project Structure + +The BaSyx Python SDK project provides the `basax.aas` Python package with 6 submodules: + +* `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.util`: Provides utilities +* `basyx.aas.examples`: Example data and tutorials + + +## License + +The BaSyx Python SDK project is licensed under the terms of the MIT License. + +SPDX-License-Identifier: MIT + +For more information, especially considering the licenses of included third-party works, please consult the `NOTICE` +file. + +## Dependencies + +The BaSyx Python SDK requires the following Python packages to be installed for production usage. These dependencies are listed in +`setup.py` to be fetched automatically when installing with `pip`: +* `lxml` (BSD 3-clause License, using `libxml2` under MIT License) +* `python-dateutil` (BSD 3-clause License) +* `pyecma376-2` (Apache License v2.0) +* `urllib3` (MIT License) +* `Werkzeug` (BSD 3-clause License) + +Optional production usage dependencies: +* For using the Compliance Tool to validate JSON files against the JSON Schema: `jsonschema` and its +dependencies (MIT License, Apache License, PSF License) + +Development/testing/documentation/example dependencies (see `requirements.txt`): +* `jsonschema` and its dependencies (MIT License, Apache License, PSF License) + +Dependencies for building the documentation (see `docs/add-requirements.txt`): +* `Sphinx` and its dependencies (BSD 2-clause License, MIT License, Apache License) +* `sphinx-rtd-theme` and its dependencies (MIT License, PSF License) +* `sphinx-argparse` (MIT License) + + +## Getting Started + +### Installation + +Eclipse BaSyx Python SDK can be installed from PyPI, the Python Package Index, just as nearly every other Python package: +```bash +pip install basyx-python-sdk +``` + +For working with the current development version, you can also install the package directly from GitHub, using Pip's Git feature: +```bash +pip install --no-cache-dir git+https://github.com/eclipse-basyx/basyx-python-sdk@main#subdirectory=sdk +``` + +You may want to use a Python's `venv` or a similar tool to install BaSyx Python SDK and its dependencies only in a project-specific local environment. + + +### Example + +The following code example shows how to create a `Submodel` with a `Property` serialize it into an XML file using the +Eclipse BaSyx Python SDK: + +Create a `Submodel`: +```python +from basyx.aas import model # Import all BaSyx Python SDK classes from the model package + +identifier = 'https://acplt.org/Simple_Submodel' +submodel = model.Submodel(identifier) +``` + +Create a `Property` and add it to the `Submodel`: +```python +# create an external reference to a semantic description of the property +semantic_reference = model.ExternalReference( + (model.Key( + type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/SimpleProperty' + ),) +) +property = model.Property( + id_short='ExampleProperty', # Identifying string of the element within the submodel namespace + value_type=model.datatypes.String, # Data type of the value + value='exampleValue', # Value of the property + semantic_id=semantic_reference # set the semantic reference +) +submodel.submodel_element.add(property) +``` + +Serialize the `Submodel` to XML: +```python +from basyx.aas.adapter.xml import write_aas_xml_file + +data: model.DictObjectStore[model.Identifiable] = model.DictObjectStore() +data.add(submodel) +write_aas_xml_file(file='Simple_Submodel.xml', data=data) +``` + + +### Examples and Tutorials + +For further examples and tutorials, check out the `basyx.aas.examples`-package. Here is a quick overview: + +* [`tutorial_create_simple_aas`](./basyx/aas/examples/tutorial_create_simple_aas.py): Create an Asset Administration Shell, including an Asset object and a Submodel +* [`tutorial_storage`](./basyx/aas/examples/tutorial_storage.py): Manage a larger number of Asset Administration Shells in an ObjectStore and resolve references +* [`tutorial_serialization_deserialization`](./basyx/aas/examples/tutorial_serialization_deserialization.py): Use the JSON and XML serialization/deserialization for single objects or full standard-compliant files +* [`tutorial_aasx`](./basyx/aas/examples/tutorial_aasx.py): Export Asset Administration Shells with related objects and auxiliary files to AASX package files +* [`tutorial_backend_couchdb`](./basyx/aas/examples/tutorial_backend_couchdb.py): Use the *Backends* interface (`update()/commit()` methods) to manage and retrieve AAS objects in a CouchDB document database + + +### Documentation + +A detailed, complete API documentation is available on Read the Docs: https://basyx-python-sdk.readthedocs.io + +### Compliance Tool + +The compliance tool functionality moved to [github.com/rwth-iat/aas-compliance-tool](https://github.com/rwth-iat/aas-compliance-tool). diff --git a/basyx/__init__.py b/sdk/basyx/__init__.py similarity index 100% rename from basyx/__init__.py rename to sdk/basyx/__init__.py diff --git a/basyx/aas/__init__.py b/sdk/basyx/aas/__init__.py similarity index 100% rename from basyx/aas/__init__.py rename to sdk/basyx/aas/__init__.py diff --git a/basyx/aas/adapter/__init__.py b/sdk/basyx/aas/adapter/__init__.py similarity index 100% rename from basyx/aas/adapter/__init__.py rename to sdk/basyx/aas/adapter/__init__.py diff --git a/basyx/aas/adapter/_generic.py b/sdk/basyx/aas/adapter/_generic.py similarity index 100% rename from basyx/aas/adapter/_generic.py rename to sdk/basyx/aas/adapter/_generic.py diff --git a/basyx/aas/adapter/aasx.py b/sdk/basyx/aas/adapter/aasx.py similarity index 100% rename from basyx/aas/adapter/aasx.py rename to sdk/basyx/aas/adapter/aasx.py diff --git a/basyx/aas/adapter/http.py b/sdk/basyx/aas/adapter/http.py similarity index 100% rename from basyx/aas/adapter/http.py rename to sdk/basyx/aas/adapter/http.py diff --git a/basyx/aas/adapter/json/__init__.py b/sdk/basyx/aas/adapter/json/__init__.py similarity index 100% rename from basyx/aas/adapter/json/__init__.py rename to sdk/basyx/aas/adapter/json/__init__.py diff --git a/basyx/aas/adapter/json/json_deserialization.py b/sdk/basyx/aas/adapter/json/json_deserialization.py similarity index 100% rename from basyx/aas/adapter/json/json_deserialization.py rename to sdk/basyx/aas/adapter/json/json_deserialization.py diff --git a/basyx/aas/adapter/json/json_serialization.py b/sdk/basyx/aas/adapter/json/json_serialization.py similarity index 100% rename from basyx/aas/adapter/json/json_serialization.py rename to sdk/basyx/aas/adapter/json/json_serialization.py diff --git a/basyx/aas/adapter/xml/__init__.py b/sdk/basyx/aas/adapter/xml/__init__.py similarity index 100% rename from basyx/aas/adapter/xml/__init__.py rename to sdk/basyx/aas/adapter/xml/__init__.py diff --git a/basyx/aas/adapter/xml/xml_deserialization.py b/sdk/basyx/aas/adapter/xml/xml_deserialization.py similarity index 100% rename from basyx/aas/adapter/xml/xml_deserialization.py rename to sdk/basyx/aas/adapter/xml/xml_deserialization.py diff --git a/basyx/aas/adapter/xml/xml_serialization.py b/sdk/basyx/aas/adapter/xml/xml_serialization.py similarity index 100% rename from basyx/aas/adapter/xml/xml_serialization.py rename to sdk/basyx/aas/adapter/xml/xml_serialization.py diff --git a/basyx/aas/backend/__init__.py b/sdk/basyx/aas/backend/__init__.py similarity index 100% rename from basyx/aas/backend/__init__.py rename to sdk/basyx/aas/backend/__init__.py diff --git a/basyx/aas/backend/backends.py b/sdk/basyx/aas/backend/backends.py similarity index 100% rename from basyx/aas/backend/backends.py rename to sdk/basyx/aas/backend/backends.py diff --git a/basyx/aas/backend/couchdb.py b/sdk/basyx/aas/backend/couchdb.py similarity index 100% rename from basyx/aas/backend/couchdb.py rename to sdk/basyx/aas/backend/couchdb.py diff --git a/basyx/aas/backend/local_file.py b/sdk/basyx/aas/backend/local_file.py similarity index 100% rename from basyx/aas/backend/local_file.py rename to sdk/basyx/aas/backend/local_file.py diff --git a/basyx/aas/examples/__init__.py b/sdk/basyx/aas/examples/__init__.py similarity index 100% rename from basyx/aas/examples/__init__.py rename to sdk/basyx/aas/examples/__init__.py diff --git a/basyx/aas/examples/data/TestFile.pdf b/sdk/basyx/aas/examples/data/TestFile.pdf similarity index 100% rename from basyx/aas/examples/data/TestFile.pdf rename to sdk/basyx/aas/examples/data/TestFile.pdf diff --git a/basyx/aas/examples/data/__init__.py b/sdk/basyx/aas/examples/data/__init__.py similarity index 100% rename from basyx/aas/examples/data/__init__.py rename to sdk/basyx/aas/examples/data/__init__.py diff --git a/basyx/aas/examples/data/_helper.py b/sdk/basyx/aas/examples/data/_helper.py similarity index 100% rename from basyx/aas/examples/data/_helper.py rename to sdk/basyx/aas/examples/data/_helper.py diff --git a/basyx/aas/examples/data/example_aas.py b/sdk/basyx/aas/examples/data/example_aas.py similarity index 100% rename from basyx/aas/examples/data/example_aas.py rename to sdk/basyx/aas/examples/data/example_aas.py diff --git a/basyx/aas/examples/data/example_aas_mandatory_attributes.py b/sdk/basyx/aas/examples/data/example_aas_mandatory_attributes.py similarity index 100% rename from basyx/aas/examples/data/example_aas_mandatory_attributes.py rename to sdk/basyx/aas/examples/data/example_aas_mandatory_attributes.py diff --git a/basyx/aas/examples/data/example_aas_missing_attributes.py b/sdk/basyx/aas/examples/data/example_aas_missing_attributes.py similarity index 100% rename from basyx/aas/examples/data/example_aas_missing_attributes.py rename to sdk/basyx/aas/examples/data/example_aas_missing_attributes.py diff --git a/basyx/aas/examples/data/example_submodel_template.py b/sdk/basyx/aas/examples/data/example_submodel_template.py similarity index 100% rename from basyx/aas/examples/data/example_submodel_template.py rename to sdk/basyx/aas/examples/data/example_submodel_template.py diff --git a/basyx/aas/examples/tutorial_aasx.py b/sdk/basyx/aas/examples/tutorial_aasx.py similarity index 100% rename from basyx/aas/examples/tutorial_aasx.py rename to sdk/basyx/aas/examples/tutorial_aasx.py diff --git a/basyx/aas/examples/tutorial_backend_couchdb.py b/sdk/basyx/aas/examples/tutorial_backend_couchdb.py similarity index 100% rename from basyx/aas/examples/tutorial_backend_couchdb.py rename to sdk/basyx/aas/examples/tutorial_backend_couchdb.py diff --git a/basyx/aas/examples/tutorial_create_simple_aas.py b/sdk/basyx/aas/examples/tutorial_create_simple_aas.py similarity index 100% rename from basyx/aas/examples/tutorial_create_simple_aas.py rename to sdk/basyx/aas/examples/tutorial_create_simple_aas.py diff --git a/basyx/aas/examples/tutorial_serialization_deserialization.py b/sdk/basyx/aas/examples/tutorial_serialization_deserialization.py similarity index 100% rename from basyx/aas/examples/tutorial_serialization_deserialization.py rename to sdk/basyx/aas/examples/tutorial_serialization_deserialization.py diff --git a/basyx/aas/examples/tutorial_storage.py b/sdk/basyx/aas/examples/tutorial_storage.py similarity index 100% rename from basyx/aas/examples/tutorial_storage.py rename to sdk/basyx/aas/examples/tutorial_storage.py diff --git a/basyx/aas/model/__init__.py b/sdk/basyx/aas/model/__init__.py similarity index 100% rename from basyx/aas/model/__init__.py rename to sdk/basyx/aas/model/__init__.py diff --git a/basyx/aas/model/_string_constraints.py b/sdk/basyx/aas/model/_string_constraints.py similarity index 100% rename from basyx/aas/model/_string_constraints.py rename to sdk/basyx/aas/model/_string_constraints.py diff --git a/basyx/aas/model/aas.py b/sdk/basyx/aas/model/aas.py similarity index 100% rename from basyx/aas/model/aas.py rename to sdk/basyx/aas/model/aas.py diff --git a/basyx/aas/model/base.py b/sdk/basyx/aas/model/base.py similarity index 100% rename from basyx/aas/model/base.py rename to sdk/basyx/aas/model/base.py diff --git a/basyx/aas/model/concept.py b/sdk/basyx/aas/model/concept.py similarity index 100% rename from basyx/aas/model/concept.py rename to sdk/basyx/aas/model/concept.py diff --git a/basyx/aas/model/datatypes.py b/sdk/basyx/aas/model/datatypes.py similarity index 100% rename from basyx/aas/model/datatypes.py rename to sdk/basyx/aas/model/datatypes.py diff --git a/basyx/aas/model/provider.py b/sdk/basyx/aas/model/provider.py similarity index 100% rename from basyx/aas/model/provider.py rename to sdk/basyx/aas/model/provider.py diff --git a/basyx/aas/model/submodel.py b/sdk/basyx/aas/model/submodel.py similarity index 100% rename from basyx/aas/model/submodel.py rename to sdk/basyx/aas/model/submodel.py diff --git a/basyx/aas/util/__init__.py b/sdk/basyx/aas/util/__init__.py similarity index 100% rename from basyx/aas/util/__init__.py rename to sdk/basyx/aas/util/__init__.py diff --git a/basyx/aas/util/identification.py b/sdk/basyx/aas/util/identification.py similarity index 100% rename from basyx/aas/util/identification.py rename to sdk/basyx/aas/util/identification.py diff --git a/basyx/aas/util/traversal.py b/sdk/basyx/aas/util/traversal.py similarity index 100% rename from basyx/aas/util/traversal.py rename to sdk/basyx/aas/util/traversal.py diff --git a/basyx/py.typed b/sdk/basyx/py.typed similarity index 100% rename from basyx/py.typed rename to sdk/basyx/py.typed diff --git a/docs/Makefile b/sdk/docs/Makefile similarity index 100% rename from docs/Makefile rename to sdk/docs/Makefile diff --git a/docs/add-requirements.txt b/sdk/docs/add-requirements.txt similarity index 100% rename from docs/add-requirements.txt rename to sdk/docs/add-requirements.txt diff --git a/docs/make.bat b/sdk/docs/make.bat similarity index 100% rename from docs/make.bat rename to sdk/docs/make.bat diff --git a/docs/source/_static/custom.css b/sdk/docs/source/_static/custom.css similarity index 100% rename from docs/source/_static/custom.css rename to sdk/docs/source/_static/custom.css diff --git a/docs/source/adapter/aasx.rst b/sdk/docs/source/adapter/aasx.rst similarity index 100% rename from docs/source/adapter/aasx.rst rename to sdk/docs/source/adapter/aasx.rst diff --git a/docs/source/adapter/index.rst b/sdk/docs/source/adapter/index.rst similarity index 100% rename from docs/source/adapter/index.rst rename to sdk/docs/source/adapter/index.rst diff --git a/docs/source/adapter/json.rst b/sdk/docs/source/adapter/json.rst similarity index 100% rename from docs/source/adapter/json.rst rename to sdk/docs/source/adapter/json.rst diff --git a/docs/source/adapter/xml.rst b/sdk/docs/source/adapter/xml.rst similarity index 100% rename from docs/source/adapter/xml.rst rename to sdk/docs/source/adapter/xml.rst diff --git a/docs/source/backend/backends.rst b/sdk/docs/source/backend/backends.rst similarity index 100% rename from docs/source/backend/backends.rst rename to sdk/docs/source/backend/backends.rst diff --git a/docs/source/backend/couchdb.rst b/sdk/docs/source/backend/couchdb.rst similarity index 100% rename from docs/source/backend/couchdb.rst rename to sdk/docs/source/backend/couchdb.rst diff --git a/docs/source/backend/index.rst b/sdk/docs/source/backend/index.rst similarity index 100% rename from docs/source/backend/index.rst rename to sdk/docs/source/backend/index.rst diff --git a/docs/source/backend/local_file.rst b/sdk/docs/source/backend/local_file.rst similarity index 100% rename from docs/source/backend/local_file.rst rename to sdk/docs/source/backend/local_file.rst diff --git a/docs/source/conf.py b/sdk/docs/source/conf.py similarity index 100% rename from docs/source/conf.py rename to sdk/docs/source/conf.py diff --git a/docs/source/constraints.rst b/sdk/docs/source/constraints.rst similarity index 100% rename from docs/source/constraints.rst rename to sdk/docs/source/constraints.rst diff --git a/docs/source/examples/_helper.rst b/sdk/docs/source/examples/_helper.rst similarity index 100% rename from docs/source/examples/_helper.rst rename to sdk/docs/source/examples/_helper.rst diff --git a/docs/source/examples/example_aas.rst b/sdk/docs/source/examples/example_aas.rst similarity index 100% rename from docs/source/examples/example_aas.rst rename to sdk/docs/source/examples/example_aas.rst diff --git a/docs/source/examples/example_aas_mandatory_attributes.rst b/sdk/docs/source/examples/example_aas_mandatory_attributes.rst similarity index 100% rename from docs/source/examples/example_aas_mandatory_attributes.rst rename to sdk/docs/source/examples/example_aas_mandatory_attributes.rst diff --git a/docs/source/examples/example_aas_missing_attributes.rst b/sdk/docs/source/examples/example_aas_missing_attributes.rst similarity index 100% rename from docs/source/examples/example_aas_missing_attributes.rst rename to sdk/docs/source/examples/example_aas_missing_attributes.rst diff --git a/docs/source/examples/example_submodel_template.rst b/sdk/docs/source/examples/example_submodel_template.rst similarity index 100% rename from docs/source/examples/example_submodel_template.rst rename to sdk/docs/source/examples/example_submodel_template.rst diff --git a/docs/source/examples/index.rst b/sdk/docs/source/examples/index.rst similarity index 100% rename from docs/source/examples/index.rst rename to sdk/docs/source/examples/index.rst diff --git a/docs/source/index.rst b/sdk/docs/source/index.rst similarity index 100% rename from docs/source/index.rst rename to sdk/docs/source/index.rst diff --git a/docs/source/model/_string_constraints.rst b/sdk/docs/source/model/_string_constraints.rst similarity index 100% rename from docs/source/model/_string_constraints.rst rename to sdk/docs/source/model/_string_constraints.rst diff --git a/docs/source/model/aas.rst b/sdk/docs/source/model/aas.rst similarity index 100% rename from docs/source/model/aas.rst rename to sdk/docs/source/model/aas.rst diff --git a/docs/source/model/base.rst b/sdk/docs/source/model/base.rst similarity index 100% rename from docs/source/model/base.rst rename to sdk/docs/source/model/base.rst diff --git a/docs/source/model/concept.rst b/sdk/docs/source/model/concept.rst similarity index 100% rename from docs/source/model/concept.rst rename to sdk/docs/source/model/concept.rst diff --git a/docs/source/model/datatypes.rst b/sdk/docs/source/model/datatypes.rst similarity index 100% rename from docs/source/model/datatypes.rst rename to sdk/docs/source/model/datatypes.rst diff --git a/docs/source/model/index.rst b/sdk/docs/source/model/index.rst similarity index 100% rename from docs/source/model/index.rst rename to sdk/docs/source/model/index.rst diff --git a/docs/source/model/provider.rst b/sdk/docs/source/model/provider.rst similarity index 100% rename from docs/source/model/provider.rst rename to sdk/docs/source/model/provider.rst diff --git a/docs/source/model/submodel.rst b/sdk/docs/source/model/submodel.rst similarity index 100% rename from docs/source/model/submodel.rst rename to sdk/docs/source/model/submodel.rst diff --git a/docs/source/tutorials/index.rst b/sdk/docs/source/tutorials/index.rst similarity index 100% rename from docs/source/tutorials/index.rst rename to sdk/docs/source/tutorials/index.rst diff --git a/docs/source/tutorials/tutorial_aasx.rst b/sdk/docs/source/tutorials/tutorial_aasx.rst similarity index 100% rename from docs/source/tutorials/tutorial_aasx.rst rename to sdk/docs/source/tutorials/tutorial_aasx.rst diff --git a/docs/source/tutorials/tutorial_backend_couchdb.rst b/sdk/docs/source/tutorials/tutorial_backend_couchdb.rst similarity index 100% rename from docs/source/tutorials/tutorial_backend_couchdb.rst rename to sdk/docs/source/tutorials/tutorial_backend_couchdb.rst diff --git a/docs/source/tutorials/tutorial_create_simple_aas.rst b/sdk/docs/source/tutorials/tutorial_create_simple_aas.rst similarity index 100% rename from docs/source/tutorials/tutorial_create_simple_aas.rst rename to sdk/docs/source/tutorials/tutorial_create_simple_aas.rst diff --git a/docs/source/tutorials/tutorial_serialization_deserialization.rst b/sdk/docs/source/tutorials/tutorial_serialization_deserialization.rst similarity index 100% rename from docs/source/tutorials/tutorial_serialization_deserialization.rst rename to sdk/docs/source/tutorials/tutorial_serialization_deserialization.rst diff --git a/docs/source/tutorials/tutorial_storage.rst b/sdk/docs/source/tutorials/tutorial_storage.rst similarity index 100% rename from docs/source/tutorials/tutorial_storage.rst rename to sdk/docs/source/tutorials/tutorial_storage.rst diff --git a/docs/source/util/identification.rst b/sdk/docs/source/util/identification.rst similarity index 100% rename from docs/source/util/identification.rst rename to sdk/docs/source/util/identification.rst diff --git a/docs/source/util/index.rst b/sdk/docs/source/util/index.rst similarity index 100% rename from docs/source/util/index.rst rename to sdk/docs/source/util/index.rst diff --git a/docs/source/util/traversal.rst b/sdk/docs/source/util/traversal.rst similarity index 100% rename from docs/source/util/traversal.rst rename to sdk/docs/source/util/traversal.rst diff --git a/pyproject.toml b/sdk/pyproject.toml similarity index 94% rename from pyproject.toml rename to sdk/pyproject.toml index c4d9aeaf8..80ed2ca3f 100644 --- a/pyproject.toml +++ b/sdk/pyproject.toml @@ -16,7 +16,8 @@ build-backend = "setuptools.build_meta" # from basyx.version import version # print(f"Project version: {version}") # ``` -write_to = "basyx/version.py" +root = ".." # Defines the path to the root of the repository +version_file = "basyx/version.py" [project] name = "basyx-python-sdk" diff --git a/test/__init__.py b/sdk/test/__init__.py similarity index 100% rename from test/__init__.py rename to sdk/test/__init__.py diff --git a/test/_helper/__init__.py b/sdk/test/_helper/__init__.py similarity index 100% rename from test/_helper/__init__.py rename to sdk/test/_helper/__init__.py diff --git a/test/_helper/setup_testdb.py b/sdk/test/_helper/setup_testdb.py similarity index 100% rename from test/_helper/setup_testdb.py rename to sdk/test/_helper/setup_testdb.py diff --git a/test/_helper/test_helpers.py b/sdk/test/_helper/test_helpers.py similarity index 100% rename from test/_helper/test_helpers.py rename to sdk/test/_helper/test_helpers.py diff --git a/test/adapter/__init__.py b/sdk/test/adapter/__init__.py similarity index 100% rename from test/adapter/__init__.py rename to sdk/test/adapter/__init__.py diff --git a/test/adapter/aasx/TestFile.pdf b/sdk/test/adapter/aasx/TestFile.pdf similarity index 100% rename from test/adapter/aasx/TestFile.pdf rename to sdk/test/adapter/aasx/TestFile.pdf diff --git a/test/adapter/aasx/__init__.py b/sdk/test/adapter/aasx/__init__.py similarity index 100% rename from test/adapter/aasx/__init__.py rename to sdk/test/adapter/aasx/__init__.py diff --git a/test/adapter/aasx/test_aasx.py b/sdk/test/adapter/aasx/test_aasx.py similarity index 100% rename from test/adapter/aasx/test_aasx.py rename to sdk/test/adapter/aasx/test_aasx.py diff --git a/test/adapter/http-api-oas-aas.yaml b/sdk/test/adapter/http-api-oas-aas.yaml similarity index 100% rename from test/adapter/http-api-oas-aas.yaml rename to sdk/test/adapter/http-api-oas-aas.yaml diff --git a/test/adapter/http-api-oas-submodel.yaml b/sdk/test/adapter/http-api-oas-submodel.yaml similarity index 100% rename from test/adapter/http-api-oas-submodel.yaml rename to sdk/test/adapter/http-api-oas-submodel.yaml diff --git a/test/adapter/json/__init__.py b/sdk/test/adapter/json/__init__.py similarity index 100% rename from test/adapter/json/__init__.py rename to sdk/test/adapter/json/__init__.py diff --git a/test/adapter/json/test_json_deserialization.py b/sdk/test/adapter/json/test_json_deserialization.py similarity index 100% rename from test/adapter/json/test_json_deserialization.py rename to sdk/test/adapter/json/test_json_deserialization.py diff --git a/test/adapter/json/test_json_serialization.py b/sdk/test/adapter/json/test_json_serialization.py similarity index 100% rename from test/adapter/json/test_json_serialization.py rename to sdk/test/adapter/json/test_json_serialization.py diff --git a/test/adapter/json/test_json_serialization_deserialization.py b/sdk/test/adapter/json/test_json_serialization_deserialization.py similarity index 100% rename from test/adapter/json/test_json_serialization_deserialization.py rename to sdk/test/adapter/json/test_json_serialization_deserialization.py diff --git a/test/adapter/test_http.py b/sdk/test/adapter/test_http.py similarity index 100% rename from test/adapter/test_http.py rename to sdk/test/adapter/test_http.py diff --git a/test/adapter/xml/__init__.py b/sdk/test/adapter/xml/__init__.py similarity index 100% rename from test/adapter/xml/__init__.py rename to sdk/test/adapter/xml/__init__.py diff --git a/test/adapter/xml/test_xml_deserialization.py b/sdk/test/adapter/xml/test_xml_deserialization.py similarity index 100% rename from test/adapter/xml/test_xml_deserialization.py rename to sdk/test/adapter/xml/test_xml_deserialization.py diff --git a/test/adapter/xml/test_xml_serialization.py b/sdk/test/adapter/xml/test_xml_serialization.py similarity index 100% rename from test/adapter/xml/test_xml_serialization.py rename to sdk/test/adapter/xml/test_xml_serialization.py diff --git a/test/adapter/xml/test_xml_serialization_deserialization.py b/sdk/test/adapter/xml/test_xml_serialization_deserialization.py similarity index 100% rename from test/adapter/xml/test_xml_serialization_deserialization.py rename to sdk/test/adapter/xml/test_xml_serialization_deserialization.py diff --git a/test/backend/__init__.py b/sdk/test/backend/__init__.py similarity index 100% rename from test/backend/__init__.py rename to sdk/test/backend/__init__.py diff --git a/test/backend/test_backends.py b/sdk/test/backend/test_backends.py similarity index 100% rename from test/backend/test_backends.py rename to sdk/test/backend/test_backends.py diff --git a/test/backend/test_couchdb.py b/sdk/test/backend/test_couchdb.py similarity index 100% rename from test/backend/test_couchdb.py rename to sdk/test/backend/test_couchdb.py diff --git a/test/backend/test_local_file.py b/sdk/test/backend/test_local_file.py similarity index 100% rename from test/backend/test_local_file.py rename to sdk/test/backend/test_local_file.py diff --git a/test/examples/__init__.py b/sdk/test/examples/__init__.py similarity index 100% rename from test/examples/__init__.py rename to sdk/test/examples/__init__.py diff --git a/test/examples/test__init__.py b/sdk/test/examples/test__init__.py similarity index 100% rename from test/examples/test__init__.py rename to sdk/test/examples/test__init__.py diff --git a/test/examples/test_examples.py b/sdk/test/examples/test_examples.py similarity index 100% rename from test/examples/test_examples.py rename to sdk/test/examples/test_examples.py diff --git a/test/examples/test_helpers.py b/sdk/test/examples/test_helpers.py similarity index 100% rename from test/examples/test_helpers.py rename to sdk/test/examples/test_helpers.py diff --git a/test/examples/test_tutorials.py b/sdk/test/examples/test_tutorials.py similarity index 100% rename from test/examples/test_tutorials.py rename to sdk/test/examples/test_tutorials.py diff --git a/test/model/__init__.py b/sdk/test/model/__init__.py similarity index 100% rename from test/model/__init__.py rename to sdk/test/model/__init__.py diff --git a/test/model/test_aas.py b/sdk/test/model/test_aas.py similarity index 100% rename from test/model/test_aas.py rename to sdk/test/model/test_aas.py diff --git a/test/model/test_base.py b/sdk/test/model/test_base.py similarity index 100% rename from test/model/test_base.py rename to sdk/test/model/test_base.py diff --git a/test/model/test_concept.py b/sdk/test/model/test_concept.py similarity index 100% rename from test/model/test_concept.py rename to sdk/test/model/test_concept.py diff --git a/test/model/test_datatypes.py b/sdk/test/model/test_datatypes.py similarity index 100% rename from test/model/test_datatypes.py rename to sdk/test/model/test_datatypes.py diff --git a/test/model/test_provider.py b/sdk/test/model/test_provider.py similarity index 100% rename from test/model/test_provider.py rename to sdk/test/model/test_provider.py diff --git a/test/model/test_string_constraints.py b/sdk/test/model/test_string_constraints.py similarity index 100% rename from test/model/test_string_constraints.py rename to sdk/test/model/test_string_constraints.py diff --git a/test/model/test_submodel.py b/sdk/test/model/test_submodel.py similarity index 100% rename from test/model/test_submodel.py rename to sdk/test/model/test_submodel.py diff --git a/test/test_config.default.ini b/sdk/test/test_config.default.ini similarity index 100% rename from test/test_config.default.ini rename to sdk/test/test_config.default.ini diff --git a/test/util/__init__.py b/sdk/test/util/__init__.py similarity index 100% rename from test/util/__init__.py rename to sdk/test/util/__init__.py diff --git a/test/util/test_identification.py b/sdk/test/util/test_identification.py similarity index 100% rename from test/util/test_identification.py rename to sdk/test/util/test_identification.py