Skip to content
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

Batch 2.0.0 #286

Merged
merged 9 commits into from
Sep 5, 2023
Merged

Conversation

BenediktMuellerIML
Copy link
Contributor

@BenediktMuellerIML BenediktMuellerIML commented Aug 23, 2023

Description

Updated to Batch 2.0.0. Added Regular expression for KeyCharacteristic and removed properties nameAtCustomer and customerId for compliance reasons.

-->

Closes #281

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 <path-to-aspect-model> -v ). The SAMM CLI is available here and in GitHub
  • 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
  • all model elements at least contain the fields "preferred name" and "description" in English language. The description must be comprehensible. It is not required to write full sentences but style should be consistent over the whole model
  • Property and the referenced Characteristic should not have the same name
  • the versioning in the URN follows semantic versioning, where minor version bumps are backwards compatible and major version bumps are not backwards compatible.
  • use abbreviations only when necessary and if these are sufficiently common
  • avoid redundant prefixes in property names (consider adding properties to an enclosing Entity or even adapt the namespace of the model elements, e.g., instead of having two properties DismantlerId and DismantlerName use an Entity Dismantler with the properties name and id or use a URN like io.catenax.dismantler:0.0.1)
  • fields preferredName and description are not the same
  • preferredName should be human readable and follow normal orthography (e.g., no camel case but normal word separation)
  • name of aspect is singular except if it only has one property which is a Collection, List or Set. In theses cases, the aspect name is plural.
  • 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 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
  • all contributors to this model are mentioned in copyright header of model file

MS3 Criteria

(to be filled out by semantic modeling team before merge to main-branch)

  • All required reviewers have approved this PR (see reviewers section)
  • The new aspect (version) will be implemented by at least one data provider
  • The new aspect (version) will be consumed by at least one data consumer
  • There exists valid test data
  • In case of a new (incompatible) major version to an existing version, a migration strategy has been developed
  • The model has at least version '1.0.0'
  • The release date in the Release Note is set to the date of the MS3 approval

- deleted properties customerId and nameAtCustomer
- added regularExpression for key
- changed description of key
Copy link
Contributor

@bs-jokri bs-jokri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments. Json will validate as soon as the example value is fixed

@@ -2,6 +2,15 @@
All notable changes to this model will be documented in this file.

## [Unreleased]
## [2.0.0] - 2022-08-23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be the date of the MS3 release. You can adjust after the MS3 approval on Monday

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix : <urn:samm:io.catenax.batch:2.0.0#>.
@prefix ext-batch: <urn:samm:io.catenax.batch:1.0.2#>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really import things from the previous version of the batch model? Also, I assume, we do not have a model batch 1.0.3. I would propose to not import anything from an outdated version of a model. Thus, would remove those imports at all and, if required, copy those elements into the model.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

samm:properties (:catenaXId :localIdentifiers :manufacturingInformation :partTypeInformation);
samm:operations ();
samm:events ().
:catenaXId a samm:Property;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an info but nothing to act upon: with the industry core effort, the handling of the catenax id might be harmonized and it is required to adjust here. For now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay thanks

samm:preferredName "Identifier Key"@en;
samm:description "The key of a local identifier. "@en;
samm:characteristic :KeyTrait;
samm:exampleValue "BatchID".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example value does not match the regex constraint

.localIdentifiers[0].key should match pattern "^(manufacturerId|batchId)$"
"BatchID"

change example value to batchId to match

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

samm:exampleValue "raw material".
:KeyTrait a samm-c:Trait;
samm:preferredName "Key Trait "@en;
samm:description "Trait that ensures the usage of predefined keys. "@en;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove whitespace at the end of the string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

samm:dataType xsd:string.
:ClassificationCharacteristic a samm-c:Enumeration;
samm:preferredName "Classification Characteristic"@en;
samm:description "A part type must be placed into one of the following classes: 'component', 'product', 'software', ?assembly?, 'tool', or 'raw material'."@en;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?assembly? -> question marks? still under discussion or what does that mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

:CountryCodeRegularExpression a samm-c:RegularExpressionConstraint;
samm:preferredName "Country Code Regular Expression"@en;
samm:description "Regular Expression that ensures a three-letter code "@en;
samm:value "^[A-Z][A-Z][A-Z]$".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't this be improved to "^[A-Z]{3}$"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

samm:see <https://www.iso.org/iso-3166-country-codes.html>.
:CountryCodeRegularExpression a samm-c:RegularExpressionConstraint;
samm:preferredName "Country Code Regular Expression"@en;
samm:description "Regular Expression that ensures a three-letter code "@en;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove whitespace als please check the remaining document, if there are further places with whitespace and the end of a string (eg L170)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@bs-jokri
Copy link
Contributor

@BenediktMuellerIML I have updated the example value on line 103 to produce a validating example json payload. Now MS2 can be assigned

@bs-jokri bs-jokri added the MS2_Approved Checklist "MS2 Valid Model" is approved. label Aug 25, 2023
@BenediktMuellerIML
Copy link
Contributor Author

@BenediktMuellerIML I have updated the example value on line 103 to produce a validating example json payload. Now MS2 can be assigned

Thank you! I must have overlooked that capital D when correcting the example value.

@bs-jokri
Copy link
Contributor

bs-jokri commented Sep 4, 2023

@BenediktMuellerIML @LuisRickert is anyone of you initiating the MS3 review today?

@LuisRickert
Copy link
Contributor

@BenediktMuellerIML @LuisRickert is anyone of you initiating the MS3 review today?

Not from me, but i didn't work on this model anyway.

@jonbckr
Copy link
Contributor

jonbckr commented Sep 4, 2023

@BenediktMuellerIML @LuisRickert is anyone of you initiating the MS3 review today?

Yes, we will be able to initiate MS3. However, the Testdata is still in progress: https://jira.catena-x.net/projects/TDG/issues/TDG-26?filter=allopenissues

@bs-jokri bs-jokri added MS3_Approved Checklist "MS3 Release Model" is approved. The associated pull request can be merged to the "main-br and removed MS3_Approved Checklist "MS3 Release Model" is approved. The associated pull request can be merged to the "main-br labels Sep 4, 2023
@bs-jokri
Copy link
Contributor

bs-jokri commented Sep 4, 2023

MS3 approval conditionally given under the condition that the use case and especially the data providers verify that the intended behavior of the localIdentifier-List is to have the possibility to not provide a manufacturerId or batchId.

@jonbckr
Copy link
Contributor

jonbckr commented Sep 5, 2023

MS3 approval conditionally given under the condition that the use case and especially the data providers verify that the intended behavior of the localIdentifier-List is to have the possibility to not provide a manufacturerId or batchId.

We discussed it internally, and can verify that it is intended like this. However, this will need to be revised in the future.

@bs-jokri bs-jokri merged commit 6960655 into eclipse-tractusx:main Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MS2_Approved Checklist "MS2 Valid Model" is approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Model Update]: Batch 2.0.0
4 participants