Skip to content

Commit

Permalink
add cleanup workflow (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcapelle authored Jul 26, 2024
1 parent e8f1e01 commit 9970270
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Clean Notebooks
on:
push:
paths:
- '**.ipynb'
workflow_dispatch:

jobs:
fix:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install -r requirements.txt
- name: Test clean up .ipynb files
shell: bash
run: |
nb_helpers.fix_nbs .
git status -s # display the status to see which nbs need cleaning up
if [[ `git status --porcelain -uno` ]]; then
git status -uno
echo -e "!!! Detected unstripped out notebooks\n!!!Remeber to run nb_helpers.fix_nbs"
false
fi

0 comments on commit 9970270

Please sign in to comment.