pyaerocom icon indicating copy to clipboard operation
pyaerocom copied to clipboard

lint with ruff

Open avaldebe opened this issue 1 year ago • 1 comments

Change Summary

Use ruff to improve and maintain coding standards.

  • [ ] replace black and isort with ruff format
  • [ ] implement improvements suggested by ruff check
  • [ ] update pre-commit configuration
  • [ ] update the relevant CI job

At the moment ruff check --statistics reports ~583 improvements:

Related issue number

close #1119

Checklist

  • [X] Start with a draft-PR
  • [X] The PR title is a good summary of the changes
  • [X] PR is set to AeroTools and a tentative milestone
  • [X] Documentation reflects the changes where applicable
  • [ ] Tests for the changes exist where applicable
  • [ ] Tests pass locally
  • [ ] Tests pass on CI
  • [ ] At least 1 reviewer is selected
  • [ ] Make PR ready to review

avaldebe avatar Apr 19 '24 09:04 avaldebe

Codecov Report

Attention: Patch coverage is 76.10837% with 97 lines in your changes missing coverage. Please review.

Project coverage is 78.98%. Comparing base (654afb8) to head (73910e7). Report is 294 commits behind head on main-dev.

Files with missing lines Patch % Lines
pyaerocom/ungriddeddata.py 60.60% 13 Missing :warning:
pyaerocom/aeroval/coldatatojson_engine.py 25.00% 6 Missing :warning:
pyaerocom/stationdata.py 83.78% 6 Missing :warning:
pyaerocom/io/readgridded.py 70.58% 5 Missing :warning:
pyaerocom/io/readungridded.py 58.33% 5 Missing :warning:
pyaerocom/_lowlevel_helpers.py 71.42% 4 Missing :warning:
pyaerocom/aeroval/experiment_output.py 76.47% 4 Missing :warning:
pyaerocom/aux_var_helpers.py 50.00% 4 Missing :warning:
pyaerocom/griddeddata.py 78.94% 4 Missing :warning:
pyaerocom/io/read_airnow.py 20.00% 4 Missing :warning:
... and 28 more
Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1129      +/-   ##
============================================
+ Coverage     78.96%   78.98%   +0.01%     
============================================
  Files           136      136              
  Lines         20813    20792      -21     
============================================
- Hits          16436    16423      -13     
+ Misses         4377     4369       -8     
Flag Coverage Δ
unittests 78.98% <76.10%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

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

codecov[bot] avatar Apr 19 '24 10:04 codecov[bot]