tacitvenom / genomics_algo

MIT License
1 stars 2 forks source link

Sourcery refactored main branch #1

Closed sourcery-ai[bot] closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Branch main 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 main branch, then run:

git fetch origin sourcery/main
git merge --ff-only FETCH_HEAD
git reset HEAD^
sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.93 ⭐ 2.22 ⭐ -0.71 👍
Method Length 40.88 ⭐ 40.59 ⭐ -0.29 👍
Working memory 6.93 🙂 6.92 🙂 -0.01 👍
Quality 79.90% 80.70% 0.80% 👍
Other metrics Before After Change
Lines 446 443 -3
Changed files Quality Before Quality After Quality Change
genomics_algo/algorithms.py 65.05% 🙂 67.23% 🙂 2.18% 👍
genomics_algo/helper.py 84.00% ⭐ 83.86% ⭐ -0.14% 👎
genomics_algo/tests/test_helper.py 84.97% ⭐ 84.97% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
genomics_algo/algorithms.py get_occurences_with_boyer_moore_exact_matching 13 🙂 114 🙂 13 😞 49.56% 😞 Extract out complex expressions
genomics_algo/tests/test_helper.py test_get_freq_for_qualities 0 ⭐ 66 🙂 23 ⛔ 60.18% 🙂 Extract out complex expressions
genomics_algo/algorithms.py get_occurences_with_naive_match 6 ⭐ 62 🙂 10 😞 68.65% 🙂 Extract out complex expressions
genomics_algo/tests/test_helper.py test_get_base_freq 0 ⭐ 46 ⭐ 11 😞 75.23% ⭐ 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!

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