probabilistic-numerics / probnum

Probabilistic Numerics in Python.
http://probnum.org
MIT License
437 stars 57 forks source link

Notebook linting #625

Open pnkraemer opened 2 years ago

pnkraemer commented 2 years ago

Is your feature request related to a problem? Please describe. ProbNum's source is linted rather extensively, but the notebooks are not at all. This leads to some discrepancies in code quality, which are not great, especially since it affects the tutorials.

Describe the solution you'd like. As discussed offline, we could apply black, isort, and pylint to the notebooks via nbqa https://github.com/nbQA-dev/nbQA as part of the CI. This would detect some basic issues with the code quality in jupyter notebooks before merging them into main.

Additional context

marvinpfoertner commented 2 years ago

black supports notebook formatting out-of-the-box now: https://github.com/psf/black/releases/tag/21.8b0. We simply need to add black[jupyter] in format-requirements.txt and everything should work without needing to modify anything else :)