Skip to content
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

ci: clean notebooks #12

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/update-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ jobs:
--verbose \
.

- name: nb-clean
run: |
output=$(find . -name '*.ipynb' -exec nb-clean check {} \;)

# fail if there are any issues
if [ -n "$output" ]; then
echo "$output"
exit 1
fi

update_pages:
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A Jupyter notebook that creates a dashboard for viewing LizardByte repository da

1. Notebooks should be committed with the output cleared.
```bash
jupyter nbconvert --to notebook --ClearOutputPreprocessor.enabled=True --inplace ./notebook/dashboard.ipynb
find . -name '*.ipynb' -exec nb-clean clean {} \;
```

2. You can create a preview of the notebook in html by running the following commands:
Expand All @@ -22,3 +22,11 @@ A Jupyter notebook that creates a dashboard for viewing LizardByte repository da
--output=index \
./notebook/dashboard.ipynb
```

### Reviewing PRs
Notebook diffs are difficult to read. To make reviewing easier, you can enable the
[Rich Jupyter Notebook Diff](https://github.blog/changelog/2023-03-01-feature-preview-rich-jupyter-notebook-diffs/)
feature in your GitHub account settings.

Local options are also available. See [this](https://www.reviewnb.com/git-jupyter-notebook-ultimate-guide)
for more information.
Loading