8000 chore: Bump ruff to 0.0.218, remove flake8 from pre-commit by Czaki · Pull Request #880 · 4DNucleome/PartSeg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: Bump ruff to 0.0.218, remove flake8 from pre-commit #880

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 15 commits into from
Jan 11, 2023
Merged

Conversation

Czaki
Copy link
Collaborator
@Czaki Czaki commented Jan 10, 2023

Bump ruff to 218, handle updated rules.

@sourcery-ai
Copy link
Contributor
sourcery-ai bot commented Jan 10, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.90 ⭐ 1.85 ⭐ -0.05 👍
Method Length 88.37 🙂 88.59 🙂 0.22 👎
Working memory 6.09 ⭐ 6.08 ⭐ -0.01 👍
Quality 72.05% 🙂 72.06% 🙂 0.01% 👍
Other metrics Before After Change
Lines 14099 14101 2
Changed files Quality Before Quality After Quality Change
setup.py 79.74% ⭐ 80.18% ⭐ 0.44% 👍
examples/call_simple_threshold.py 82.29% ⭐ 82.29% ⭐ 0.00%
package/PartSeg/_roi_analysis/image_view.py 71.49% 🙂 71.52% 🙂 0.03% 👍
package/PartSeg/_roi_mask/stack_settings.py 59.20% 🙂 59.20% 🙂 0.00%
package/PartSeg/common_backend/partially_const_dict.py 87.80% ⭐ 87.80% ⭐ 0.00%
package/PartSeg/common_backend/python_syntax_highlight.py 80.89% ⭐ 81.18% ⭐ 0.29% 👍
package/PartSeg/common_gui/main_window.py 70.84% 🙂 70.84% 🙂 0.00%
package/PartSeg/common_gui/napari_image_view.py 63.44% 🙂 63.67% 🙂 0.23% 👍
package/PartSegCore/class_generator.py 49.11% 😞 49.56% 😞 0.45% 👍
package/PartSegCore/analysis/measurement_calculation.py 71.00% 🙂 71.02% 🙂 0.02% 👍
package/PartSegImage/tifffile_fixes.py 30.16% 😞 30.16% 😞 0.00%
package/tests/conftest.py 82.15% ⭐ 82.10% ⭐ -0.05% 👎
package/tests/test_PartSeg/conftest.py 85.84% ⭐ 85.94% ⭐ 0.10% 👍
package/tests/test_PartSeg/test_analysis.py 71.39% 🙂 71.27% 🙂 -0.12% 👎
package/tests/test_PartSeg/test_base_widgets.py 80.38% ⭐ 80.35% ⭐ -0.03% 👎
package/tests/test_PartSeg/test_channel_control.py 65.57% 🙂 65.52% 🙂 -0.05% 👎
package/tests/test_PartSeg/test_check_release.py 77.55% ⭐ 77.53% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_backend.py 73.51% 🙂 73.44% 🙂 -0.07% 👎
package/tests/test_PartSeg/test_common_gui.py 76.74% ⭐ 76.67% ⭐ -0.07% 👎
package/tests/test_PartSeg/test_label_choose.py 85.40% ⭐ 85.27% ⭐ -0.13% 👎
package/tests/test_PartSeg/test_launcher.py 83.75% ⭐ 83.60% ⭐ -0.15% 👎
package/tests/test_PartSeg/test_main_windows.py 74.14% 🙂 73.88% 🙂 -0.26% 👎
package/tests/test_PartSeg/test_napari_image_view.py 72.57% 🙂 72.91% 🙂 0.34% 👍
package/tests/test_PartSeg/test_napari_widgets.py 66.27% 🙂 66.24% 🙂 -0.03% 👎
package/tests/test_PartSeg/test_roi_analysis_batch.py 74.44% 🙂 74.41% 🙂 -0.03% 👎
package/tests/test_PartSeg/test_settings.py 76.79% ⭐ 76.88% ⭐ 0.09% 👍
package/tests/test_PartSeg/test_viewer.py 71.88% 🙂 71.84% 🙂 -0.04% 👎
package/tests/test_PartSeg/roi_analysis/test_batch.py 82.96% ⭐ 82.93% ⭐ -0.03% 👎
package/tests/test_PartSeg/roi_analysis/test_image_view.py 65.80% 🙂 65.74% 🙂 -0.06% 👎
package/tests/test_PartSeg/roi_analysis/test_main_window.py 80.08% ⭐ 80.03% ⭐ -0.05% 👎
package/tests/test_PartSeg/roi_mask/test_batch.py 88.59% ⭐ 88.58% ⭐ -0.01% 👎
package/tests/test_PartSeg/roi_mask/test_main_window.py 85.59% ⭐ 85.52% ⭐ -0.07% 👎
package/tests/test_PartSegCore/test_analysis_batch.py 62.47% 🙂 62.46% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_class_generator.py 77.99% ⭐ 77.97% ⭐ -0.02% 👎
package/tests/test_PartSegCore/test_io.py 72.02% 🙂 72.01% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 71.33% 🙂 71.31% 🙂 -0.02% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 73.83% 🙂 73.83% 🙂 0.00%
package/tests/test_PartSegImage/test_image.py 76.31% ⭐ 76.13% ⭐ -0.18% 👎
package/tests/test_PartSegImage/test_image_reader.py 86.42% ⭐ 86.40% ⭐ -0.02% 👎
package/tests/test_PartSegImage/test_image_writer.py 69.59% 🙂 69.59% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegImage/tifffile_fixes.py _xml2dict 34 ⛔ 240 ⛔ 20.62% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
package/PartSegCore/class_generator.py _make_class 16 🙂 437 ⛔ 22 ⛔ 22.42% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSeg/_roi_mask/stack_settings.py StackSettings.transform_state 13 🙂 391 ⛔ 18 ⛔ 27.94% 😞 Try splitting into smaller methods. Extract out complex expressions
package/PartSeg/common_gui/napari_image_view.py ImageView.print_info 23 😞 233 ⛔ 13 😞 31.07% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/measurement_calculation.py MeasurementProfile.calculate_yield 14 🙂 326 ⛔ 34.22% 😞 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
Copy link
deprecated-napari-hub-preview-bot bot commented Jan 10, 2023

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/880
Updated: 2023-01-11T15:54:43.963265 8000

@codecov
Copy link
codecov bot commented Jan 10, 2023

Codecov Report

Base: 90.81% // Head: 90.82% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (941bd11) compared to base (449ad26).
Patch coverage: 98.90% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #880   +/-   ##
========================================
  Coverage    90.81%   90.82%           
========================================
  Files          196      196           
  Lines        30264    30259    -5     
========================================
- Hits         27485    27482    -3     
+ Misses        2779     2777    -2     
Impacted Files Coverage Δ
package/tests/test_PartSeg/test_launcher.py 100.00% <ø> (ø)
...kage/tests/test_PartSegCore/test_analysis_batch.py 98.85% <ø> (ø)
package/PartSeg/common_gui/napari_image_view.py 87.72% <66.66%> (+0.20%) ⬆️
package/PartSeg/_roi_analysis/image_view.py 100.00% <100.00%> (ø)
package/PartSeg/_roi_mask/stack_settings.py 83.00% <100.00%> (ø)
...age/PartSeg/common_backend/partially_const_dict.py 100.00% <100.00%> (ø)
.../PartSeg/common_backend/python_syntax_highlight.py 100.00% <100.00%> (ø)
package/PartSeg/common_gui/main_window.py 88.23% <100.00%> (ø)
...ge/PartSegCore/analysis/measurement_calculation.py 97.09% <100.00%> (ø)
package/PartSegCore/class_generator.py 68.12% <100.00%> (-0.14%) ⬇️
... and 28 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.

@Czaki Czaki changed the title chore: Bump ruff to 0.0.217 chore: Bump ruff to 0.0.217, remove flake8 from pre-commit Jan 10, 2023
@Czaki Czaki added this to the 0.15.0 milestone Jan 10, 2023
@Czaki Czaki changed the title chore: Bump ruff to 0.0.217, remove flake8 from pre-commit chore: Bump ruff to 0.0.218, remove flake8 from pre-commit Jan 11, 2023
@sonarqubecloud
Copy link

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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Czaki Czaki merged commit 3f8f3bc into develop Jan 11, 2023
@Czaki Czaki deleted the bump_ruff branch January 11, 2023 16:13
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