Open pnkraemer opened 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 :)
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
, andpylint
to the notebooks vianbqa
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
jupyter
runs into some issues.black
andisort
could be done straightforwardly,pylint
will require a large number of--disable="..."
statements and/or nontrivial refactoring in the notebooks.