Skip to content

Commit

Permalink
Merge branch 'main' into partial
Browse files Browse the repository at this point in the history
  • Loading branch information
nanne-aben authored Oct 30, 2023
2 parents df3ad4b + 9c20383 commit fc1d25f
Show file tree
Hide file tree
Showing 25 changed files with 865 additions and 658 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,4 +48,8 @@ jobs:
coverage report -m --fail-under 100
- name: Run notebooks
run: |
for FILE in docs/*/*.ipynb; do papermill $FILE output.json -k python3; done
for FILE in docs/*/*.ipynb; do
BASE=$(basename $FILE)
cp $FILE .
jupyter nbconvert --to notebook $BASE --execute
done
13 changes: 5 additions & 8 deletions docs/remove_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,16 @@ def remove_spark_warnings(cell):
continue
if "WARN Utils: Service 'SparkUI' could not bind on port" in output.text:
continue
if (
"FutureWarning: is_datetime64tz_dtype is deprecated and will be removed in a future version." # noqa: E501
in output.text
):
continue
outputs.append(output)

cell.outputs = outputs


def remove_papermill_metadata(nb):
"""Removes the papermill metadata from a notebook."""
if "papermill" in nb.metadata.keys():
nb.metadata.pop("papermill")


if __name__ == "__main__":
FILENAME = sys.argv[1]
nb = nbformat.read(FILENAME, as_version=4)
Expand All @@ -46,6 +45,4 @@ def remove_papermill_metadata(nb):
clear_metadata(nb_cell)
remove_spark_warnings(nb_cell)

remove_papermill_metadata(nb)

nbformat.write(nb, FILENAME)
13 changes: 10 additions & 3 deletions docs/run_notebooks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
for FILE in docs/*/*.ipynb; do
papermill $FILE $FILE;
python docs/remove_metadata.py $FILE;
for FILE in docs/*/*.ipynb; do
echo "Running $FILE"
DIR=$(dirname $FILE)
BASE=$(basename $FILE)
mv $FILE .

jupyter nbconvert --to notebook $BASE --execute --inplace
python docs/remove_metadata.py $BASE;

mv $BASE $DIR
done
243 changes: 0 additions & 243 deletions docs/source/autocomplete_on_table_names.ipynb

This file was deleted.

Loading

0 comments on commit fc1d25f

Please sign in to comment.