-
Notifications
You must be signed in to change notification settings - Fork 4
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
Reuse JAVA SDK test suite #39
Conversation
7632a12
to
1895daa
Compare
1895daa
to
557c5fd
Compare
|
||
FOLDER_TO_EXTRACT = "valid" | ||
TEST_MODELS_PATH = join("tests", "integration", "java_models", "resources") | ||
VERSION = "2.7.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In download_samm_cli.py
there is another constant, SAMM_CLI_VERSION
(which currently points to a different esmf-sdk version!). There should be only one place where the esmf-sdk version is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move all constants to the separate file
a077726
to
387709d
Compare
- [Install project dependencies](#install-project-dependencies) | ||
- [Download SAMM files](#download-samm-files) | ||
Optional | ||
- [Download SAMM CLI](#download-samm-cli) (need to use SAMM CLI functions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [Download SAMM CLI](#download-samm-cli) (need to use SAMM CLI functions) | |
- [Download SAMM CLI](#download-samm-cli) (needed to use SAMM CLI functions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
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. | ||
There are two possibilities to download the SAMM files and extract the Turtle sources for the Meta Model: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this section should also explain for whom are the SAMM files interesting, or in other words, why would you want to download them. IMO users of the aspect-meta-model-python should not have to deal with this at all (if they don't want to), including that they should not need to know about this.
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. | ||
### Download SAMM CLI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section I don't understand, shouldn't this work transparently? I.e., users should not be required to know about this at all, it should "just work". samm-cli should be downloaded automatically "under the hood" when it's not present yet.
``` | ||
poetry run download-samm-branch | ||
|
||
How to work with SAMM CLI from the Aspect Model Loader you can read in the chapter [SMM ClI wrapper](#samm-cli-wrapper). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to work with SAMM CLI from the Aspect Model Loader you can read in the chapter [SMM ClI wrapper](#samm-cli-wrapper). | |
How to work with SAMM CLI from the Aspect Model Loader you can read in the chapter [SAMM CLI wrapper](#samm-cli-wrapper). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
More detailed information about SAMM CLI functionality can be found in the | ||
[SAMM CLI documentation](https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/samm-cli.html). | ||
|
||
### Download test models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this also does not belong in the README. Shouldn't this be done automatically when the tests are run?
|
||
The SAMM CLI is a command line tool provided number of functions for working with Aspect Models. | ||
|
||
ore detailed information about SAMM CLI functionality can be found in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph is missing the start of a sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
ore detailed information about SAMM CLI functionality can be found in the | ||
[SAMM CLI documentation](https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/samm-cli.html). | ||
|
||
Python aspect Model Loader provide a wrapper class to be able to call SAMM CLI functions from the python code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python aspect Model Loader provide a wrapper class to be able to call SAMM CLI functions from the python code. | |
Python Aspect Model Loader provide a wrapper class to be able to call SAMM CLI functions from the Python code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
[SAMM CLI documentation](https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/samm-cli.html). | ||
|
||
Python aspect Model Loader provide a wrapper class to be able to call SAMM CLI functions from the python code. | ||
For instance, validation a model can be done with the next code snippet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For instance, validation a model can be done with the next code snippet | |
For instance, validation of a model can be done with the following code snippet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
from esmf_aspect_meta_model_python.samm_cli_functions import SammCli | ||
|
||
samm_cli = SammCli() | ||
model_path = "Paht_to_the_model//Model.ttl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model_path = "Paht_to_the_model//Model.ttl" | |
model_path = "Path_to_the_model/Model.ttl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
66da704
to
5bed60f
Compare
5bed60f
to
8deaad4
Compare
Description
Added a script for download test models and test for loading models.
Type of change
Please delete options that are not relevant.
Checklist: