The Aspect Model Loader as part of the Python SDK provided by the [*Eclipse Semantic Modeling Framework*](
https://projects.eclipse.org/projects/dt.esmf).
# An Aspect of the Meta Model
The `esmf-aspect-model-loader` package provides the Python implementation for the SAMM Aspect Meta Model, or SAMM.
Each Meta Model element and each Characteristic class is represented by an interface with a corresponding
implementation.
## Usage
An Aspect of the Meta Model can be created as follows using the provided `AspectInstantiator`.
```
aspect_loader = AspectLoader()
aspect = aspect_loader.load_aspect_model("absolute/path/to/turtle.ttl");
```
or
```
aspect_loader = AspectLoader()
aspect = aspect_loader.load_aspect_model_from_multiple_files(["list/of/absolute/paths/to/turtles.ttl"], "aspect_urn");
```
## Automatic Deployment
A [GitHub action called 'Release'](https://github.com/eclipse-esmf/esmf-sdk-py-aspect-model-loader/actions/workflows/tagged_release.yml)
has been set up for the `esmf-aspect-model-loader`. This action checks the code quality by running tests, the [static type checker MyPy](https://github.com/python/mypy) and
the [code formatter 'Black'](https://github.com/psf/black).
## Set Up SAMM Aspect Meta Model for development
In order to download the SAMM sources, it is required to run `poetry install` once in the `esmf-aspect-model-loader`
module. There are two possibilities to download the SAMM files and extract the Turtle sources for the Meta Model.
### Possibility 1 (downloading a release)
The `download_samm_release` script may be executed with
```
poetry run download-samm-release
```
It downloads a release JAR-file from GitHub and extracts the SAMM Files.
The version is specified in the python script.
Link to all Releases: https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/releases
### Possibility 2 (downloading from the repository)
It may happen that there is no .jar file that is up to date with the changes of the SAMM.
This script is an alternative to the `download_samm_release.py` and extracts the files from the repository
directly instead of using the newest release.
The script uses the GitHub API and downloads the files from the `main` branch. If the script is run in a
pipeline, it uses a GitHub token to authorize. If the script is run locally, the API is called without a token.
This may cause problems because unauthorized API calls are limited.
This script can be executed with
```
poetry run download-samm-branch
```
to download and start working with the Aspect Model Loader.
Raw data
{
"_id": null,
"home_page": "https://projects.eclipse.org/projects/dt.esmf",
"name": "test-esmf-loader",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "samm, esmf, digital twin, idta, model loader, semantic api, semantics, aspect",
"author": "Hanna Shalamitskaya",
"author_email": "external.Hanna.Shalamitskaya@de.bosch.com",
"download_url": "https://files.pythonhosted.org/packages/9e/1b/1611969ebe34bf2c584a1f46e80550af02861d3bf98d11cb9aaabc528376/test_esmf_loader-0.0.2.tar.gz",
"platform": null,
"description": "The Aspect Model Loader as part of the Python SDK provided by the [*Eclipse Semantic Modeling Framework*](\nhttps://projects.eclipse.org/projects/dt.esmf).\n\n# An Aspect of the Meta Model\n\nThe `esmf-aspect-model-loader` package provides the Python implementation for the SAMM Aspect Meta Model, or SAMM.\nEach Meta Model element and each Characteristic class is represented by an interface with a corresponding\nimplementation.\n\n## Usage\n\nAn Aspect of the Meta Model can be created as follows using the provided `AspectInstantiator`.\n\n```\naspect_loader = AspectLoader()\naspect = aspect_loader.load_aspect_model(\"absolute/path/to/turtle.ttl\");\n```\n\nor\n\n```\naspect_loader = AspectLoader()\naspect = aspect_loader.load_aspect_model_from_multiple_files([\"list/of/absolute/paths/to/turtles.ttl\"], \"aspect_urn\");\n```\n\n## Automatic Deployment\n\nA [GitHub action called 'Release'](https://github.com/eclipse-esmf/esmf-sdk-py-aspect-model-loader/actions/workflows/tagged_release.yml)\nhas been set up for the `esmf-aspect-model-loader`. This action checks the code quality by running tests, the [static type checker MyPy](https://github.com/python/mypy) and\nthe [code formatter 'Black'](https://github.com/psf/black).\n\n## Set Up SAMM Aspect Meta Model for development\n\nIn order to download the SAMM sources, it is required to run `poetry install` once in the `esmf-aspect-model-loader`\nmodule. There are two possibilities to download the SAMM files and extract the Turtle sources for the Meta Model.\n\n### Possibility 1 (downloading a release)\n\nThe `download_samm_release` script may be executed with\n\n```\npoetry run download-samm-release\n``` \n\nIt downloads a release JAR-file from GitHub and extracts the SAMM Files.\nThe version is specified in the python script.\n\nLink to all Releases: https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/releases\n\n### Possibility 2 (downloading from the repository)\n\nIt may happen that there is no .jar file that is up to date with the changes of the SAMM.\nThis script is an alternative to the `download_samm_release.py` and extracts the files from the repository\ndirectly instead of using the newest release.\n\nThe script uses the GitHub API and downloads the files from the `main` branch. If the script is run in a\npipeline, it uses a GitHub token to authorize. If the script is run locally, the API is called without a token.\nThis may cause problems because unauthorized API calls are limited.\n\nThis script can be executed with\n\n```\npoetry run download-samm-branch\n```\nto download and start working with the Aspect Model Loader.\n",
"bugtrack_url": null,
"license": "MPL-2.0",
"summary": "Load Aspect Models based on the Semantic Aspect Meta Model",
"version": "0.0.2",
"project_urls": {
"Documentation": "https://eclipse-esmf.github.io/python-sdk-guide/index.html",
"Homepage": "https://projects.eclipse.org/projects/dt.esmf",
"Repository": "https://github.com/bci-oss/esmf-sdk-py-aspect-model-loader"
},
"split_keywords": [
"samm",
" esmf",
" digital twin",
" idta",
" model loader",
" semantic api",
" semantics",
" aspect"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9353bd1481f28c9d2a2b4ef3c9f9ece31c9730172c8ec9c663e9af22d9bfc00d",
"md5": "27a6720ec8ac6dc43f1f1ef9deeb0c44",
"sha256": "b13ce5298ccbf44403bfe360895cc9c548784e1b9f1486f46ff4dbad4f8eaca2"
},
"downloads": -1,
"filename": "test_esmf_loader-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27a6720ec8ac6dc43f1f1ef9deeb0c44",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 455155,
"upload_time": "2024-04-05T07:23:18",
"upload_time_iso_8601": "2024-04-05T07:23:18.536681Z",
"url": "https://files.pythonhosted.org/packages/93/53/bd1481f28c9d2a2b4ef3c9f9ece31c9730172c8ec9c663e9af22d9bfc00d/test_esmf_loader-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9e1b1611969ebe34bf2c584a1f46e80550af02861d3bf98d11cb9aaabc528376",
"md5": "934ffd06d30a1809229c6bd4e82cf8eb",
"sha256": "c1825b4e556575f2dbb7d1c123e1ba36a9fc3ed5e5c3be74467c251c1d0ddfca"
},
"downloads": -1,
"filename": "test_esmf_loader-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "934ffd06d30a1809229c6bd4e82cf8eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 328931,
"upload_time": "2024-04-05T07:23:21",
"upload_time_iso_8601": "2024-04-05T07:23:21.947695Z",
"url": "https://files.pythonhosted.org/packages/9e/1b/1611969ebe34bf2c584a1f46e80550af02861d3bf98d11cb9aaabc528376/test_esmf_loader-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-05 07:23:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bci-oss",
"github_project": "esmf-sdk-py-aspect-model-loader",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "test-esmf-loader"
}