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

test: Add tests files to calcualate coverage #655

Merged
merged 9 commits into from
Jun 21, 2022
Merged

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Jun 20, 2022

@Czaki Czaki added this to the v0.14.3 milestone Jun 20, 2022
@deprecated-napari-hub-preview-bot
Copy link

deprecated-napari-hub-preview-bot bot commented Jun 20, 2022

Preview page for your plugin is ready here:
https://preview.napari-hub.org/4DNucleome/PartSeg/655
Updated: 2022-06-21T10:10:50.437537

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #655 (ab977fc) into develop (d6e1a91) will increase coverage by 5.81%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #655      +/-   ##
===========================================
+ Coverage    82.91%   88.73%   +5.81%     
===========================================
  Files          143      190      +47     
  Lines        19129    29274   +10145     
===========================================
+ Hits         15861    25976   +10115     
- Misses        3268     3298      +30     
Impacted Files Coverage Δ
package/tests/test_PartSeg/test_check_release.py 100.00% <ø> (ø)
package/tests/test_PartSeg/test_common_backend.py 100.00% <ø> (ø)
package/tests/test_PartSeg/test_window_import.py 100.00% <ø> (ø)
package/tests/test_PartSegCore/test_io.py 100.00% <ø> (ø)
...ackage/tests/test_PartSegCore/test_measurements.py 100.00% <ø> (ø)
...sts/test_PartSegCore/test_segmentation_proceses.py 100.00% <ø> (ø)
package/tests/test_PartSegCore/test_utils.py 100.00% <ø> (ø)
package/tests/test_PartSeg/conftest.py 95.37% <100.00%> (ø)
...s/test_PartSegCore/test_algorithm_describe_base.py 100.00% <100.00%> (ø)
...kage/tests/test_PartSegCore/test_analysis_batch.py 100.00% <100.00%> (ø)
... and 50 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 d6e1a91...ab977fc. Read the comment docs.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 20, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.61 ⭐ 0.61 ⭐ 0.00
Method Length 84.87 🙂 85.49 🙂 0.62 👎
Working memory 7.37 🙂 7.37 🙂 0.00
Quality 72.05% 🙂 72.02% 🙂 -0.03% 👎
Other metrics Before After Change
Lines 5839 5792 -47
Changed files Quality Before Quality After Quality Change
package/tests/test_PartSeg/conftest.py 89.06% ⭐ 89.59% ⭐ 0.53% 👍
package/tests/test_PartSeg/test_check_release.py 82.20% ⭐ 82.65% ⭐ 0.45% 👍
package/tests/test_PartSeg/test_common_backend.py 77.28% ⭐ 77.18% ⭐ -0.10% 👎
package/tests/test_PartSeg/test_window_import.py 98.62% ⭐ 98.62% ⭐ 0.00%
package/tests/test_PartSegCore/test_algorithm_describe_base.py 80.69% ⭐ 80.58% ⭐ -0.11% 👎
package/tests/test_PartSegCore/test_analysis_batch.py 58.00% 🙂 57.93% 🙂 -0.07% 👎
package/tests/test_PartSegCore/test_io.py 71.90% 🙂 71.90% 🙂 0.00%
package/tests/test_PartSegCore/test_measurements.py 70.35% 🙂 70.25% 🙂 -0.10% 👎
package/tests/test_PartSegCore/test_mso.py 59.73% 🙂 59.73% 🙂 0.00%
package/tests/test_PartSegCore/test_segmentation_proceses.py 81.39% ⭐ 81.39% ⭐ 0.00%
package/tests/test_PartSegCore/test_utils.py 84.16% ⭐ 84.16% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
package/tests/test_PartSegCore/test_analysis_batch.py TestCalculationProcess.create_calculation_plan3 0 ⭐ 430 ⛔ 18 ⛔ 39.86% 😞 Try splitting into smaller methods. Extract out complex expressions
package/tests/test_PartSegCore/test_io.py TestSaveHistory.perform_roi_info_history_test 2 ⭐ 322 ⛔ 17 ⛔ 40.57% 😞 Try splitting into smaller methods. Extract out complex expressions
package/tests/test_PartSegCore/test_measurements.py TestStatisticProfile.test_cube_density 1 ⭐ 308 ⛔ 17 ⛔ 41.97% 😞 Try splitting into smaller methods. Extract out complex expressions
package/tests/test_PartSegCore/test_measurements.py test_per_mask_component 0 ⭐ 368 ⛔ 15 😞 43.67% 😞 Try splitting into smaller methods. Extract out complex expressions
package/tests/test_PartSegCore/test_mso.py TestFDT.test_fdt_base 6 ⭐ 424 ⛔ 9 🙂 46.90% 😞 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@Czaki Czaki merged commit ee0c304 into develop Jun 21, 2022
@Czaki Czaki deleted the add_test_to_coverage branch June 21, 2022 23:21
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