Skip to content

Commit

Permalink
ci: clean notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Aug 21, 2024
1 parent 94a43b9 commit f1b8af9
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 2,572 deletions.
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

0 comments on commit f1b8af9

Please sign in to comment.