-
-
Notifications
You must be signed in to change notification settings - Fork 217
Add Association Subset Capability #3525
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
Conversation
Factored subset logic into new subsettable class; Updated association class to handle subsets.
This looks good. I'll have to give it a spin 😃 |
They're now part of GTK 4.16, so we do not have to maintain our own.
Now we have a bare model base class we can use for multiple modeling languages.
It means it has no name, owner, or anything. It's just a stylesheet.
Currently translated at 86.3% (577 of 668 strings) Translation: Gaphor/Gaphor Translate-URL: https://hosted.weblate.org/projects/gaphor/gaphor/fi/ Co-authored-by: Jiri Grönroos <jiri.gronroos@iki.fi>
Remove custom macOS keybindings
Automatically update pre-commit hooks weekly
According to the apple docs, the conformance type should be some sort of super-type for our Gaphor model. Since our models are saved as XML, I suppose `public.xml` is the most approprate. https://developer.apple.com/documentation/uniformtypeidentifiers/defining-file-and-data-types-for-your-app?language=objc
macos: Fix Gaphor model file conformance
Fixed property pages for Dependency; added isFinalSpecialization
Currently translated at 100.0% (668 of 668 strings) Translation: Gaphor/Gaphor Translate-URL: https://hosted.weblate.org/projects/gaphor/gaphor/nl/
Currently translated at 97.0% (648 of 668 strings) Translation: Gaphor/Gaphor Translate-URL: https://hosted.weblate.org/projects/gaphor/gaphor/de/
Revert KerML changes
Update translations for Gaphor
Presentation class inherits directly from Base
Implemented drop for ActivityPartition (swimlane)
Hi @pbrown12303 it looks like we are going to need to resolve the UML.gaphor conflict before we merge this one. |
Save model namespace
That's what I expected! @amolenaar Please ping me when you are ready for this. |
Bumps the github-action-updates group with 6 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.1` | `4.2.2` | | [actions/setup-python](https://github.com/actions/setup-python) | `5.2.0` | `5.3.0` | | [github/codeql-action](https://github.com/github/codeql-action) | `3.26.13` | `3.27.0` | | [actions/dependency-review-action](https://github.com/actions/dependency-review-action) | `4.3.4` | `4.4.0` | | [actions/cache](https://github.com/actions/cache) | `4.1.1` | `4.1.2` | | [crazy-max/ghaction-virustotal](https://github.com/crazy-max/ghaction-virustotal) | `4.0.0` | `4.1.0` | Updates `actions/checkout` from 4.2.1 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@eef6144...11bd719) Updates `actions/setup-python` from 5.2.0 to 5.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@f677139...0b93645) Updates `github/codeql-action` from 3.26.13 to 3.27.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@f779452...6624720) Updates `actions/dependency-review-action` from 4.3.4 to 4.4.0 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](actions/dependency-review-action@5a2ce3f...4081bf9) Updates `actions/cache` from 4.1.1 to 4.1.2 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@3624ceb...6849a64) Updates `crazy-max/ghaction-virustotal` from 4.0.0 to 4.1.0 - [Release notes](https://github.com/crazy-max/ghaction-virustotal/releases) - [Commits](crazy-max/ghaction-virustotal@92a6081...93ce6fb) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-action-updates - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-action-updates - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-action-updates - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-action-updates - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-action-updates - dependency-name: crazy-max/ghaction-virustotal dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-action-updates ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Currently translated at 100.0% (668 of 668 strings) Translation: Gaphor/Gaphor Translate-URL: https://hosted.weblate.org/projects/gaphor/gaphor/pt_BR/ Co-authored-by: Léo <leonardoleozinho576@gmail.com>
I merged the changes from this branch with the main branch. Since It looks like GitHub doesn't like the reverse-merge trick. I merged subset to main, then merged the merge request back into the branch. If you want to see what really changed, check the merge commit. |
Factored subset logic into new
subsettable_umlproperty
class; Updatedassociation
class to handle subsets.This pull request enables subsetting of associations. I factored the subset logic into a new subclass of
umlproperty
(subsettable_umlproperty
) and made it the parent class of all subsettable properties, includingassociation
. I updated theassociation
class to coordinate the subset contents. The documentation of association details the logic governing the superset/subset contents under various editing scenarios. Some of the logic is not determined solely by standard set theory, but is rather based on policy. Please examine these policies to see if they make sense.The test cases cover all of the cases described and verify that a subsetted association still works correctly as a subset of a derived union.
One of the checks I added in
subsettable_umlproperty.add()
is to ensure that a subclass with multiplicity of many is not allowed as a subclass of an association with a multiplicity of 1. I originally raised an error here, but that created its own problem. Theadd()
method is called during initialization when theuml.py
file is read in, which would be appropriate except for the fact that the execution ofpoetry run poe uml
also loads uml.py in its startup. If there is a subsetting error in the model (which there was - see below), then poe cannot generate a new uml.py file. In other words, there is no mechanism for fixing the error. Consequently, instead of raising an error, I log a warning that will appear when gaphor runs.As mentioned, there was a modeling error in the existing UML model. The
BehavioralFeature.ownedParameterSet
was modeled with an upper multiplicity of many, but is declared to be a subset ofnamespace
which has a multiplicity of 1. This was caught in the updated add() function. I changed the multiplicity to 1. That is the only change to the UML model.PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information