8000 refactor: clean and test `PartSeg.common_gui.universal_gui_part` by Czaki · Pull Request #617 · 4DNucleome/PartSeg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: clean and test PartSeg.common_gui.universal_gui_part #617

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 7 commits into from
May 4, 2022

Conversation

Czaki
Copy link
Collaborator
@Czaki Czaki commented May 4, 2022

No description provided.

@Czaki Czaki added this to the v0.14.2 milestone May 4, 2022
@deprecated-napari-hub-preview-bot

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/617

…rcery refactored) (#618)

Co-authored-by: Sourcery AI <>
@deprecated-napari-hub-preview-bot

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/617

1 similar comment
@deprecated-napari-hub-preview-bot

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/617

@codecov
Copy link
codecov bot commented May 4, 2022

Codecov Report

Merging #617 (ca5f47e) into develop (03d9c1f) will increase coverage by 0.43%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #617      +/-   ##
===========================================
+ Coverage    81.08%   81.52%   +0.43%     
===========================================
  Files          143      143              
  Lines        19148    19114      -34     
===========================================
+ Hits         15527    15582      +55     
+ Misses        3621     3532      -89     
Impacted Files Coverage Δ
package/PartSeg/common_gui/universal_gui_part.py 93.33% <100.00%> (+37.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03d9c1f...ca5f47e. Read the comment docs.

@deprecated-napari-hub-preview-bot

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/617

@sourcery-ai
Copy link
Contributor
sourcery-ai bot commented May 4, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.87%.

Quality metrics Before After Change
Complexity 0.76 ⭐ 0.44 ⭐ -0.32 👍
Method Length 56.88 ⭐ 55.30 ⭐ -1.58 👍
Working memory 6.67 🙂 6.47 🙂 -0.20 👍
Quality 77.20% 78.07% 0.87% 👍
Other metrics Before After Change
Lines 1267 1257 -10
Changed files Quality Before Quality After Quality Change
package/PartSeg/common_gui/universal_gui_part.py 75.25% ⭐ 78.86% ⭐ 3.61% 👍
package/tests/test_PartSeg/test_common_gui.py 77.73% ⭐ 77.89% ⭐ 0.16% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/tests/test_PartSeg/test_common_gui.py TestMultipleFileWidget.test_load_files 1 ⭐ 220 ⛔ 12 😞 52.38% 🙂 Try splitting into smaller methods. Extract out complex expressions
package/tests/test_PartSeg/test_common_gui.py test_p_load_dialog 1 ⭐ 277 ⛔ 9 🙂 55.11% 🙂 Try splitting into smaller methods
package/tests/test_PartSeg/test_common_gui.py test_p_save_dialog 0 ⭐ 275 ⛔ 9 🙂 56.19% 🙂 Try splitting into smaller methods
package/PartSeg/common_gui/universal_gui_part.py Spacing.__init__ 2 ⭐ 197 😞 10 😞 56.64% 🙂 Try splitting into smaller methods. Extract out complex expressions
package/tests/test_PartSeg/test_common_gui.py TestMultipleFileWidget.test_load_recent 1 ⭐ 181 😞 11 😞 57.05% 🙂 Try splitting into smaller methods. Extract out complex expressions

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!

Help us improve this quality report!

@deprecated-napari-hub-preview-bot

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/617

@Czaki Czaki merged commit da5e19f into develop May 4, 2022
@Czaki Czaki deleted the refactor/fix_universal_gui_part branch May 4, 2022 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0