Closed hodgestar closed 2 years ago
I think verifying the codestyle is a good idea. There are tools especially for Jupyter Notebook to do so. E.g.: https://github.com/nbQA-dev/nbQA
This gives us much more flexibility with different tools to run (including formatting the markdown). For automatic verification on GitHub Actions we can use a predefined Action. E.g.: https://github.com/marketplace/actions/flake8-jupyter-notebook
nbQA look great -- let's try it.
I will put in a vote against using a pre-build action. This should be a few lines (hopefully) in the CI config and obscuring those behind a pre-built action doesn't seem worth it.
The check with flake8
was added in https://github.com/qutip/qutip-tutorials/pull/22. Therefore I close this issue.
I had another idea -- we can add a CI check that converts the notebooks to Python scripts (using Jupytext) and then runs flake8 on those scripts.