ggirelli / radiantkit

A Python3 Radial Image Analysis Toolkit
https://ggirelli.github.io/radiantkit/
MIT License
3 stars 4 forks source link

Sourcery refactored from-argparse-to-click branch #212

Closed sourcery-ai[bot] closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Branch from-argparse-to-click refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the from-argparse-to-click branch, then run:

git fetch origin sourcery/from-argparse-to-click
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.91 ⭐ 2.79 ⭐ -0.12 👍
Method Length 44.14 ⭐ 44.00 ⭐ -0.14 👍
Working memory 7.82 🙂 7.82 🙂 0.00
Quality 76.70% 76.82% 0.12% 👍
Other metrics Before After Change
Lines 4564 4510 -54
Changed files Quality Before Quality After Quality Change
radiantkit/argtools.py 91.62% ⭐ 91.62% ⭐ 0.00%
radiantkit/channel.py 85.31% ⭐ 85.56% ⭐ 0.25% 👍
radiantkit/conversion.py 83.57% ⭐ 83.46% ⭐ -0.11% 👎
radiantkit/deconvolution.py 70.13% 🙂 72.46% 🙂 2.33% 👍
radiantkit/distance.py 83.94% ⭐ 83.94% ⭐ 0.00%
radiantkit/image.py 79.00% ⭐ 79.13% ⭐ 0.13% 👍
radiantkit/io.py 76.78% ⭐ 76.78% ⭐ 0.00%
radiantkit/output.py 89.16% ⭐ 89.40% ⭐ 0.24% 👍
radiantkit/particle.py 81.48% ⭐ 81.78% ⭐ 0.30% 👍
radiantkit/path.py 78.74% ⭐ 78.89% ⭐ 0.15% 👍
radiantkit/plot.py 53.33% 🙂 53.33% 🙂 0.00%
radiantkit/report.py 77.30% ⭐ 77.56% ⭐ 0.26% 👍
radiantkit/segmentation.py 83.43% ⭐ 83.43% ⭐ 0.00%
radiantkit/selection.py 91.84% ⭐ 91.84% ⭐ 0.00%
radiantkit/series.py 69.96% 🙂 69.93% 🙂 -0.03% 👎
radiantkit/stat.py 73.05% 🙂 73.29% 🙂 0.24% 👍
radiantkit/string.py 79.71% ⭐ 81.15% ⭐ 1.44% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
radiantkit/plot.py ProfileMultiCondition.__make_panel 9 🙂 210 ⛔ 25 ⛔ 34.41% 😞 Try splitting into smaller methods. Extract out complex expressions
radiantkit/series.py SeriesList.get_particle_single_px_stats 9 🙂 242 ⛔ 16 ⛔ 37.91% 😞 Try splitting into smaller methods. Extract out complex expressions
radiantkit/plot.py ProfileMultiConditionNorm.__make_panel 9 🙂 160 😞 21 ⛔ 40.25% 😞 Try splitting into smaller methods. Extract out complex expressions
radiantkit/plot.py ProfileSingleCondition.__make_scatter_trace 1 ⭐ 240 ⛔ 21 ⛔ 41.95% 😞 Try splitting into smaller methods. Extract out complex expressions
radiantkit/plot.py ProfileMultiCondition.__make_scatter_trace 1 ⭐ 250 ⛔ 20 ⛔ 42.00% 😞 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!