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

Move Diagrams component to it's own module #435

Merged
merged 1 commit into from
Sep 12, 2020

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Sep 11, 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?

Main window and Diagrams were in the same module. This made the module quite big (~500 lines).

What is the new behavior?

Main window and Diagrams each have their own file. This makes it easier to use them.

Does this PR introduce a breaking change?

  • Yes
  • No

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 11, 2020

Sourcery Code Quality Report (beta)

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

Quality metrics Before After Change
Complexity 0.75 0.46 -0.29 🔵
Method Length 47.92 48.65 0.73 🔴
Quality 8.84 8.88 0.04 🔵
Other metrics Before After Change
Lines 639 430 -209
Changed files Quality Before Quality After Quality Change
gaphor/ui/mainwindow.py 8.83 8.90 0.07 🔵
gaphor/ui/tests/test_diagrampage.py 9.22 9.22 0.00
gaphor/ui/tests/test_handletool.py 8.73 8.73 0.00

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

File Function Complexity Length Overall Recommendation
gaphor/ui/mainwindow.py MainWindow.open 2 242.82 5.61 Split out functionality
gaphor/ui/tests/test_handletool.py test_connect_comment_and_actor 0 250.78 5.75 Split out functionality
gaphor/ui/tests/test_handletool.py test_iconnect 0 163.90 6.63 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 by mentioning @sourcery-ai in a comment.

@danyeaw danyeaw added the chore Maintenance related PR label Sep 12, 2020
@danyeaw danyeaw merged commit d66d962 into master Sep 12, 2020
@danyeaw danyeaw deleted the diagrams-to-separate-module branch September 12, 2020 17:29
@danyeaw
Copy link
Member

danyeaw commented Sep 12, 2020

Nice idea!

@amolenaar
Copy link
Member Author

Thanks 😊

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

Successfully merging this pull request may close these issues.

None yet

2 participants