-
Notifications
You must be signed in to change notification settings - Fork 38
Prepare Release v2.0.0 #424
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We add a missing import statement of `basyx.aas.adapter.json`. Fixes #352
Currently, there are several wrong imports and outdated unittests in the `compliance-tool` package. This fixes these issues. Fixes #354
…ce` (#337) Previously, if the `semantic_id` was a `ModelReference`, it very often had the generic `type` "`model.Referable`" instead of the actual type of the object it points to. This lead to a bug in the AASX writer, where `ConceptDescription`s were not written to the AASX, even though they existed in the `ObjectStore`. This fixes this problem by tackling three separate points: 1. In `json_deserialization.py`, we now infer the `type` of the `ModelReference` via the Reference's last `Key`. This is more of a hotfix and issue #367 tracks the creation of a better solution. 2. In `aasx.py`, an unneccessary `logger.info` call is removed, that previously cluttered the output of the writer if a `semantic_id` was not pointing to a `ConceptDescription`, which is not something worth noting. Furthermore, we improve other log messages. 3. In `examples.data._helper`, we improve the test for `semantic_id` equality, namely by comparing the `ModelReference`'s attributes explicitly, when it happens to be one, instead of relying on simple string comparision.
This updates the minimum version of the dependency `pyecma376` in the `pyproject.toml`, ensuring that our AASX files allow for spaces in file names. Fixes #236
Previously, some `sdk` dependencies, that are only necessary for testing were included in the mandatory dependencies. For improving package footprint, these are moved into the `[dev]` section of optional dependencies in the `pyproject.toml`. --------- Co-authored-by: s-heppner <[email protected]>
This adds a new `SetObjectStore` that is backed by a set. Its main advantage is that it does not have the problem with not updated `Identifier`s that the `DictObjectStore` has (See #216). We make sure to document the differences between `DictObjectStore` and `SetObjectStore` in their respective class docstrings.
… updated (#344) Previously, there was no check if the copyright statement on top of each file (due to the MIT license) was up to date. This adapts our `update_copyright_year.sh` script with a checking mode to determine if any file needs adapting and then adds this check to the CI. At the same time, this also updates all necessary files to the year 2025. Fixes #260 Fixes #331 --------- Co-authored-by: s-heppner <[email protected]>
Previously, we were accidentally still trying to install dependencies from the already deleted `requirements.txt` when generating the documentation. This fixes this and installs them instead from the `pyproject.toml`. Co-authored-by: s-heppner <[email protected]>
This refactors away from `setup.py` and towards `pyproject.toml` for the `compliance_tool` package. At the same step, we also update the relevant CI checks as well.
This fixes the redirects from the AAS repository paths to the Submodel repository paths to work properly. Furthermore, the installation of dependencies inside the server Docker image was previously using the latest release of the SDK. This means, that we could not ensure that each commit in the `main` branch of our monorepo would be interoperable between SDK and server, as a PR would have to be closed in order for the server CI would not report any errors. In order to fix this, issue in the development process, the server Docker image now installs the SDK from the local repository, rather than from GitHub. Lastly, this fixes a wrong status code reported when specifing a model that is malformed or missing information. The specification expects a 400 (Bad Request) response, but the server sent a 422 (Unprocessable Content). Fixes #315
Previously, the section "Codestyle and Testing" was outdated, still from the time where there was only the SDK inside this repository. This greatly extends the section, renaming it to "Code Quality" and introducing subsections for "Codestyle" and "Testing", where we describe how to run the necessary tests locally on the developer's machine for each of the packages inside this monorepository. Fixes #353
We previously refactored the compliance_tool from `setup.py` to `pyproject.toml` (See #361). However, somehow the `setup.py` slipped through and is still in the `compliance_tool` directory. This removes the `setup.py` from the `compliance_tool` completely.
This adds a job `compliance-tool-publish` to the `release.yml` that automatically publishes the compliance-tool package to PyPI upon release. It is simply copied from the SDK job, with adapted paths.
There are many AASX in the wild where there is an additional `www` in the relationship definition that does not belong there: ``` http://www.admin-shell.io/aasx/relationships/aasx-origin ``` whereas it should be according to the [specification]: ``` http://admin-shell.io/aasx/relationships/aasx-origin ``` Previously, our SDK did not allow for reading these AASX files with wrong relationship URL. However, since there are so many of them, this change enables them to be read, while notifying the user with a big warning message that their AASX file is actually not standard compliant and needs to be changed (see discussion in #381). Fixes #379 Fixes #383 [specification]: (https://industrialdigitaltwin.org/wp-content/uploads/2024/06/IDTA-01005-3-0-1_SpecificationAssetAdministrationShell_Part5_AASXPackageFileFormat.pdf#Page=18)
Currently, the sphinx dependencies in `docs/add_requirements.txt` are outdated, causing our CI pipeline to fail. This bumps the versions for the additional requirements for the compilation of the documentation to their newest working state. Since that version needs `Python >= 3.11`, we also need to bump the version of Python used in the CI. Fixes #385
Previously, we used `vars()` to iterate over all attributes of an object when updating it from another object (`Referable.update_from()`). However, `vars()` only retrieves the instance's `__dict__`, e.g. the object's attributes, but does not include properties. As a result, when you use `vars(other)`, you get the `_id_short` attribute instead of the `id_short` property. This made it impossible to utilize custom setter methods we developed for certain cases, e.g. when properties should be immutable. This now adapts the `Referable.update_from()` method to utilize `dir()` instead, which iterates over all attributes and properties of the object. We skip callables and private attributes. We use `setattr()` to set attributes and properties, so that the correct setter methods will be used. Furthermore, we now raise an error if an immutable property changed between the two versions of the object. Fixes #215 --------- Co-authored-by: Sercan Sahin <[email protected]>
Previously, the build-dependencies for the sphinx autodocumentation were listed in `sdk/docs/add-requirements.txt`. This is outdated and the new state of the art is managing all dependencies via `pyproject.toml`. This refactors the dependencies from `sdk/docs/add-requirements.txt` into a new optional `[docs]` section in the `pyproject.toml` dependency definitions. Furthermore, we adapt the `.github/workflows/ci.yml` to use the new definitions accordingly. Fixes #384
Previously, the `failsafe` parameter, allowing to skip errors and only log them as warnings instead, only existed for JSON and XML (de-)serialization. This PR extends the feature to also be included when reading and writing AASX files. For this, we add the `failsafe` boolean attribute to the `AASXReader` and `AASXWriter` classes in `adapter.aasx`. If `failsafe` is `True`, the document is parsed in a failsafe way: Missing attributes and elements are logged instead of causing exceptions. Defect objects are skipped. The default value is `False`, keeping the existing behavior. Furthermore, we do a little code-style clean up on string-formatting in the `adapter.aasx` module, updating all occurrences from (historically) different syntaxes to the more modern f-string syntax. Fixes #228
Previously, the release of `mypy 1.16` added new features for the type check, resulting in our pipeline to fail. This refactors the codebase to comply with `mypy 1.16`. Instances where `# type: ignore` was necessary are documented with context. Fixes #390
Previously, #386 proposed narrowing the scope of the build context for 'server/Dockerfile' to '/server'. As a consequence, `/sdk`, which is required to build the server, would no longer be accessible. Locally, this would necessitate explicitly referencing `/sdk` as a second build context. When using the GitHub URL of this repository as build context instead of a local repository, this would additionally lead to inefficient data handling. Since Docker Compose does not yet support sparse checkouts, specifying subdirectories like `/server` as build context still results in the full repository being cloned. Consequently, although `/sdk` would be downloaded, it would be excluded from the narrowed build context and thus remain unavailable. Any attempt to include `/sdk` separately afterwards would result in the same data being downloaded again. As this is an inefficient solution, #386 is rejected. This documents the decision of keeping the repository root as the build context of `server/Dockerfile`. A corresponding note was added in `server/README.md`. Additionally, a mention of faulty line endings being a common error when building the Docker container has been added in `server/README.md`. Fixes #386
This separates server functionalities (Repository apps, in the future also Discovery, and Registries) from the core SDK to improve modularity and maintainability. It also includes some refactoring to avoid code duplication in future. Changes: - Moved all server-related classes and functions from `sdk` to `server` - Splitted `http.py` into `repository.py`, `base.py` and `util/converters.py` - Created parent classes `BaseWSGIApp` and `ObjectStoreWSGIApp` for repository app class, which will also be used for discovery and registry apps in the future - Added an initial pyproject.toml for the server app - Refactored `object_hook()` by extracting the mapping dict into `_get_aas_class_parsers()` - Refactored `default()` by extracting the mapping dict into `_get_aas_class_serializers()` - Refactored `_create_dict()` - Created a JSON_AAS_TOP_LEVEL_KEYS_TO_TYPES tuple with top-level JSON keys and the corresponding SDK types to reuse it in JSON de-/serialization methods
Previously, the `develop` branch had diverged from `main`. This commit merges the latest changes from `main` into `develop` to bring it up to date.
Previously, we only documented how to run the server via Docker. This adds a short tutorial how to run the server directly from `./server/app/interfaces/repository.py` without the Docker setup. Fixes #386
…on (#406) Previously, the method `object_to_xml_element()` in `sdk\basyx\aas\adapter\xml\xml_serialization.py` contained duplicated code from `submodel_element_to_xml()` and `data_element_to_xml()`. This was due to the class hierarchy of the objects being compared in the if statements. For instance, some models inherit from `model.SubmodelElement`. Because of that, the associated objects are checked for in `submodel_element_to_xml()`. With that, any additional check for these objects in `object_to_xml_element()` are redundant. This removes the code duplication. Fixes #396
server.app.main: Small fixes and codestyle enhancements This refactors the import statements in `main.py`, as well as fixes the reading of JSON and XML files. Both file types are now read in the same way using `FileIO` as input for `read_aas_xml_file_into`, as we already did in `read_aas_json_file_into`.
* fix some typos * fix README.md * tutorial_serialization_deserialization: Fix missing import (#363) We add a missing import statement of `basyx.aas.adapter.json`. Fixes #352 * README.md: Fix typo in Markdown Link * compliance-tool: Fix compliance tool imports and unitests (#356) Currently, there are several wrong imports and outdated unittests in the `compliance-tool` package. This fixes these issues. Fixes #354 * aasx.adapter: Fix `semantic_id` type deserialization of `ModelReference` (#337) Previously, if the `semantic_id` was a `ModelReference`, it very often had the generic `type` "`model.Referable`" instead of the actual type of the object it points to. This lead to a bug in the AASX writer, where `ConceptDescription`s were not written to the AASX, even though they existed in the `ObjectStore`. This fixes this problem by tackling three separate points: 1. In `json_deserialization.py`, we now infer the `type` of the `ModelReference` via the Reference's last `Key`. This is more of a hotfix and issue #367 tracks the creation of a better solution. 2. In `aasx.py`, an unneccessary `logger.info` call is removed, that previously cluttered the output of the writer if a `semantic_id` was not pointing to a `ConceptDescription`, which is not something worth noting. Furthermore, we improve other log messages. 3. In `examples.data._helper`, we improve the test for `semantic_id` equality, namely by comparing the `ModelReference`'s attributes explicitly, when it happens to be one, instead of relying on simple string comparision. * sdk: Update version of pyecma dependency in pyproject.toml This updates the minimum version of the dependency `pyecma376` in the `pyproject.toml`, ensuring that our AASX files allow for spaces in file names. Fixes #236 * sdk: Move testing depencies to dev section in pyproject.toml (#369) Previously, some `sdk` dependencies, that are only necessary for testing were included in the mandatory dependencies. For improving package footprint, these are moved into the `[dev]` section of optional dependencies in the `pyproject.toml`. --------- Co-authored-by: s-heppner <[email protected]> * basyx.provider: Add SetObjectStore to provider (#340) This adds a new `SetObjectStore` that is backed by a set. Its main advantage is that it does not have the problem with not updated `Identifier`s that the `DictObjectStore` has (See #216). We make sure to document the differences between `DictObjectStore` and `SetObjectStore` in their respective class docstrings. * scripts.set_copyright_year: Add a CI check to ensure the copyright is updated (#344) Previously, there was no check if the copyright statement on top of each file (due to the MIT license) was up to date. This adapts our `update_copyright_year.sh` script with a checking mode to determine if any file needs adapting and then adds this check to the CI. At the same time, this also updates all necessary files to the year 2025. Fixes #260 Fixes #331 --------- Co-authored-by: s-heppner <[email protected]> * sdk/.readthedocs.yaml: Install dependencies from pyproject.toml (#359) Previously, we were accidentally still trying to install dependencies from the already deleted `requirements.txt` when generating the documentation. This fixes this and installs them instead from the `pyproject.toml`. Co-authored-by: s-heppner <[email protected]> * compliance_tool: add pyproject.toml (#361) This refactors away from `setup.py` and towards `pyproject.toml` for the `compliance_tool` package. At the same step, we also update the relevant CI checks as well. * http.py: Fix redirects, bugs, and SDK installation (#362) This fixes the redirects from the AAS repository paths to the Submodel repository paths to work properly. Furthermore, the installation of dependencies inside the server Docker image was previously using the latest release of the SDK. This means, that we could not ensure that each commit in the `main` branch of our monorepo would be interoperable between SDK and server, as a PR would have to be closed in order for the server CI would not report any errors. In order to fix this, issue in the development process, the server Docker image now installs the SDK from the local repository, rather than from GitHub. Lastly, this fixes a wrong status code reported when specifing a model that is malformed or missing information. The specification expects a 400 (Bad Request) response, but the server sent a 422 (Unprocessable Content). Fixes #315 * CONTRIBUTING.md: Improve codestyle and testing section (#376) Previously, the section "Codestyle and Testing" was outdated, still from the time where there was only the SDK inside this repository. This greatly extends the section, renaming it to "Code Quality" and introducing subsections for "Codestyle" and "Testing", where we describe how to run the necessary tests locally on the developer's machine for each of the packages inside this monorepository. Fixes #353 * compliance_tool: Remove setup.py (#377) We previously refactored the compliance_tool from `setup.py` to `pyproject.toml` (See #361). However, somehow the `setup.py` slipped through and is still in the `compliance_tool` directory. This removes the `setup.py` from the `compliance_tool` completely. * Add CI job to release compliance-tool to PyPI (#382) This adds a job `compliance-tool-publish` to the `release.yml` that automatically publishes the compliance-tool package to PyPI upon release. It is simply copied from the SDK job, with adapted paths. * sdk: Update lxml and mypy dependency in pyproject.toml (#392) * sdk: Update lxml dependency in pyproject.toml Previously, the `lxml` dependency in the `pyproject.toml` was pinned to versions `>=4.2,<5`. This caused a faulty installation via `pip` on Windows due to missing binary wheels. This updates the `lxml` dependency to versions `>=5.3` to resolve the issue. Additionally, the `mypy` dependency in the `pyproject.toml` was unpinned, leading to the installation of the latest version. The recent release of `mypy 1.16.0` introduced changes not yet supported by our codebase, resulting in CI pipeline failures. This restricts the `mypy` dependency to version `1.15.0` until we have proper support for `1.16.0` and its new features. Fixes #391 --------- Co-authored-by: Sercan Sahin <[email protected]> Co-authored-by: Frosty2500 <[email protected]> Co-authored-by: Julian Vogel <[email protected]> Co-authored-by: Igor Garmaev <[email protected]> Co-authored-by: Moritz Sommer <[email protected]>
Previously, we tried to use the `Backend` concept for both data persistence and data integration. This led to complicated cross-dependencies, architectures and badly maintainable code. Now, we decided to split these two concepts and use the existing `Backend` `ObjectStore`s for just the data persistence. Concretely, this commit does the following: 1. Remove the abstract `Backend` class (backends.py), as well as their concrete implementations (`CouchDBBackend`, `LocalFileBackend`), as they are no longer needed 2. Remove the `Referable.source` attribute, as it was only needed for the `Backend` class 3. Remove methods related to the `Referable.source` attribute, such as `Referable.update()` and `Referable.commit()` (base.py), as they were used together to perform the data integration. 4. Adapt other related codes such as tutorials and tests to reflect these changes 5. Adapt documentation to reflect these changes
Previously, `ConceptDescription` were not parsed properly due to the type missing in `app.interfaces.base.HTTPApiDecoder.type_constructables_map`, specifying which types are constructable. This adds this line Fixes #395
The current version of `lxml>=4.2,<5` fails on modern Debian 13 machines, as there is a dependency conflict with a base library. This adapts both `lxml` and `pyecma376-2` versions to work with the new Linux base libraries. Fixes #417
This introduces several utility methods and refactorings for `Referable` objects and `Key`
handling.
`idShortPath` Utility Functions
- Add `Referable.get_identifiable_root()` to retrieve the root
`Identifiable` object of a referable.
- Add `Referable.get_id_short_path()` to generate an `idShortPath`,
useful in client/server contexts.
- Add `Referable.parse_id_short_path` to handle `idShortPath` strings
- Add `Referable.build_id_short_path` to generate `idShortPath` string
from list[str]
- Add `Referable.validate_id_short_path` to check if the `idShortPath`
is correct
- Refactored `get_referable`, so that now it can accept
`id_short_path` as a string
`Key` Handling
- Add `find_registered_referable_type_in_key_types_classes()` to
encapsulate usage of `KEY_TYPES_CLASSES`.
- Refactor `Key.from_referable` to leverage the new method.
Tests
- Add unit tests for the new `Referable` methods.
- Fix minor typos in `test_base.py`.
Fixes #414
Previously, the repository server used one and the same folder for loading data during start-up and storing it persistently. This resulted in a mixture of input AAS/Submodel files (AASX, JSON and XML) and persistently stored AAS/Submodel files from the `LocalFileObjectStore` (JSON). This separates the server's input and storage into two different directories to prevent their files being mixed. Moreover, the option to overwrite existing AAS/Submodels in the storage got added and the option to persistently store data got adapted. In accordance with the new changes, the `README` and `Dockerfile` were adapted to present the changes to the end users. Fixes #404 --------- Co-authored-by: s-heppner <[email protected]> Co-authored-by: Igor Garmaev <[email protected]>
This should resolve the conflicts for merging develop into main for #424
There are many AASX in the wild where there is an additional `www` in the relationship definition that does not belong there: ``` http://www.admin-shell.io/aasx/relationships/aasx-origin ``` whereas it should be according to the [specification]: ``` http://admin-shell.io/aasx/relationships/aasx-origin ``` Previously, our SDK did not allow for reading these AASX files with wrong relationship URL. However, since there are so many of them, this change enables them to be read, while notifying the user with a big warning message that their AASX file is actually not standard compliant and needs to be changed (see discussion in #381). Fixes #379 Fixes #383 [specification]: (https://industrialdigitaltwin.org/wp-content/uploads/2024/06/IDTA-01005-3-0-1_SpecificationAssetAdministrationShell_Part5_AASXPackageFileFormat.pdf#Page=18)
Currently, the sphinx dependencies in `docs/add_requirements.txt` are outdated, causing our CI pipeline to fail. This bumps the versions for the additional requirements for the compilation of the documentation to their newest working state. Since that version needs `Python >= 3.11`, we also need to bump the version of Python used in the CI. Fixes #385
Previously, we used `vars()` to iterate over all attributes of an object when updating it from another object (`Referable.update_from()`). However, `vars()` only retrieves the instance's `__dict__`, e.g. the object's attributes, but does not include properties. As a result, when you use `vars(other)`, you get the `_id_short` attribute instead of the `id_short` property. This made it impossible to utilize custom setter methods we developed for certain cases, e.g. when properties should be immutable. This now adapts the `Referable.update_from()` method to utilize `dir()` instead, which iterates over all attributes and properties of the object. We skip callables and private attributes. We use `setattr()` to set attributes and properties, so that the correct setter methods will be used. Furthermore, we now raise an error if an immutable property changed between the two versions of the object. Fixes #215 --------- Co-authored-by: Sercan Sahin <[email protected]>
Previously, the build-dependencies for the sphinx autodocumentation were listed in `sdk/docs/add-requirements.txt`. This is outdated and the new state of the art is managing all dependencies via `pyproject.toml`. This refactors the dependencies from `sdk/docs/add-requirements.txt` into a new optional `[docs]` section in the `pyproject.toml` dependency definitions. Furthermore, we adapt the `.github/workflows/ci.yml` to use the new definitions accordingly. Fixes #384
Previously, the `failsafe` parameter, allowing to skip errors and only log them as warnings instead, only existed for JSON and XML (de-)serialization. This PR extends the feature to also be included when reading and writing AASX files. For this, we add the `failsafe` boolean attribute to the `AASXReader` and `AASXWriter` classes in `adapter.aasx`. If `failsafe` is `True`, the document is parsed in a failsafe way: Missing attributes and elements are logged instead of causing exceptions. Defect objects are skipped. The default value is `False`, keeping the existing behavior. Furthermore, we do a little code-style clean up on string-formatting in the `adapter.aasx` module, updating all occurrences from (historically) different syntaxes to the more modern f-string syntax. Fixes #228
Previously, the release of `mypy 1.16` added new features for the type check, resulting in our pipeline to fail. This refactors the codebase to comply with `mypy 1.16`. Instances where `# type: ignore` was necessary are documented with context. Fixes #390
Previously, #386 proposed narrowing the scope of the build context for 'server/Dockerfile' to '/server'. As a consequence, `/sdk`, which is required to build the server, would no longer be accessible. Locally, this would necessitate explicitly referencing `/sdk` as a second build context. When using the GitHub URL of this repository as build context instead of a local repository, this would additionally lead to inefficient data handling. Since Docker Compose does not yet support sparse checkouts, specifying subdirectories like `/server` as build context still results in the full repository being cloned. Consequently, although `/sdk` would be downloaded, it would be excluded from the narrowed build context and thus remain unavailable. Any attempt to include `/sdk` separately afterwards would result in the same data being downloaded again. As this is an inefficient solution, #386 is rejected. This documents the decision of keeping the repository root as the build context of `server/Dockerfile`. A corresponding note was added in `server/README.md`. Additionally, a mention of faulty line endings being a common error when building the Docker container has been added in `server/README.md`. Fixes #386
This separates server functionalities (Repository apps, in the future also Discovery, and Registries) from the core SDK to improve modularity and maintainability. It also includes some refactoring to avoid code duplication in future. Changes: - Moved all server-related classes and functions from `sdk` to `server` - Splitted `http.py` into `repository.py`, `base.py` and `util/converters.py` - Created parent classes `BaseWSGIApp` and `ObjectStoreWSGIApp` for repository app class, which will also be used for discovery and registry apps in the future - Added an initial pyproject.toml for the server app - Refactored `object_hook()` by extracting the mapping dict into `_get_aas_class_parsers()` - Refactored `default()` by extracting the mapping dict into `_get_aas_class_serializers()` - Refactored `_create_dict()` - Created a JSON_AAS_TOP_LEVEL_KEYS_TO_TYPES tuple with top-level JSON keys and the corresponding SDK types to reuse it in JSON de-/serialization methods
Previously, we only documented how to run the server via Docker. This adds a short tutorial how to run the server directly from `./server/app/interfaces/repository.py` without the Docker setup. Fixes #386
…on (#406) Previously, the method `object_to_xml_element()` in `sdk\basyx\aas\adapter\xml\xml_serialization.py` contained duplicated code from `submodel_element_to_xml()` and `data_element_to_xml()`. This was due to the class hierarchy of the objects being compared in the if statements. For instance, some models inherit from `model.SubmodelElement`. Because of that, the associated objects are checked for in `submodel_element_to_xml()`. With that, any additional check for these objects in `object_to_xml_element()` are redundant. This removes the code duplication. Fixes #396
server.app.main: Small fixes and codestyle enhancements This refactors the import statements in `main.py`, as well as fixes the reading of JSON and XML files. Both file types are now read in the same way using `FileIO` as input for `read_aas_xml_file_into`, as we already did in `read_aas_json_file_into`.
Previously, we tried to use the `Backend` concept for both data persistence and data integration. This led to complicated cross-dependencies, architectures and badly maintainable code. Now, we decided to split these two concepts and use the existing `Backend` `ObjectStore`s for just the data persistence. Concretely, this commit does the following: 1. Remove the abstract `Backend` class (backends.py), as well as their concrete implementations (`CouchDBBackend`, `LocalFileBackend`), as they are no longer needed 2. Remove the `Referable.source` attribute, as it was only needed for the `Backend` class 3. Remove methods related to the `Referable.source` attribute, such as `Referable.update()` and `Referable.commit()` (base.py), as they were used together to perform the data integration. 4. Adapt other related codes such as tutorials and tests to reflect these changes 5. Adapt documentation to reflect these changes
Previously, `ConceptDescription` were not parsed properly due to the type missing in `app.interfaces.base.HTTPApiDecoder.type_constructables_map`, specifying which types are constructable. This adds this line Fixes #395
The current version of `lxml>=4.2,<5` fails on modern Debian 13 machines, as there is a dependency conflict with a base library. This adapts both `lxml` and `pyecma376-2` versions to work with the new Linux base libraries. Fixes #417
This introduces several utility methods and refactorings for `Referable` objects and `Key`
handling.
`idShortPath` Utility Functions
- Add `Referable.get_identifiable_root()` to retrieve the root
`Identifiable` object of a referable.
- Add `Referable.get_id_short_path()` to generate an `idShortPath`,
useful in client/server contexts.
- Add `Referable.parse_id_short_path` to handle `idShortPath` strings
- Add `Referable.build_id_short_path` to generate `idShortPath` string
from list[str]
- Add `Referable.validate_id_short_path` to check if the `idShortPath`
is correct
- Refactored `get_referable`, so that now it can accept
`id_short_path` as a string
`Key` Handling
- Add `find_registered_referable_type_in_key_types_classes()` to
encapsulate usage of `KEY_TYPES_CLASSES`.
- Refactor `Key.from_referable` to leverage the new method.
Tests
- Add unit tests for the new `Referable` methods.
- Fix minor typos in `test_base.py`.
Fixes #414
Previously, the repository server used one and the same folder for loading data during start-up and storing it persistently. This resulted in a mixture of input AAS/Submodel files (AASX, JSON and XML) and persistently stored AAS/Submodel files from the `LocalFileObjectStore` (JSON). This separates the server's input and storage into two different directories to prevent their files being mixed. Moreover, the option to overwrite existing AAS/Submodels in the storage got added and the option to persistently store data got adapted. In accordance with the new changes, the `README` and `Dockerfile` were adapted to present the changes to the end users. Fixes #404 --------- Co-authored-by: s-heppner <[email protected]> Co-authored-by: Igor Garmaev <[email protected]>
This should resolve the conflicts for merging develop into main for #424
Previously, Python 3.9 reached its EOL. This replace all references to Python 3.9 within the SDK with references to Python 3.10. Fixes #432
This moves the documentation of unimplemented routes of the server from the module docstring to the project `README.md`. Fixes #380
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release Notes
Version 2.0.0 of the BaSyx-Python SDK comes with a major refactoring of the server and a renewed concept for data persistence.
Previously, the server code was split between the
sdkandserverpackages (due to historic development of the code).Now all the code relevant just for the server is located in
server, where it belongs. Since this means, some code that was previously insdkis not there anymore, this is a breaking change and warranted the new major release.Note
This release does not have any changes in implemented AAS specification versions. It is the preparotory release in order to get ready for the new versions of the specifications, as well as new features for the SDK, such as Registry and Discovery server.
This release implements the following versions of the AAS specification:
Warning
Due to these major refactorings, there were some backward incompatible changes. Please check the documentation, if you encounter any issues.
Changelog
Notable:
sdktoserver(See: Extract server apps and funcs fromsdkintoserver#388)backendconcept for data persistence (See: RefactorBackendconcept for data persistence #370)start-upoptions (See: Refactor server start-up options #418)Improvements:
server\app\main.py#408)ReferableandKeyhandling (See: AddReferableUtility Methods and RefactorKeyHandling #410)Bugfixes:
mypy(See: sdk/basyx/aas: Fix type issues under mypy 1.16 #399)ConceptDescriptions in the server (See: Fix CD parsing in server #420)pyecma376-2andlxmldependencies (See: Update pyecma376-2 and lxml lib versions #419)