diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2b280ceb..2b6ab38e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,7 @@ Closes # ## MS2 Criteria (to be filled out by PR reviewer) -- [ ] the model **validates** with the BAMM SDS SDK in the version specified in the Readme.md of this repository by the time of the MS2 check (e.g., 'java -jar bamm-cli.jar -i \ -v ). The BAMM CLI is available [here](https://openmanufacturingplatform.github.io/sds-documentation/sds-developer-guide/dev-snapshot/tooling-guide/bamm-cli.html) and in [GitHub](https://github.com/OpenManufacturingPlatform/sds-sdk/releases) +- [ ] the model **validates** with the BAMM SDS SDK in the version specified in the Readme.md of this repository by the time of the MS2 check (e.g., 'java -jar bamm-cli.jar -i \ -v ). The SAMM CLI is available [here](https://eclipse-esmf.github.io/esmf-developer-guide/tooling-guide/samm-cli.html) and in [GitHub](https://github.com/eclipse-esmf/esmf-sdk/releases/tag/v2.3.1) - [ ] use **Camel-Case** (e.g., "MyModelElement" or "TimeDifferenceGmtId", when in doubt follow https://google.github.io/styleguide/javaguide.html#s5.3-camel-case) - [ ] the identifiers for all model elements **start with a capital letter** except for properties - [ ] the identifier for **properties starts with a small letter** @@ -23,7 +23,7 @@ Closes # - [ ] units are referenced from the BAMM unit catalog whenever possible - [ ] **use constraints** to make known constraints from the use case explicit in the aspect model - [ ] when relying on **external standards**, they are referenced through a **"see"** element -- [ ] all properties with an [simple type](https://openmanufacturingplatform.github.io/sds-documentation/bamm-specification/v1.0.0/datatypes.html) have an example value +- [ ] all properties with an [simple type](https://eclipse-esmf.github.io/samm-specification/2.0.0/datatypes.html) have an example value - [ ] metadata.json exists with status "release" - [ ] generated json schema validates against example json payload - [ ] file RELEASE_NOTES.md exists and contains entries for proposed model changes diff --git a/.github/actions/model-validation/action.yml b/.github/actions/model-validation/action.yml index 8804bd8b..8c0b6e73 100644 --- a/.github/actions/model-validation/action.yml +++ b/.github/actions/model-validation/action.yml @@ -10,8 +10,8 @@ inputs: default: "[]" required: false bamm_version: - description: The version of the used BAMM SDK - default: 2.1.1 + description: The version of the used SAMM SDK + default: 2.3.1 required: true token: description: GitHub token @@ -25,4 +25,4 @@ inputs: default: "false" runs: using: node16 - main: index.js \ No newline at end of file + main: index.js diff --git a/.github/actions/model-validation/index.js b/.github/actions/model-validation/index.js index 514a36f4..3ae63224 100644 --- a/.github/actions/model-validation/index.js +++ b/.github/actions/model-validation/index.js @@ -9,7 +9,7 @@ const { TIMEOUT } = require('dns'); var bulk = JSON.parse(core.getInput('bulk')) var bammVersion = core.getInput('bamm_version') -var bammSdkPath = `${__dirname}/bamm-cli-${bammVersion}.jar`; +var bammSdkPath = `${__dirname}/samm-cli-${bammVersion}.jar`; var added = JSON.parse(core.getInput('added')) var modified = JSON.parse(core.getInput('modified')) @@ -19,7 +19,7 @@ main() async function main() { try { - await asyncBammSdkDownload(`https://github.com/eclipse-esmf/esmf-sdk/releases/download/v${bammVersion}/bamm-cli-${bammVersion}.jar`) + await asyncBammSdkDownload(`https://github.com/eclipse-esmf/esmf-sdk/releases/download/v${bammVersion}/samm-cli-${bammVersion}.jar`) if(bulk === false){ validateChanges(added, modified, prNumber) @@ -154,22 +154,22 @@ async function asyncBammSdkDownload(url) { async function downloadBammSdk(url, resolve, reject) { https.get(url, (response) => { if (response.statusCode >= 400) { - reject("Could not download BAMM SDK v${bammVersion}") + reject("Could not download SAMM SDK v${bammVersion}") } if (response.statusCode > 300 && response.statusCode < 400 && !!response.headers.location) { downloadBammSdk(response.headers.location, resolve, reject) } else { - console.log(`Starting download of BAMM SDK v${bammVersion}`) + console.log(`Starting download of SAMM SDK v${bammVersion}`) const filePath = fs.createWriteStream(bammSdkPath); response.pipe(filePath) filePath.on('finish', () => { filePath.close() - console.log(`Downloaded BAMM SDK v${bammVersion}`) - resolve(`Downloaded BAMM SDK v${bammVersion}`) + console.log(`Downloaded SAMM SDK v${bammVersion}`) + resolve(`Downloaded SAMM SDK v${bammVersion}`) }) } }) -} \ No newline at end of file +} diff --git a/.github/actions/validate/Readme.md b/.github/actions/validate/Readme.md index ec748555..17193de8 100644 --- a/.github/actions/validate/Readme.md +++ b/.github/actions/validate/Readme.md @@ -14,7 +14,7 @@ ####################################################################### --> # Detect Changes Action -This action validates whether and which changes in the repository need to be applied to an instance of the Semantic Hub beeing associtated with the repository. +This action validates whether and which changes in the repository need to be applied to an instance of the Semantic Hub being associated with the repository. The action expects multiple arrays which either contain added, modified, renamed and deleted files from the last commit. The actual deployment to an Semantic Hub instance is done through the Upload-action which expects a JSON-file with the changes to apply. Because of that, the result of the validation action is an archived JSON-file communicating these detected changes. diff --git a/.github/actions/validate/index.js b/.github/actions/validate/index.js index 87f1c7c9..c24e62be 100644 --- a/.github/actions/validate/index.js +++ b/.github/actions/validate/index.js @@ -179,7 +179,7 @@ function deleteAspects(files) { if (isModelFile(file)) { splitted = file.split("/") - urn = "urn:bamm:" + splitted[0] + ":" + splitted[1] + '%23' + urn = "urn:samm:" + splitted[0] + ":" + splitted[1] + '%23' console.log("Urn is" + urn) output.delete.push(urn) } @@ -202,4 +202,4 @@ function setOutput() { } catch(err) { console.log("Error writing file: " + error.message) } - } \ No newline at end of file + } diff --git a/README.md b/README.md index a9208d5c..e2fd017a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Aspect Models for Eclipse Tractus-X Semantic Layer (SLDT) -The repository contains the aspect models based on [SAMM (Semantic Aspect Meta Model)](https://openmanufacturingplatform.github.io/sds-documentation/bamm-specification/snapshot/index.html) for the Tractus-X project for Catena-X. +The repository contains the aspect models based on [SAMM (Semantic Aspect Meta Model)](https://eclipse-esmf.github.io/samm-specification/2.0.0/index.html) for the Tractus-X project for Catena-X. -**Currently, we assume the usage of the version 2.1.0 of the [SAMM-CLI](https://github.com/eclipse-esmf/esmf-sdk/releases/tag/v2.1.0)**. +**Currently, we assume the usage of the version 2.3.1 of the [SAMM-CLI](https://eclipse-esmf.github.io/esmf-developer-guide/2.3.1/tooling-guide/samm-cli.html) and version 4.5.0 of the [Aspect Model Editor](https://eclipse-esmf.github.io/ame-guide/4.5.0/introduction.html) **. # Using the models -The models can locally be processed with the [SAMM CLI](https://github.com/eclipse-esmf/esmf-sdk/releases/tag/v2.1.0), which is documented [here](https://openmanufacturingplatform.github.io/sds-documentation/sds-documentation/index.html). +The models can locally be processed with the [SAMM CLI](https://eclipse-esmf.github.io/esmf-developer-guide/2.3.1/tooling-guide/samm-cli.html), which is documented [here](https://eclipse-esmf.github.io/esmf-developer-guide/2.3.1/tooling-guide/samm-cli.html). It allows you to generate different artifacts (diagrams, example payload, java class files) out of it. For convenience you can also look into the `gen` folder of each model, which already contains often used artifacts generated from the model. diff --git a/generate.sh b/generate.sh index 90a6a471..373e0c0e 100755 --- a/generate.sh +++ b/generate.sh @@ -34,7 +34,7 @@ JARNAME=samm-cli-2.3.1.jar SAMMFOLDER=.SAMMCLI/ SAMMCLI=$SAMMFOLDER$JARNAME # Adjust if SAMM CLI version changes -SAMMCLIURL=https://github.com/eclipse-esmf/esmf-sdk/releases/download/v2.2.3/samm-cli-2.3.1.jar +SAMMCLIURL=https://github.com/eclipse-esmf/esmf-sdk/releases/download/v2.3.1/samm-cli-2.3.1.jar CATENAXCSS=$SAMMFOLDER/catena-template.css CATENAXCUSTOMCSSURL=https://raw.githubusercontent.com/eclipse-tractusx/sldt-semantic-hub/main/backend/src/main/resources/catena-template.css