diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 66bc7cd917b31..7a90e1bec7783 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -79,6 +79,10 @@ jobs: run: ci/code_checks.sh docstrings if: ${{ steps.build.outcome == 'success' && always() }} + - name: Run check of documentation notebooks + run: ci/code_checks.sh notebooks + if: ${{ steps.build.outcome == 'success' && always() }} + - name: Use existing environment for type checking run: | echo $PATH >> $GITHUB_PATH diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c6067faf92d37..3c1362b1ac83e 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -12,9 +12,10 @@ # $ ./ci/code_checks.sh doctests # run doctests # $ ./ci/code_checks.sh docstrings # validate docstring errors # $ ./ci/code_checks.sh single-docs # check single-page docs build warning-free +# $ ./ci/code_checks.sh notebooks # check execution of documentation notebooks -[[ -z "$1" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "single-docs" ]] || \ - { echo "Unknown command $1. Usage: $0 [code|doctests|docstrings]"; exit 9999; } +[[ -z "$1" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "single-docs" || "$1" == "notebooks" ]] || \ + { echo "Unknown command $1. Usage: $0 [code|doctests|docstrings|single-docs|notebooks]"; exit 9999; } BASE_DIR="$(dirname $0)/.." RET=0 @@ -84,6 +85,15 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then fi +### DOCUMENTATION NOTEBOOKS ### +if [[ -z "$CHECK" || "$CHECK" == "notebooks" ]]; then + + MSG='Notebooks' ; echo $MSG + jupyter nbconvert --execute $(find doc/source -name '*.ipynb') --to notebook + RET=$(($RET + $?)) ; echo $MSG "DONE" + +fi + ### SINGLE-PAGE DOCS ### if [[ -z "$CHECK" || "$CHECK" == "single-docs" ]]; then python doc/make.py --warnings-are-errors --single pandas.Series.value_counts