KoslickiLab / YACHT

A mathematically characterized hypothesis test for organism presence/absence in a metagenome
MIT License
28 stars 7 forks source link

Yac 85 linter #97

Closed mfl15 closed 7 months ago

codecov[bot] commented 7 months ago

Codecov Report

Attention: 103 lines in your changes are missing coverage. Please review.

Comparison is base (53e0244) 72.74% compared to head (48601e8) 77.42%.

:exclamation: Current head 48601e8 differs from pull request most recent head de18d77. Consider uploading reports for the commit de18d77 to get more accurate results

Files Patch % Lines
yacht/utils.py 57.64% 36 Missing :warning:
yacht/standardize_yacht_output.py 64.44% 32 Missing :warning:
yacht/run_YACHT.py 83.33% 9 Missing :warning:
yacht/download_pretrained_ref_db.py 71.42% 6 Missing :warning:
yacht/sketch_ref_genomes.py 25.00% 6 Missing :warning:
yacht/sketch_sample.py 33.33% 6 Missing :warning:
yacht/make_training_data_from_sketches.py 82.14% 5 Missing :warning:
yacht/download_default_ref_db.py 80.00% 2 Missing :warning:
yacht/__init__.py 94.44% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #97 +/- ## ========================================== + Coverage 72.74% 77.42% +4.68% ========================================== Files 11 23 +12 Lines 1053 1608 +555 ========================================== + Hits 766 1245 +479 - Misses 287 363 +76 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mfl15 commented 7 months ago

@mlupei do you mind providing me context on what this PR does? It looks like there was a lot of (manual? automatic?) reformatting that appears to not help readability in some places (though does help it on others), but it's inconsistently applied.

it is mostly automatic and some manual linter fixes, the purpose was to make the code more readable.

mfl15 commented 7 months ago

@mlupei do you mind providing me context on what this PR does? It looks like there was a lot of (manual? automatic?) reformatting that appears to not help readability in some places (though does help it on others), but it's inconsistently applied.

it is mostly automatic and some manual linter fixes, the purpose was to make the code more readable.

I agree that sometimes these changes are not really useful, but looks like overall it improves readability a bit.

dkoslicki commented 7 months ago

Are there settings you can change in the linter? The consistent use of quotes is nice, and some of the formatting, but I ask since it is doing some strange things, eg. turning the simple

show_all = args.show_all  # Show all organisms (no matter if present) in output file.

into the very odd line

show_all = (
        args.show_all
    )  # Show all organisms (no matter if present) in output file.

Why the tuple surrounding the args.show_all?

mfl15 commented 7 months ago

Are there settings you can change in the linter? The consistent use of quotes is nice, and some of the formatting, but I ask since it is doing some strange things, eg. turning the simple

show_all = args.show_all  # Show all organisms (no matter if present) in output file.

into the very odd line

show_all = (
        args.show_all
    )  # Show all organisms (no matter if present) in output file.

Why the tuple surrounding the args.show_all?

yes, sure, there is an ability to configure it, there is .pylintrc file.

Regarding to show_all case, yes, looks like it tried to divide the string and added the tuple, it should be reverted

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud