devito icon indicating copy to clipboard operation
devito copied to clipboard

ci: Add Flake8 linting to notebooks

Open EdCaunt opened this issue 1 year ago • 7 comments

@ggorman pointed out that you can now Flake8 lint Jupyter Notebooks. We should probably do this.

EdCaunt avatar Nov 13 '24 15:11 EdCaunt

I personally wouldn't. Flake8 is really not adapted to notebooks, where readable and potentially longer lines are preferred.

mloubout avatar Nov 13 '24 15:11 mloubout

We could always set a custom rule to ignore "line too long"

EdCaunt avatar Nov 13 '24 15:11 EdCaunt

Looking at it, there are only about 5 "Line too long" warnings in the whole output, and most are only 5 or so characters over.

EdCaunt avatar Nov 13 '24 15:11 EdCaunt

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.26%. Comparing base (2f18ab8) to head (be6715a). Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2484      +/-   ##
==========================================
- Coverage   87.26%   87.26%   -0.01%     
==========================================
  Files         238      238              
  Lines       45278    45271       -7     
  Branches     4022     4022              
==========================================
- Hits        39512    39505       -7     
  Misses       5085     5085              
  Partials      681      681              

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

codecov[bot] avatar Nov 13 '24 15:11 codecov[bot]

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

This diff is way too big for just a few line change.

Yeah, I messed up adding the changes in one of the notebooks somehow. Will fix in due course

EdCaunt avatar Nov 18 '24 10:11 EdCaunt

Also those depa should be in requirements-testing.txt not hardcoded in the yaml

I was just going off how the Flake8 workflow already works, can change this

EdCaunt avatar Nov 18 '24 10:11 EdCaunt