8000 Fix roi_info saving in project and save by Czaki · Pull Request #241 · 4DNucleome/PartSeg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix roi_info saving in project and save #241

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 17 commits into from
Apr 16, 2021
Merged

Conversation

Czaki
Copy link
Collaborator
@Czaki Czaki commented Apr 14, 2021

This PR adds saving whole ROInfo in history, removes duplicated roi information from ProjectInfo (it is stored inside roi_info parameter.

@codecov
Copy link
codecov bot commented Apr 14, 2021

Codecov Report

Merging #241 (bcc9998) into develop (8200e6e) will increase coverage by 0.24%.
The diff coverage is 88.16%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #241      +/-   ##
===========================================
+ Coverage    67.69%   67.94%   +0.24%     
===========================================
  Files          139      139              
  Lines        16739    16750      +11     
===========================================
+ Hits         11332    11380      +48     
+ Misses        5407     5370      -37     
Impacted Files Coverage Δ
package/PartSeg/_roi_mask/batch_proceed.py 45.45% <0.00%> (ø)
package/PartSeg/plugins/itk_snap_save/__init__.py 0.00% <0.00%> (ø)
...artSeg/plugins/modeling_save/save_modeling_data.py 0.00% <0.00%> (ø)
package/PartSeg/plugins/old_partseg/old_partseg.py 0.00% <0.00%> (ø)
package/PartSeg/_roi_analysis/main_window.py 55.51% <40.00%> (+0.41%) ⬆️
...ackage/PartSegCore/napari_plugins/save_mask_roi.py 56.25% <50.00%> (+2.91%) ⬆️
package/PartSegCore/mask_create.py 95.45% <80.00%> (+0.49%) ⬆️
package/PartSeg/_roi_mask/stack_settings.py 81.41% <82.92%> (-3.85%) ⬇️
package/PartSeg/_roi_analysis/partseg_settings.py 92.04% <88.00%> (-0.82%) ⬇️
package/PartSegCore/mask/io_functions.py 84.98% <91.30%> (-0.58%) ⬇️
... and 22 more

Continue to review full report at Codecov.

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

@lgtm-com
Copy link
lgtm-com bot commented Apr 14, 2021

This pull request fixes 1 alert when merging 153cdf3 into 8200e6e - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
lgtm-com bot commented Apr 14, 2021

This pull request fixes 1 alert when merging 54f0f4a into 8200e6e - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
lgtm-com bot commented Apr 14, 2021

This pull request fixes 1 alert when merging a3c0f7b into 8200e6e - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
lgtm-com bot commented Apr 15, 2021

This pull request fixes 1 alert when merging 9c7ee45 into 8200e6e - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
lgtm-com bot commented Apr 15, 2021

This pull request fixes 1 alert when merging ba6c67d into 8200e6e - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
lgtm-com bot commented Apr 15, 2021

This pull request introduces 1 alert and fixes 1 when merging 993dcc9 into 8200e6e - view on LGTM.com

new alerts:

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

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
lgtm-com bot commented Apr 15, 2021

This pull request introduces 1 alert and fixes 1 when merging a2e53c8 into 8200e6e - view on LGTM.com

new alerts:

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

fixed alerts:

  • 1 for Unused local variable

@sourcery-ai
Copy link
Contributor
sourcery-ai bot commented Apr 15, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.26 ⭐ 4.11 ⭐ -0.15 👍
Method Length 53.32 ⭐ 54.23 ⭐ 0.91 👎
Working memory 10.23 😞 10.31 😞 0.08 👎
Quality 65.64% 🙂 65.57% 🙂 -0.07% 👎
Other metrics Before After Change
Lines 8960 9222 262
Changed files Quality Before Quality After Quality Change
package/PartSeg/_roi_analysis/main_window.py 57.49% 🙂 57.45% 🙂 -0.04% 👎
package/PartSeg/_roi_analysis/partseg_settings.py 72.24% 🙂 72.46% 🙂 0.22% 👍
package/PartSeg/_roi_mask/batch_proceed.py 47.40% 😞 47.40% 😞 0.00%
package/PartSeg/_roi_mask/main_window.py 60.49% 🙂 60.49% 🙂 0.00%
package/PartSeg/_roi_mask/stack_settings.py 53.72% 🙂 58.43% 🙂 4.71% 👍
package/PartSeg/common_backend/base_settings.py 85.10% ⭐ 85.10% ⭐ 0.00%
package/PartSeg/plugins/itk_snap_save/init.py 95.25% ⭐ 95.25% ⭐ 0.00%
package/PartSeg/plugins/modeling_save/save_modeling_data.py 55.67% 🙂 55.50% 🙂 -0.17% 👎
package/PartSeg/plugins/old_partseg/old_partseg.py 42.31% 😞 42.23% 😞 -0.08% 👎
package/PartSegCore/io_utils.py 81.72% ⭐ 82.28% ⭐ 0.56% 👍
package/PartSegCore/json_hooks.py 62.56% 🙂 61.96% 🙂 -0.60% 👎
package/PartSegCore/mask_create.py 54.68% 🙂 54.10% 🙂 -0.58% 👎
package/PartSegCore/project_info.py 98.95% ⭐ 82.53% ⭐ -16.42% 👎
package/PartSegCore/roi_info.py 76.73% ⭐ 74.89% 🙂 -1.84% 👎
package/PartSegCore/analysis/calculate_pipeline.py 74.23% 🙂 74.18% 🙂 -0.05% 👎
package/PartSegCore/analysis/io_utils.py 91.55% ⭐ 92.72% ⭐ 1.17% 👍
package/PartSegCore/analysis/load_functions.py 66.59% 🙂 64.54% 🙂 -2.05% 👎
package/PartSegCore/analysis/save_functions.py 51.85% 🙂 50.65% 🙂 -1.20% 👎
package/PartSegCore/analysis/batch_processing/batch_backend.py 62.29% 🙂 62.30% 🙂 0.01% 👍
package/PartSegCore/mask/history_utils.py 80.57% ⭐ 80.57% ⭐ 0.00%
package/PartSegCore/mask/io_functions.py 51.85% 🙂 50.36% 🙂 -1.49% 👎
package/PartSegCore/napari_plugins/load_mask_project.py 84.69% ⭐ 84.69% ⭐ 0.00%
package/PartSegCore/napari_plugins/loader.py 57.58% 🙂 57.31% 🙂 -0.27% 👎
package/PartSegCore/napari_plugins/save_mask_roi.py 67.08% 🙂 66.77% 🙂 -0.31% 👎
package/PartSegCore/segmentation/algorithm_base.py 85.84% ⭐ 86.02% ⭐ 0.18% 👍
package/PartSegCore/segmentation/restartable_segmentation_algorithms.py 65.33% 🙂 65.33% 🙂 0.00%
package/PartSegCore/segmentation/segmentation_algorithm.py 75.41% ⭐ 75.41% ⭐ 0.00%
package/tests/conftest.py 71.63% 🙂 71.52% 🙂 -0.11% 👎
package/tests/test_PartSeg/test_settings.py 75.80% ⭐ 74.59% 🙂 -1.21% 👎
package/tests/test_PartSeg/test_viewer.py 65.37% 🙂 65.35% 🙂 -0.02% 👎
package/tests/test_PartSegCore/test_io.py 65.19% 🙂 64.47% 🙂 -0.72% 👎
package/tests/test_PartSegCore/test_json_hooks.py 70.52% 🙂 72.09% 🙂 1.57% 👍
package/tests/test_PartSegCore/test_pipeline.py 64.95% 🙂 64.83% 🙂 -0.12% 👎
package/tests/test_PartSegCore/test_segmentation.py 68.43% 🙂 68.43% 🙂 0.00%
package/tests/test_PartSegCore/segmentation/test_algorithm_base.py 66.44% 🙂 66.44% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
package/PartSeg/_roi_mask/batch_proceed.py BatchProceed.run_calculation 25 😞 311 ⛔ 19 ⛔ 20.08% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/batch_processing/batch_backend.py CalculationProcess.do_calculation.FileData.add_data_part 26 😞 248 ⛔ 22 ⛔ 20.27% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/mask/io_functions.py save_stack_segmentation 20 😞 437 ⛔ 19 ⛔ 21.13% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pack AE91 age/PartSegCore/segmentation/restartable_segmentation_algorithms.py ThresholdBaseAlgorithm.calculation_run 22 😞 402 ⛔ 16 ⛔ 22.76% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
package/PartSegCore/analysis/load_functions.py load_project 18 🙂 368 ⛔ 19 ⛔ 23.49% ⛔ 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@lgtm-com
Copy link
lgtm-com bot commented Apr 15, 2021

This pull request fixes 1 alert when merging bcc9998 into 8200e6e - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@Czaki Czaki changed the title Fix roi_info setting when use set_project_info in analysis Fix roi_info saving in project and save Apr 16, 2021
@Czaki Czaki merged commit 96c3b66 into develop Apr 16, 2021
@Czaki Czaki deleted the bugix/additional_info_save branch April 16, 2021 07:15
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