Closed chinmayshah99 closed 3 years ago
👍 @chinmayshah99 +1 for the (Google) style guide tool to help with linting things up. Maybe you could consider adding this to CI tests for the notebooks. From https://github.com/OpenMined/PyDP/pull/307#pullrequestreview-508552678:
About linting:
The easiest way to scale reviews is to let the machine do it. Every project has recurring issues that pop up in reviews, and style questions are often best settled with a style guide...
(from this blog post by @lamberta)
... Then use the
nblint
linter with the--styles=google
flag:
python3 -m tensorflow_docs.tools.nblint --styles=google your_notebook.ipynb
This doesn't highlight everything, but it's good. Check out this README for more options.
Is this still available?
Yeah, it is still available. There is some WIP PR: https://github.com/OpenMined/PyDP/pull/322. You can take it forward from there.
I made another branch and added tests for all notebooks. The previous PR can be closed.
Description
Right now the only test for jupyter notebooks is making sure that the notebook actually runs and no code standards test for it.
We need to add two tests for it:
[ ] Style tests
[ ] Mypy tests for functions