Skip to content

Commit

Permalink
need to build the sphinx doc because the index.rst references the aut…
Browse files Browse the repository at this point in the history
…ogen files; add conda action to install environment.yml
  • Loading branch information
agoscinski committed Sep 12, 2024
1 parent 4bdba12 commit 2b2c43e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v2
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.12
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
miniconda-version: "24.5.0"
activate-environment: base
environment-file: environment.yml
python-version: "3.12"
auto-activate-base: true
- name: "Build HTML docs"
run: |
echo "SPHINX_LINKCHECK $SPHINX_LINKCHECK"
make -C docs html linkcheck
env:
SPHINXOPTS: -nW --keep-going
SPHINX_LINKCHECK: on
14 changes: 3 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
ipython_mplbackend = ""

copybutton_selector = "div:not(.no-copy)>div.highlight pre"
copybutton_prompt_text = ">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_text = ">>> |... |$ |In [d*]: | {2,5}...: | {5,8}: "
copybutton_prompt_is_regexp = True

todo_include_todos = True
Expand Down Expand Up @@ -412,18 +412,10 @@ def setup(app):
gallery_src_relative_dir = (
"gallery" # relative path of the gallery src wrt. sphinx src
)
# debug
print("SPHINX_LINKCHECK", os.getenv("SPHINX_LINKCHECK"))

# We don't want to build the gallery if sphinx linkcheck is only used
if os.getenv("SPHINX_LINKCHECK"):
sphinx_src_autogen_dirs = []
else:
sphinx_src_autogen_dirs = ["sections/writing_workflows_with_workgraph/autogen"]



# we mimik the structure in the sphinx src directory in the gallery src directory
sphinx_src_autogen_dirs = ["sections/writing_workflows_with_workgraph/autogen"]

gallery_src_dirs = [
os.path.join(gallery_src_relative_dir, autogen_dir)
for autogen_dir in sphinx_src_autogen_dirs
Expand Down

0 comments on commit 2b2c43e

Please sign in to comment.