File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 2222 - name : Create tmp directories for master
2323 run : |
2424 mkdir python/master-tmp
25+ # Download master JSON files to master-tmp/ directory
26+ # This supports sphinx-versioned multi-version documentation builds:
27+ # - sphinx-versioned builds docs for multiple branches (master, release-*, current branch)
28+ # - Each branch version looks for JSON files in different locations (see conf.py)
29+ # - master-tmp/ provides a shared location for current master JSON files that doesn't
30+ # interfere with committed release snapshots in python/ directory
2531 - name : Get docstrings_common.json from master branch of opm-common
2632 run : |
2733 curl -L -o python/master-tmp/docstrings_common.json https://raw.githubusercontent.com/OPM/opm-common/master/python/docstrings_common.json
Original file line number Diff line number Diff line change @@ -24,13 +24,21 @@ def extract_opm_simulators_release(version_file_path):
2424 except Exception :
2525 return "unknown" # Fallback version
2626
27+ # Determine JSON file location based on branch type
28+ # This prefix is used to set opm_simulators_docstrings_path and opm_common_docstrings_path below,
29+ # which are passed through Sphinx's config system to the sphinx_ext_docstrings extension.
30+ # The extension reads these paths to load JSON files and generate documentation.
31+ #
32+ # Branch handling for sphinx-versioned multi-version builds:
33+ # - Release branches (release-*): Use committed JSON snapshots in python/
34+ # - All other branches: Use downloaded master JSON files in python/master-tmp/
35+ # This includes master itself and development branches, ensuring they all use
36+ # the latest master JSON files without interfering with release snapshots.
2737branch = get_git_branch ()
28- print (branch )
29- if branch == "master" :
30- prefix = "../../master-tmp"
31- else :
38+ if branch .startswith ("release-" ):
3239 prefix = "../../"
33- release = extract_opm_simulators_release (os .path .join (prefix , "dune.module" ))
40+ else :
41+ prefix = "../../master-tmp"
3442
3543# -- General configuration ---------------------------------------------------
3644import sys
You can’t perform that action at this time.
0 commit comments