-
-
Notifications
You must be signed in to change notification settings - Fork 216
KerML Root model #3365
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
Merged
Merged
KerML Root model #3365
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drop `directedRelationship` property from the model. For dependency items, drop the Named marker interface. We can restore this after `name` is moved to the base class.
54d8a64
to
07101be
Compare
Since Relationship is a core construct now.
07101be
to
a2f1f86
Compare
Also move qualifiedName.
This complicates things a bit: Namespace is no longer a subtype of NamedElement.
4a2d17c
to
cee9339
Compare
amolenaar
commented
Jun 27, 2024
Eventually this class should go away, but for now we need it or a lot of code breaks.
Loosen the test criteria.
Now all elements are properly grouped.
Slots are used by stereotypes.
cee9339
to
322659a
Compare
danyeaw
approved these changes
Jul 4, 2024
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.
Hi @amolenaar, these changes look great, nice start on our way to KerML 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
What kind of change does this PR introduce?
What is new?
Gaphor has a minimal core model.
This PR implements (part of) the KerML spec for the core model. I think this is a nice stepping stone to implementing, as KerML is the basis got SysML v2.
The idea is to slowly migrate to the KerML metamodel as a basis for Gaphor.
The new model can be viewed in the readthedocs build.
Issue Number: #2584
Other information
Relationship
to core modelDependency
to core modelname
toElement
(as is, not as a derived property)Remove use ofNamedElement
, oncename
is moved toElement
NamedElement
is used all over the placeNamespace
to core modelMoveHard, since it still depends on UML elements too.DependencyItem
to diagram package?Deal withLeave as exception for now. We also have some properties forRelationship.abstraction
. It's not part of the core model.Namespace
, but it looks like we do not use those (MyPy is not complaining at least).Named
interface again onDirectedRelationshipPropertyPathItem
,DependencyItem
, andInterfaceRealizationItem
.Review notes:
This PR has become pretty big.
A lot of files changed due to
name
andnamespace
now being part of theElement
class: no casting is required inwatch()
operationsI tried to remove NamedElement. So far I got it out of the Model Browser, but there's some other places that depend on it still. Although NamedElement only contains a visibility attribute (not sure if we even use that).
I think we need a base type for Element at some point, so Element can be used for "normal" model elements and we can derive "gaphor-internal" types like Presentation and StyleSheet from the base type. This way Element can more easily replace NamedElement.
I tried to change the semantics of the model as little as possible. E.g. I did not implement the
Membership
andOwnedMembership
relations.