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

add more guards for check if in a proper thread #757

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Oct 16, 2022

No description provided.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 16, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.86 ⭐ 4.92 ⭐ 0.06 👎
Method Length 82.56 🙂 82.14 🙂 -0.42 👍
Working memory 7.80 🙂 7.80 🙂 0.00
Quality 65.26% 🙂 65.20% 🙂 -0.06% 👎
Other metrics Before After Change
Lines 1109 1125 16
Changed files Quality Before Quality After Quality Change
package/PartSeg/common_gui/napari_image_view.py 64.73% 🙂 64.45% 🙂 -0.28% 👎
package/PartSeg/common_gui/napari_viewer_wrap.py 67.45% 🙂 68.18% 🙂 0.73% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSeg/common_gui/napari_image_view.py ImageView.print_info 19 😞 178 😞 11 😞 41.13% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSeg/common_gui/napari_image_view.py ImageView._add_image 16 🙂 343 ⛔ 8 🙂 41.43% 😞 Try splitting into smaller methods
package/PartSeg/common_gui/napari_image_view.py ImageView.component_mark 14 🙂 262 ⛔ 10 😞 41.47% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSeg/common_gui/napari_image_view.py ImageView.__init__ 1 ⭐ 730 ⛔ 14 😞 42.17% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSeg/common_gui/napari_image_view.py ImageView._mark_layer 8 ⭐ 259 ⛔ 45.88% 😞 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!

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/757
Created: 2022-10-16T19:08:32.976887

@codecov
Copy link

codecov bot commented Oct 16, 2022

Codecov Report

Base: 88.91% // Head: 88.91% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (0bcb053) compared to base (7f59296).
Patch coverage: 75.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #757      +/-   ##
===========================================
- Coverage    88.91%   88.91%   -0.01%     
===========================================
  Files          190      190              
  Lines        29559    29569      +10     
===========================================
+ Hits         26282    26290       +8     
- Misses        3277     3279       +2     
Impacted Files Coverage Δ
package/PartSeg/common_gui/napari_viewer_wrap.py 97.80% <71.42%> (-1.06%) ⬇️
package/PartSeg/common_gui/napari_image_view.py 84.85% <80.00%> (+0.05%) ⬆️

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.

@sonarcloud
Copy link

sonarcloud bot commented Dec 31, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

None yet

1 participant