HERA-Team / hera_qm

HERA Data Quality Metrics
MIT License
2 stars 2 forks source link

Minimal ruff #457

Closed steven-murray closed 6 months ago

steven-murray commented 6 months ago

Here I used adopt-ruff (https://github.com/ScDor/adopt-ruff) to find all the linting fixes that:

  1. We're already obeying
  2. Can be automatically fixed by ruff
  3. We weren't already obeying and aren't auto-fixable but seemed easy enough to fix manually AND important to fix now (e.g. numpy deprecations for numpy v2)

I have not run ruff format (so no "black" style formatting) and I also ignored line-too-long errors. No functionality should be changed.

I am ignoring one file (test_xrfi_performance) which has A LOT of violations, including many "variable name not defined" which makes me think it's completely out of date and should be deleted.

There's one error that I didn't fix because I wasn't sure how to fix it (but it's definitely an error) -- an undefined variable name i.

jsdillon commented 6 months ago

Looks like we're failing all our tests, @steven-murray mostly related to np.random issues?

codecov[bot] commented 6 months ago

Codecov Report

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

Comparison is base (90eb2c0) 97.07% compared to head (d2e4daa) 97.10%.

Files Patch % Lines
hera_qm/metrics_io.py 90.62% 3 Missing :warning:
hera_qm/vis_metrics.py 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #457 +/- ## ========================================== + Coverage 97.07% 97.10% +0.03% ========================================== Files 11 11 Lines 3553 3527 -26 ========================================== - Hits 3449 3425 -24 + Misses 104 102 -2 ```

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