Skip to content

Commit

Permalink
do not run nbsphinx if _data exsists, stage removal of _data files be…
Browse files Browse the repository at this point in the history
…tween runs
  • Loading branch information
Zeitsperre committed Sep 15, 2023
1 parent adafdbe commit 72e2c5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ build:
pre_build:
- sphinx-apidoc -o docs/apidoc --private --module-first xscen
- env SKIP_NOTEBOOKS=1 sphinx-build -b linkcheck docs/ _build/linkcheck
# post_build:
# - rm -rf docs/notebooks/_data

conda:
environment: environment-dev.yml
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
if skip_notebooks:
warnings.warn("SKIP_NOTEBOOKS is set. Not executing notebooks.")
nbsphinx_execute = "never"
elif os.getenv("READTHEDOCS_VERSION_NAME") in ["latest", "stable"] or os.getenv(
"READTHEDOCS_VERSION_TYPE"
) in ["tag"]:
if os.getenv("READTHEDOCS_OUTPUT") in ["pdf"]:
warnings.warn("Generating PDF version. Not executing notebooks.")
elif (os.getenv("READTHEDOCS_VERSION_NAME") in ["latest", "stable"]) or (
os.getenv("READTHEDOCS_VERSION_TYPE") in ["tag"]
):
if Path(__file__).parent.joinpath("notebooks/_data").exists():
warnings.warn("Notebook artefacts found. Not executing notebooks.")
nbsphinx_execute = "never"

# if skip_notebooks or os.getenv("READTHEDOCS_VERSION_TYPE") in [
Expand Down

0 comments on commit 72e2c5b

Please sign in to comment.