diff --git a/.circleci/config.yml b/.circleci/config.yml index cfd26245..bdf639e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,21 +7,38 @@ jobs: - image: cimg/python:3.12 steps: + - attach_workspace: + at: ~/ + - checkout - run: name: Install CI dependencies command: python -m pip install --upgrade tox + - restore_cache: + keys: + - jupyter_ch + - run: name: Build HTML rendering of notebooks no_output_timeout: 30m command: | python -m tox -e py312-buildhtml + - save_cache: + key: jupyter_ch + paths: + - _build/.jupyter_cache + - store_artifacts: path: _build/html + - persist_to_workspace: + root: _build + paths: + - html + workflows: version: 2 default: diff --git a/conf.py b/conf.py index 5e1957ac..4d320464 100644 --- a/conf.py +++ b/conf.py @@ -15,7 +15,7 @@ # -- Project information ----------------------------------------------------- project = 'Caltech/IPAC--IRSA Demo Notebooks' -copyright = '2022-2024, IRSA developers' +copyright = '2022-2025, IRSA developers' author = 'IRSA developers' @@ -44,6 +44,7 @@ # MyST-NB configuration nb_execution_timeout = 1200 nb_merge_streams = True +nb_execution_mode = "cache" nb_execution_excludepatterns = [] diff --git a/tox.ini b/tox.ini index 8454cccf..cf9795c0 100644 --- a/tox.ini +++ b/tox.ini @@ -56,7 +56,7 @@ commands = !buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request && -z "$(grep force_run:all_tests ${GITHUB_EVENT_PATH})" ]]; then git fetch origin main --depth=1; git diff origin/main --name-only tutorials | grep .md; else find tutorials -name "*.md"; fi | grep -vf ignore_testing | xargs jupytext --to notebook ' !buildhtml: pytest --nbval-lax -vv --suppress-no-test-exit-code --durations=10 tutorials - buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=auto -nWT --keep-going + buildhtml: sphinx-build -b html . _build/html -nWT --keep-going # SED magic to remove the toctree captions from the rendered index page while keeping them in the sidebar TOC buildhtml: sed -E -i.bak '/caption-text/{N; s/.+caption-text.+\n