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

Ownership for interactions #447

Merged
merged 5 commits into from
Sep 26, 2020
Merged

Ownership for interactions #447

merged 5 commits into from
Sep 26, 2020

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Sep 26, 2020

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

Lifelines and Messages are not owned, hence they end up in the root of the tree view

Issue Number: #386

What is the new behavior?

Lifelines, Messages, and Execution Specifications are shown in an Interaction. If no Interaction exists in the package the diagram resides in, a new one will be created.

When a lifeline/message/execspec is dragged out of an interaction, it remains part of that interaction hierarchically. This avoid dangling elements. It is placed in a new interaction if it's dragged in to one.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

No migration has been written for older models.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 26, 2020

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.07%.

Quality metrics Before After Change
Complexity 1.73 ⭐ 1.68 ⭐ -0.05 👍
Method Length 59.25 ⭐ 58.60 ⭐ -0.65 👍
Working memory 8.43 🙂 8.16 🙂 -0.27 👍
Quality 85.58% 85.51% -0.07% 👎
Other metrics Before After Change
Lines 1544 1654 110
Changed files Quality Before Quality After Quality Change
gaphor/UML/toolbox.py 89.74% ⭐ 88.54% ⭐ -1.20% 👎
gaphor/UML/interactions/executionspecification.py 89.11% ⭐ 89.11% ⭐ 0.00%
gaphor/UML/interactions/interactionsconnect.py 82.68% ⭐ 82.22% ⭐ -0.46% 👎
gaphor/UML/interactions/interactionsgrouping.py 98.89% ⭐ 98.54% ⭐ -0.35% 👎
gaphor/UML/interactions/tests/test_message.py 93.03% ⭐ 90.71% ⭐ -2.32% 👎
gaphor/UML/interactions/tests/test_messageconnect.py 83.96% ⭐ 83.20% ⭐ -0.76% 👎
gaphor/diagram/diagramtools.py 83.05% ⭐ 83.05% ⭐ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
gaphor/UML/interactions/interactionsconnect.py order_lifeline_covered_by 11 🙂 126 😞 11 😞 53.13% 🙂 Try splitting into smaller methods. Extract out complex expressions
gaphor/diagram/diagramtools.py DiagramItemConnector.connect 9 🙂 140 😞 11 😞 53.33% 🙂 Try splitting into smaller methods. Extract out complex expressions
gaphor/UML/interactions/interactionsconnect.py order_lifeline_covered_by.y_and_occurence 8 ⭐ 99 🙂 11 😞 59.39% 🙂 Extract out complex expressions
gaphor/UML/interactions/executionspecification.py ExecutionSpecificationItem.__init__ 0 149 😞 8 🙂 67.30% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@amolenaar amolenaar added the feature A new feature label Sep 26, 2020
@amolenaar amolenaar added this to the 2.1 milestone Sep 26, 2020
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

This is awesome! You turned this around super quick, amazing as always 😄

@danyeaw danyeaw merged commit 2e13156 into master Sep 26, 2020
@danyeaw danyeaw deleted the ownership-for-messages branch September 26, 2020 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants