Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.

v0.2.0 (Sourcery refactored) #218

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

v0.2.0 (Sourcery refactored) #218

wants to merge 1 commit into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jun 4, 2022

Pull Request #142 refactored by Sourcery.

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

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

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

git fetch origin sourcery/dev
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from ggirelli June 4, 2022 15:23
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jun 4, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.08 ⭐ 2.04 ⭐ -0.04 👍
Method Length 37.92 ⭐ 37.76 ⭐ -0.16 👍
Working memory 5.66 ⭐ 5.78 ⭐ 0.12 👎
Quality 84.43% 84.17% -0.26% 👎
Other metrics Before After Change
Lines 697 687 -10
Changed files Quality Before Quality After Quality Change
fastx_barber/flag.py 84.29% ⭐ 84.21% ⭐ -0.08% 👎
fastx_barber/seqio.py 84.35% ⭐ 84.17% ⭐ -0.18% 👎
fastx_barber/trim.py 85.08% ⭐ 84.04% ⭐ -1.04% 👎

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

File Function Complexity Length Working Memory Quality Recommendation

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!

@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 4 times, most recently from 15e876c to 88f0f7b Compare June 27, 2022 18:35
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 5 times, most recently from 8d7e516 to 7c78018 Compare July 14, 2022 10:28
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 2 times, most recently from f2f36da to 3c6d80e Compare August 1, 2022 10:07
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 6 times, most recently from 97b2068 to 1b07830 Compare August 22, 2022 08:47
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 5 times, most recently from 09c3563 to 72df7ac Compare September 5, 2022 21:07
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 4 times, most recently from c900386 to 3d13819 Compare September 17, 2022 08:33
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 3 times, most recently from 95d4239 to 41e7f05 Compare September 20, 2022 08:40
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 2 times, most recently from 8388f35 to 49249bf Compare October 21, 2022 18:19
@sourcery-ai sourcery-ai bot force-pushed the sourcery/dev branch 2 times, most recently from da3dc6f to 3cddecf Compare November 14, 2022 10:30
flag_data.update([flag])
flag_data |= [flag]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function FastaFlagExtractor.extract_all refactored with the following changes:

flag_data.update([flag])
flag_data |= [flag]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function FastqFlagExtractor.__add_qual_flags refactored with the following changes:

if FastxFormats.FASTQ == fmt:
return FastqFlagExtractor
return ABCFlagExtractor
return FastqFlagExtractor if FastxFormats.FASTQ == fmt else ABCFlagExtractor
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_fastx_flag_extractor refactored with the following changes:

Comment on lines -361 to +359
flag_data.update([(name, (value, -1, -1))])
flag_data |= [(name, (value, -1, -1))]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function FastxFlagReader.read refactored with the following changes:

if FastxFormats.FASTQ == fmt:
return SimpleFastqWriter
return SimpleFastxWriter
return SimpleFastqWriter if FastxFormats.FASTQ == fmt else SimpleFastxWriter
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_fastx_writer refactored with the following changes:

while bases_qscores:
if bases_qscores[0] >= qscore_thr:
break
while bases_qscores and bases_qscores[0] < qscore_thr:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function FastqTrimmer.__trim_qual_5 refactored with the following changes:

Comment on lines -123 to +121
while bases_qscores:
if bases_qscores[-1] >= qscore_thr:
break
while bases_qscores and bases_qscores[-1] < qscore_thr:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function FastqTrimmer.__trim_qual_3 refactored with the following changes:

Comment on lines -162 to +158
if FastxFormats.FASTQ == fmt:
return FastqTrimmer
return ABCTrimmer
return FastqTrimmer if FastxFormats.FASTQ == fmt else ABCTrimmer
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_fastx_trimmer refactored with the following changes:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants