Skip to main content

Load Aspect Models based on the Semantic Aspect Meta Model

Project description

The Aspect Model Loader as part of the Python SDK provided by the Eclipse Semantic Modeling Framework.

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' has been set up for the esmf-aspect-model-loader. This action checks the code quality by running tests, the static type checker MyPy and the code formatter '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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

test_esmf_loader-0.0.1.tar.gz (328.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

test_esmf_loader-0.0.1-py3-none-any.whl (454.4 kB view details)

Uploaded Python 3

File details

Details for the file test_esmf_loader-0.0.1.tar.gz.

File metadata

  • Download URL: test_esmf_loader-0.0.1.tar.gz
  • Upload date:
  • Size: 328.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Windows/10

File hashes

Hashes for test_esmf_loader-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7a84fb39946d22193d02d4554d15e64b85776d4bc7a077919393dd29d8ac5a43
MD5 28827850bc411be98ed6540dc408f8a0
BLAKE2b-256 c5d0a0c2870babcc51263df8815cc758147a28bbdb6476295aed2f2256a7494f

See more details on using hashes here.

File details

Details for the file test_esmf_loader-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: test_esmf_loader-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 454.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Windows/10

File hashes

Hashes for test_esmf_loader-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf8eba93da8139de2b9caf140a51d1030ba506aee761c0dfdf4457506f2044d1
MD5 7b7b4b2e21e1a5e3327649b307309187
BLAKE2b-256 17b17550b2edd23e258348b9b37e695f06fac5c503ac882fc4652a74111f1904

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page