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

Part connector #363

Merged
merged 16 commits into from Jul 23, 2020
Merged

Part connector #363

merged 16 commits into from Jul 23, 2020

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Jul 17, 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

Issue Number: #138

What is the new behavior?

  • Allow (assembly) connections between Ports
  • Allow (delegation) connections between Part and Port
  • Parts can be nested in Blocks
  • Ports can be attached to Properties as well. (no encapsulatedClassifier is set, though!)
  • Fixed issues with item placement, now that Canvas.reparent() also updates the matrices
  • Fixed SysML property pages. The module was not loaded

NB. Somehow Part/Block connection via association does not work (has it ever?)

image

@amolenaar amolenaar force-pushed the part-connector branch 3 times, most recently from a9ddc43 to 188bee6 Compare July 19, 2020 17:13
Rerender icons.
Sourcery AI and others added 2 commits July 20, 2020 07:57
@amolenaar amolenaar added the feature A new feature label Jul 20, 2020
@amolenaar amolenaar marked this pull request as ready for review July 20, 2020 08:52
@amolenaar
Copy link
Member Author

amolenaar commented Jul 20, 2020

@danyeaw Do we miss any behavior?

I think Property's "name" field needs to be parsed, just like Class' attributes.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 22, 2020

Sourcery Code Quality Report (beta)

✅  Merging this PR will increase code quality in the affected files by 0.03 out of 10.

Quality metrics Before After Change
Complexity 1.62 1.52 -0.10 🔵
Method Length 51.65 50.20 -1.45 🔵
Quality 8.79 8.82 0.03 🔵
Other metrics Before After Change
Lines 3245 3392 147
Changed files Quality Before Quality After Quality Change
gaphor/SysML/modelinglanguage.py 9.73 9.72 -0.01 🔴
gaphor/SysML/propertypages.py 9.13 9.17 0.04 🔵
gaphor/SysML/toolbox.py 8.91 8.91 0.00
gaphor/SysML/blocks/init.py 9.78 9.73 -0.05 🔴
gaphor/SysML/blocks/block.py 8.23 8.29 0.06 🔵
gaphor/SysML/blocks/connectors.py 9.34 9.09 -0.25 🔴
gaphor/SysML/blocks/grouping.py 9.72
gaphor/SysML/blocks/proxyport.py 9.19 9.06 -0.13 🔴
gaphor/SysML/blocks/tests/test_connectors.py 9.30 9.27 -0.03 🔴
gaphor/UML/modelfactory.py 8.83 8.76 -0.07 🔴
gaphor/UML/toolbox.py 8.86 8.86 0.00
gaphor/UML/classes/association.py 8.71 8.71 0.00
gaphor/UML/classes/classconnect.py 8.47 8.47 0.00
gaphor/UML/components/connectorconnect.py 8.21 8.21 0.00
gaphor/diagram/diagramtools.py 8.38 8.42 0.04 🔵
gaphor/diagram/shapes.py 8.77 8.76 -0.01 🔴

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

File Function Complexity Length Overall Recommendation
gaphor/UML/classes/association.py AssociationEnd.post_update 17 351.75 3.65 Split out functionality
gaphor/UML/classes/association.py AssociationItem.post_update 17 183.87 4.73 Split out functionality
gaphor/UML/components/connectorconnect.py ConnectorConnectBase.connect 17 167.94 4.93 Split out functionality
gaphor/UML/classes/classconnect.py AssociationConnect.connect_subject 11 201.90 5.09 Split out functionality
gaphor/SysML/blocks/block.py BlockItem.update_shapes 9 152.70 5.89 Split out functionality

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 via email or our Gitter!

@amolenaar amolenaar merged commit 84ea3ee into master Jul 23, 2020
@amolenaar amolenaar deleted the part-connector branch July 23, 2020 08:00
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

1 participant