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

None of the patterns that apply stereotypes are structured correctly (and should not be working at all) #21

Open
LostIndeterminateParticle opened this issue Mar 30, 2023 · 0 comments

Comments

@LostIndeterminateParticle
Copy link
Contributor

Sometimes, but not always, running test data with some of the patterns will work
However, I don't understand how it is functioning at all at the moment.
I've yet to identify when it does or doesn't work.

None of the patterns currently contain (and so Ingrid cannot be producing) the information about stereotypes that Player Piano is currently written to ingest (a combination of ID for the profile and the name of the stereotype)

Based on what Player Piano is trying to do -- and on some of the comments in the script -- the stereotypes portion of all patterns should be:
"Vertex Stereotypes": { "<Name of Node N which has a stereotype to be applied>": [ { "profile": "<element ID of the profile containing the stereotype to be applied to Node N>", "stereotype": <stereotype to be applied to Node N> } ], "<Name of Node M which has no stereotypes to apply">: null }

However, I would consider always requiring the explicit ID of the profile to be a fairly annoying way to make patterns (since it makes them hard for a human to read). Calling out the profile by their human-readable name would be preferable. It should be pretty easy to implement a solution that can read in the name of a profile and identify the associated profile in the project. All of the patterns that currently call out a profile, do so by using the profile name. That would mean that the stereotypes portion of all patterns should be:
"Vertex Stereotypes": { "<Name of Node N which has a stereotype to be applied>": [ { "profile": "<name of the profile containing the stereotype to be applied to Node N>", "stereotype": <stereotype to be applied to Node N> } ], "<Name of Node M which has no stereotypes to apply">: null }
This form matches what is in the Composition pattern.

How stereotypes should be structured in patterns is not apparent in the pattern documentation. The closest thing is the image of the Composition pattern in rapid-modeling-tools/ingrid/src/model_processing/patterns/README.md, which does not match the actual contents of the Composition pattern. Additionally, The documentation mentions that only one stereotype can be applied, but that does not match what is actually implemented based on the comments on previous commits and actually looking at Player Piano, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant