Skip to content

Commit

Permalink
Added papermill test as a seperate option to nbmkae
Browse files Browse the repository at this point in the history
  • Loading branch information
hevansDev committed Sep 19, 2024
1 parent 1e1ae89 commit 1d07357
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
chmod +x ./tests/test-changed-notebooks.sh
./tests/test-changed-notebooks.sh
chmod +x ./tests/launch-test-environment.sh
./tests/launch-test-environment.sh
shell: bash

- name: Test all changed files
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.ipynb_checkpoints
.ipynb_checkpoints/*
.DS_Store
output.ipynb
File renamed without changes.
22 changes: 22 additions & 0 deletions tests/test-notebooks-papermill.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
bash launch-test-environment.sh

skiplList=("notebooks/03-query/11-joins.ipynb"
"notebooks/03-query/08-functions-strings.ipynb"
"notebooks/03-query/07-functions-datetime.ipynb"
"notebooks/03-query/19-groupby-earliest.ipynb"
"notebooks/02-ingestion/13-native-transforms.ipynb"
"notebooks/02-ingestion/02-batch-ingestion.ipynb"
"notebooks/02-ingestion/12-spatial-dimensions.ipynb"
"notebooks/99-contributing/notebook-template.ipynb")

ALL_CHANGED_FILES=$(find notebooks -type f -name '*.ipynb' | awk '!/\/\./')
for file in ${ALL_CHANGED_FILES}; do
echo "$file"
if [[ ! " ${skiplList[*]} " =~ [[:space:]]${file}[[:space:]] ]]; then
docker exec jupyter papermill ../$file output.ipynb --log-level ERROR
else
echo "Skipped"
fi
done

docker compose --profile all-services down -v

0 comments on commit 1d07357

Please sign in to comment.