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

feat: Add function to load components from Mask Segmentaion with background in ROI Analysis #768

Merged
merged 18 commits into from
Oct 23, 2022

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Oct 22, 2022

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 22, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.89 ⭐ 5.24 ⭐ -0.65 👍
Method Length 58.33 ⭐ 57.48 ⭐ -0.85 👍
Working memory 7.44 🙂 7.22 🙂 -0.22 👍
Quality 68.78% 🙂 70.49% 🙂 1.71% 👍
Other metrics Before After Change
Lines 2792 2844 52
Changed files Quality Before Quality After Quality Change
package/PartSeg/_roi_mask/batch_proceed.py 48.44% 😞 47.75% 😞 -0.69% 👎
package/PartSeg/common_gui/algorithms_description.py 75.75% ⭐ 75.88% ⭐ 0.13% 👍
package/PartSeg/common_gui/custom_save_dialog.py 67.52% 🙂 67.41% 🙂 -0.11% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.60% ⭐ 83.61% ⭐ 0.01% 👍
package/PartSegCore/algorithm_describe_base.py 66.77% 🙂 66.63% 🙂 -0.14% 👎
package/PartSegCore/analysis/load_functions.py 61.48% 🙂 62.18% 🙂 0.70% 👍
package/PartSegCore/mask/io_functions.py 54.21% 🙂 64.20% 🙂 9.99% 👍
package/tests/conftest.py 81.47% ⭐ 82.72% ⭐ 1.25% 👍
package/tests/test_PartSeg/conftest.py 86.56% ⭐ 86.16% ⭐ -0.40% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSeg/_roi_mask/batch_proceed.py BatchProceed.run_calculation 25 😞 402 ⛔ 13 😞 24.66% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 424 ⛔ 17 ⛔ 25.13% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 405 ⛔ 14 😞 27.20% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py save_components 13 🙂 309 ⛔ 15 😞 32.67% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/algorithm_describe_base.py ROIExtractionProfile._pretty_print 21 😞 224 ⛔ 12 😞 34.52% 😞 Refactor to reduce nesting. 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
Copy link

deprecated-napari-hub-preview-bot bot commented Oct 22, 2022

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/768
Updated: 2022-10-23T19:51:13.490417

@codecov
Copy link

codecov bot commented Oct 22, 2022

Codecov Report

Base: 89.29% // Head: 89.46% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (81a9767) compared to base (9986dc4).
Patch coverage: 94.23% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #768      +/-   ##
===========================================
+ Coverage    89.29%   89.46%   +0.16%     
===========================================
  Files          191      192       +1     
  Lines        29615    29678      +63     
===========================================
+ Hits         26446    26552     +106     
+ Misses        3169     3126      -43     
Impacted Files Coverage Δ
package/tests/test_PartSeg/conftest.py 89.25% <ø> (-1.84%) ⬇️
package/PartSeg/common_gui/custom_save_dialog.py 84.12% <75.00%> (ø)
package/PartSegCore/analysis/load_functions.py 81.81% <88.88%> (ø)
package/PartSegCore/mask/io_functions.py 88.34% <92.40%> (+1.21%) ⬆️
package/PartSeg/_roi_mask/batch_proceed.py 89.65% <92.85%> (+45.60%) ⬆️
...ckage/PartSeg/common_gui/algorithms_description.py 94.88% <94.44%> (-0.10%) ⬇️
package/PartSeg/plugins/napari_widgets/utils.py 92.72% <100.00%> (+1.65%) ⬆️
package/PartSegCore/algorithm_describe_base.py 86.21% <100.00%> (-0.05%) ⬇️
package/tests/conftest.py 92.25% <100.00%> (+1.34%) ⬆️
package/tests/test_PartSeg/roi_mask/test_batch.py 100.00% <100.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lgtm-com
Copy link

lgtm-com bot commented Oct 23, 2022

This pull request introduces 1 alert when merging ac395dc into 9986dc4 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@Czaki Czaki merged commit a1f8bba into develop Oct 23, 2022
@Czaki Czaki deleted the feature/load_mask_prj_w_bck branch October 23, 2022 20:07
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