diff --git a/.github/workflows/ci_publish.yml b/.github/workflows/ci_publish.yml index e93a2687..988246ac 100644 --- a/.github/workflows/ci_publish.yml +++ b/.github/workflows/ci_publish.yml @@ -37,6 +37,12 @@ jobs: - name: Install dependencies run: python -m pip install --upgrade tox + - name: Using execution-output cache + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: _build/execute + key: JB-output + - name: Execute notebooks while building HTMLs run: tox -e py312-buildhtml diff --git a/tox.ini b/tox.ini index 94c2b64f..ec08db7a 100644 --- a/tox.ini +++ b/tox.ini @@ -88,6 +88,7 @@ commands = !buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request && -z "$(grep force_run:all_tests ${GITHUB_EVENT_PATH})" ]]; then grep -f changed_tutorials all_tutorials; else cat all_tutorials; fi | grep -vf ignore_testing | xargs jupytext --to notebook ' !buildhtml: bash -c "echo 'Notebooks ignored (not tested/executed) in this job:'; cat ignore_testing | sort | uniq" + !buildhtml: bash -c "echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@'; echo 'Notesbooks executed in this job:'; grep -v ignore_testing all_tutorials | sort" !buildhtml: pytest --nbval-lax -vv --suppress-no-test-exit-code --durations=10 tutorials @@ -101,6 +102,7 @@ commands = buildhtml: bash -c 'if [ -s ignore_execute ]; then for name in $(cat ignore_execute | sort| uniq); do if [ -z "$(head -n 20 ${name}| grep execute:)" ]; then sed -i -e "s|kernelspec:|execute:\n skip: true\nkernelspec:|g" ${name}; fi; done;fi' buildhtml: bash -c "echo 'Notebooks ignored (not tested/executed) in this job:'; cat ignore_execute | sort | uniq" + buildhtml: bash -c "echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@'; echo 'Notesbooks executed in this job:'; grep -v ignore_execute all_tutorials | sort" # Build the MyST plugin bundle before building the site with jupyter-book buildhtml: bash -c "cd plugins && npm install && npm run build" diff --git a/tutorials/spherex/spherex_cutouts.md b/tutorials/spherex/spherex_cutouts.md index 795a3cf6..ce50448b 100644 --- a/tutorials/spherex/spherex_cutouts.md +++ b/tutorials/spherex/spherex_cutouts.md @@ -160,7 +160,7 @@ def process_cutout(row, ra, dec, cache): Ra and Dec coordinates (same as used for the TAP query) with attached astropy units cache : bool If set to `True`, the output of cached and the cutout processing will run faster next time. - Turn this feature off by setting `cache = False`. + Turn this feature off by setting ``cache=False``. ''' with fits.open(row["uri"], cache=cache) as hdulist: @@ -206,7 +206,7 @@ def process_cutout_with_error_handling(row, ra, dec, cache): Ra and Dec coordinates (same as used for the TAP query) with attached astropy units cache : bool If set to `True`, the output of cached and the cutout processing will run faster next time. - Turn this feature off by setting `cache = False`. + Turn this feature off by setting ``cache=False``. ''' try: process_cutout(row, ra, dec, cache=cache)