-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: adopt nbfmt.py
formatting, enforced in CI
#3455
Conversation
This is expected to fail as written.
It was always a bit brittle, and is now conflicting with `nbfmt.py`. This test has been valuable maybe once, whereas `nbfmt.py` would have been valuable on nearly every docs change. `nbfmt.py` wins.
Generated with: ``` $ git ls-files -z '*.ipynb' | xargs -0 python3 ./nbfmt.py --ignore_warn Notebook: docs/get_started.ipynb Notebook: docs/graphs.ipynb Notebook: docs/hyperparameter_tuning_with_hparams.ipynb Notebook: docs/image_summaries.ipynb Notebook: docs/migrate.ipynb Removed the existing output cells. Notebook: docs/scalars_and_keras.ipynb Notebook: docs/tbdev_getting_started.ipynb Notebook: docs/tensorboard_in_notebooks.ipynb Notebook: docs/tensorboard_profiling_keras.ipynb Notebook: tensorboard/plugins/mesh/Mesh_Plugin_Tensorboard.ipynb Missing license: #@title Licensed under the Apache License Missing copyright: Copyright 20[1-9][0-9] The TensorFlow\s.*?\s?Authors ``` Test Plan: Running `git ls-files -z '*.ipynb' | xargs -0 ./nbfmt.py --test` passes.
This comment has been minimized.
This comment has been minimized.
pip install absl-py | ||
chmod +x ./nbfmt.py | ||
- name: 'Check Colab notebooks for formatting' | ||
run: git ls-files -z '*.ipynb' | xargs -0 ./nbfmt.py --test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like the preventative work here to avoid quoted fns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! I generally try to be funnynames-safe when it’s not too
inconvenient, and in most cases it’s easy enough.
Summary: Notebook formatting is a frequent source of friction in pull requests, due to spurious diffs and unintended changes. @lamberta’s `nbfmt.py` is an opinionated autoformatter that should resolve these issues entirely. Test Plan: A test run of the CI change fails before the reformat and passes after: - <https://github.com/tensorflow/tensorboard/runs/549352035> - <https://github.com/tensorflow/tensorboard/runs/549365513> Both the failure and passing cases have nice output. wchargin-branch: docs-nbfmt
Summary: Notebook formatting is a frequent source of friction in pull requests, due to spurious diffs and unintended changes. @lamberta’s `nbfmt.py` is an opinionated autoformatter that should resolve these issues entirely. Test Plan: A test run of the CI change fails before the reformat and passes after: - <https://github.com/tensorflow/tensorboard/runs/549352035> - <https://github.com/tensorflow/tensorboard/runs/549365513> Both the failure and passing cases have nice output. wchargin-branch: docs-nbfmt
Summary:
Notebook formatting is a frequent source of friction in pull requests,
due to spurious diffs and unintended changes. @lamberta’s
nbfmt.py
isan opinionated autoformatter that should resolve these issues entirely.
Test Plan:
A test run of the CI change fails before the reformat and passes after:
Both the failure and passing cases have nice output.
wchargin-branch: docs-nbfmt