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: Better serialization mechanism allow for declaration data structure migration locally #462

Merged
merged 163 commits into from
Mar 28, 2022

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Nov 23, 2021

New mechanism reduce boilerpate code and allow create migration next to implementation.

@Czaki Czaki added the enhancement New feature or request label Nov 23, 2021
@Czaki Czaki added this to the 0.13.13 milestone Nov 23, 2021
@Czaki Czaki changed the title Feat: Better serialization mechanism with improved migration feat: Better serialization mechanism with improved migration Nov 24, 2021
@Czaki Czaki modified the milestones: 0.13.13, 0.14.0 Nov 25, 2021
@4DNucleome 4DNucleome deleted a comment from sourcery-ai bot Mar 28, 2022
@4DNucleome 4DNucleome deleted a comment from sourcery-ai bot Mar 28, 2022
@deprecated-napari-hub-preview-bot

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

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

2 similar comments
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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/462

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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/462

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

1 similar comment
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24836 277
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.65% ⭐ 1.67% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24835 276
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.68% ⭐ 1.70% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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/462

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24835 276
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.68% ⭐ 1.70% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

1 similar comment
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.62 ⭐ 3.55 ⭐ -0.07 👍
Method Length 55.40 ⭐ 55.60 ⭐ 0.20 👎
Working memory 8.32 🙂 8.27 🙂 -0.05 👍
Quality 70.12% 🙂 70.36% 🙂 0.24% 👍
Other metrics Before After Change
Lines 24559 24835 276
Changed files Quality Before Quality After Quality Change
docs/conf.py 90.90% ⭐ 80.94% ⭐ -9.96% 👎
package/PartSeg/_roi_analysis/advanced_window.py 59.98% 🙂 59.82% 🙂 -0.16% 👎
package/PartSeg/_roi_analysis/main_window.py 63.70% 🙂 63.70% 🙂 0.00%
package/PartSeg/_roi_analysis/partseg_settings.py 73.82% 🙂 73.74% 🙂 -0.08% 👎
package/PartSeg/_roi_analysis/prepare_plan_widget.py 61.22% 🙂 61.20% 🙂 -0.02% 👎
package/PartSeg/_roi_analysis/profile_export.py 60.09% 🙂 60.09% 🙂 0.00%
package/PartSeg/_roi_mask/batch_proceed.py 50.91% 🙂 50.89% 🙂 -0.02% 👎
package/PartSeg/_roi_mask/main_window.py 66.79% 🙂 66.75% 🙂 -0.04% 👎
package/PartSeg/_roi_mask/segmentation_info_dialog.py 76.00% ⭐ 75.20% ⭐ -0.80% 👎
package/PartSeg/_roi_mask/simple_measurements.py 61.30% 🙂 60.44% 🙂 -0.86% 👎
package/PartSeg/common_backend/base_settings.py 85.69% ⭐ 85.50% ⭐ -0.19% 👎
package/PartSeg/common_gui/algorithms_description.py 78.78% ⭐ 78.44% ⭐ -0.34% 👎
package/PartSeg/common_gui/main_window.py 67.96% 🙂 67.73% 🙂 -0.23% 👎
package/PartSeg/common_gui/napari_image_view.py 67.57% 🙂 67.52% 🙂 -0.05% 👎
package/PartSeg/common_gui/universal_gui_part.py 75.63% ⭐ 75.75% ⭐ 0.12% 👍
package/PartSeg/plugins/modeling_save/save_modeling_data.py 59.06% 🙂 59.06% 🙂 0.00%
package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py 72.52% 🙂 72.64% 🙂 0.12% 👍
package/PartSeg/plugins/napari_widgets/search_label_widget.py 63.41% 🙂 63.64% 🙂 0.23% 👍
package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py 68.00% 🙂 66.75% 🙂 -1.25% 👎
package/PartSeg/plugins/napari_widgets/utils.py 83.98% ⭐ 84.29% ⭐ 0.31% 👍
package/PartSegCore/algorithm_describe_base.py 68.20% 🙂 69.14% 🙂 0.94% 👍
package/PartSegCore/channel_class.py 100.00% ⭐ 100.00% ⭐ 0.00%
package/PartSegCore/class_generator.py 50.70% 🙂 50.68% 🙂 -0.02% 👎
package/PartSegCore/image_operations.py 81.79% ⭐ 80.93% ⭐ -0.86% 👎
package/PartSegCore/io_utils.py 84.13% ⭐ 88.78% ⭐ 4.65% 👍
package/PartSegCore/json_hooks.py 72.95% 🙂 57.26% 🙂 -15.69% 👎
package/PartSegCore/mask_create.py 56.38% 🙂 56.23% 🙂 -0.15% 👎
package/PartSegCore/mask_partition_utils.py 62.09% 🙂 62.70% 🙂 0.61% 👍
package/PartSegCore/project_info.py 83.61% ⭐ 83.61% ⭐ 0.00%
package/PartSegCore/register.py 51.19% 🙂 50.79% 🙂 -0.40% 👎
package/PartSegCore/universal_const.py 98.14% ⭐ 98.83% ⭐ 0.69% 👍
package/PartSegCore/utils.py 82.18% ⭐ 82.10% ⭐ -0.08% 👎
package/PartSegCore/analysis/init.py 97.34% ⭐ 89.50% ⭐ -7.84% 👎
package/PartSegCore/analysis/algorithm_description.py 92.55% ⭐ 75.61% ⭐ -16.94% 👎
package/PartSegCore/analysis/analysis_utils.py 85.27% ⭐ 85.27% ⭐ 0.00%
package/PartSegCore/analysis/calculate_pipeline.py 74.21% 🙂 74.25% 🙂 0.04% 👍
package/PartSegCore/analysis/calculation_plan.py 80.57% ⭐ 80.10% ⭐ -0.47% 👎
package/PartSegCore/analysis/load_functions.py 68.55% 🙂 63.63% 🙂 -4.92% 👎
package/PartSegCore/analysis/measurement_base.py 81.88% ⭐ 78.72% ⭐ -3.16% 👎
package/PartSegCore/analysis/measurement_calculation.py 73.73% 🙂 73.50% 🙂 -0.23% 👎
package/PartSegCore/analysis/save_functions.py 56.25% 🙂 56.25% 🙂 0.00%
package/PartSegCore/analysis/batch_processing/batch_backend.py 65.12% 🙂 64.89% 🙂 -0.23% 👎
package/PartSegCore/mask/algorithm_description.py 97.83% ⭐ 80.75% ⭐ -17.08% 👎
package/PartSegCore/mask/io_functions.py 55.48% 🙂 54.73% 🙂 -0.75% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.51% ⭐ 82.30% ⭐ -3.21% 👎
package/PartSegCore/segmentation/border_smoothing.py 81.81% ⭐ 82.37% ⭐ 0.56% 👍
package/PartSegCore/segmentation/mu_mid_point.py 94.80% ⭐ 93.55% ⭐ -1.25% 👎
package/PartSegCore/segmentation/noise_filtering.py 94.01% ⭐ 92.04% ⭐ -1.97% 👎
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 67.83% 🙂 68.74% 🙂 0.91% 👍
package/PartSegCore/segmentation/segmentation_algorithm.py 68.27% 🙂 69.98% 🙂 1.71% 👍
package/PartSegCore/segmentation/threshold.py 88.70% ⭐ 86.21% ⭐ -2.49% 👎
package/PartSegCore/segmentation/watershed.py 74.93% 🙂 73.88% 🙂 -1.05% 👎
package/PartSegCore/sphinx/auto_parameters.py 65.19% 🙂 64.64% 🙂 -0.55% 👎
package/PartSegImage/init.py 76.81% ⭐ 76.34% ⭐ -0.47% 👎
package/PartSegImage/image.py 72.31% 🙂 71.86% 🙂 -0.45% 👎
package/tests/conftest.py 78.98% ⭐ 79.87% ⭐ 0.89% 👍
package/tests/test_PartSeg/test_common_backend.py 77.23% ⭐ 77.21% ⭐ -0.02% 👎
package/tests/test_PartSeg/test_common_gui.py 75.23% ⭐ 76.27% ⭐ 1.04% 👍
package/tests/test_PartSeg/test_napari_widgets.py 67.30% 🙂 66.91% 🙂 -0.39% 👎
package/tests/test_PartSeg/test_settings.py 78.00% ⭐ 78.00% ⭐ 0.00%
package/tests/test_PartSeg/roi_analysis/test_advanced_window.py 73.20% 🙂 73.20% 🙂 0.00%
package/tests/test_PartSegCore/test_analysis_batch.py 58.15% 🙂 58.00% 🙂 -0.15% 👎
package/tests/test_PartSegCore/test_io.py 69.70% 🙂 70.11% 🙂 0.41% 👍
package/tests/test_PartSegCore/test_json_hooks.py 79.98% ⭐ 81.68% ⭐ 1.70% 👍
package/tests/test_PartSegCore/test_mask_create.py 66.77% 🙂 66.76% 🙂 -0.01% 👎
package/tests/test_PartSegCore/test_measurements.py 70.82% 🙂 70.84% 🙂 0.02% 👍
package/tests/test_PartSegCore/test_pipeline.py 70.09% 🙂 70.09% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation.py 72.94% 🙂 72.97% 🙂 0.03% 👍
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.14% ⭐ 81.39% ⭐ 0.25% 👍
package/tests/test_PartSegCore/test_utils.py 94.59% ⭐ 84.21% ⭐ -10.38% 👎
package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py 79.55% ⭐ 80.98% ⭐ 1.43% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSegCore/analysis/batch_processing/batch_backend.py FileData.add_data_part 26 😞 257 ⛔ 21 ⛔ 20.32% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/class_generator.py _make_class 16 🙂 382 ⛔ 27 ⛔ 21.44% ⛔ Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 351 ⛔ 16 ⛔ 23.59% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py load_stack_segmentation 19 😞 355 ⛔ 16 ⛔ 25.61% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 17 🙂 362 ⛔ 17 ⛔ 26.00% 😞 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!

@Czaki Czaki changed the title feat: Better serialization mechanism with improved migration feat: Better serialization mechanism, allow to declare data structure migration locally Mar 28, 2022
@Czaki Czaki changed the title feat: Better serialization mechanism, allow to declare data structure migration locally feat: Better serialization mechanism allow for declaration data structure migration locally Mar 28, 2022
@Czaki Czaki merged commit b08e0bd into develop Mar 28, 2022
@Czaki Czaki deleted the feature/better_serialization branch March 28, 2022 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Refacor of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant