networkx / nx-guides

Examples and Jupyter Notebooks about NetworkX
https://networkx.org/nx-guides/
Creative Commons Zero v1.0 Universal
192 stars 104 forks source link

CI: Test out nbqa for linting notebooks #63

Closed MridulS closed 2 years ago

MridulS commented 2 years ago

We can use https://github.com/nbQA-dev/nbQA to lint and format our notebooks, it can run many linters like black, isort, pyupgrade and also format the markdown cells in the notebook.

https://github.com/networkx/nx-guides/issues/45

MridulS commented 2 years ago

@rossbar can you have a look here? This PR adds a linting step to our CI with pre-commit and nbQA.

rossbar commented 2 years ago

One thought re: organization: would it be worth cleaning up the history a bit and squash everything down to two commits: one where the CI infrastructure is added, and another where the linting is applied to the existing notebooks?

Meh let's not let this be a blocker. In this goes, thanks for setting this up @MridulS !