ggirelli / pygpseq

Python3 package to analyse GPSeq images and manage TIFF files.
MIT License
2 stars 1 forks source link

v3.4.0 #24

Closed ggirelli closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 13.59 🙂 12.77 🙂 -0.82 👍
Method Length 151.93 😞 140.24 😞 -11.69 👍
Working memory 13.92 😞 14.05 😞 0.13 👎
Quality 43.02% 😞 44.08% 😞 1.06% 👍
Other metrics Before After Change
Lines 10218 8230 -1988
Changed files Quality Before Quality After Quality Change
pygpseq/init.py 94.68% ⭐ 93.52% ⭐ -1.16% 👎
pygpseq/const.py 65.45% 🙂 65.29% 🙂 -0.16% 👎
pygpseq/anim/init.py 97.67% ⭐ 97.67% ⭐ 0.00%
pygpseq/anim/analysis.py 45.75% 😞 45.80% 😞 0.05% 👍
pygpseq/anim/condition.py 36.49% 😞 39.48% 😞 2.99% 👍
pygpseq/anim/main.py 32.63% 😞 35.38% 😞 2.75% 👍
pygpseq/anim/nucleus.py 43.95% 😞 42.97% 😞 -0.98% 👎
pygpseq/anim/series.py 45.76% 😞 46.16% 😞 0.40% 👍
pygpseq/fish/init.py 99.33% ⭐ 99.33% ⭐ 0.00%
pygpseq/fish/dot.py 38.56% 😞 38.91% 😞 0.35% 👍
pygpseq/fish/image.py 6.97% ⛔ 7.33% ⛔ 0.36% 👍
pygpseq/fish/nucleus.py 23.10% ⛔ 23.10% ⛔ 0.00%
pygpseq/tools/init.py 87.52% ⭐ 87.52% ⭐ 0.00%
pygpseq/tools/binarize.py 59.93% 🙂 61.09% 🙂 1.16% 👍
pygpseq/tools/chromab.py 51.45% 🙂 51.45% 🙂 0.00%
pygpseq/tools/distance.py 72.79% 🙂 72.10% 🙂 -0.69% 👎
pygpseq/tools/image.py 68.59% 🙂 69.66% 🙂 1.07% 👍
pygpseq/tools/io.py 67.17% 🙂 66.18% 🙂 -0.99% 👎
pygpseq/tools/path.py 74.86% 🙂 77.74% ⭐ 2.88% 👍
pygpseq/tools/plot.py 31.21% 😞 32.28% 😞 1.07% 👍
pygpseq/tools/stat.py 56.30% 🙂 56.56% 🙂 0.26% 👍
pygpseq/tools/string.py 90.81% ⭐ 90.81% ⭐ 0.00%
pygpseq/tools/vector.py 78.45% ⭐ 79.04% ⭐ 0.59% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
pygpseq/fish/image.py analyze_field_of_view 36 ⛔ 745 ⛔ 35 ⛔ 7.33% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pygpseq/anim/series.py Series.find_nuclei 36 ⛔ 677 ⛔ 19 ⛔ 11.76% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pygpseq/anim/main.py Main.run 45 ⛔ 814 ⛔ 14 😞 14.01% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pygpseq/tools/plot.py dots_in_ellipsoid 26 😞 687 ⛔ 22 ⛔ 14.70% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
pygpseq/fish/nucleus.py annotate_compartments 20 😞 1263 ⛔ 32 ⛔ 16.07% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!