|
4 | 4 | # list see the documentation: |
5 | 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
6 | 6 |
|
7 | | -# -- Path setup -------------------------------------------------------------- |
8 | | - |
9 | | -# If extensions (or modules to document with autodoc) are in another directory, |
10 | | -# add these directories to sys.path here. If the directory is relative to the |
11 | | -# documentation root, use os.path.abspath to make it absolute, like shown here. |
12 | 7 | import os |
| 8 | +import re |
13 | 9 | import subprocess |
14 | 10 | import sys |
15 | 11 |
|
16 | 12 | from natsort import natsorted |
17 | 13 |
|
| 14 | +# -- Path setup -------------------------------------------------------------- |
| 15 | + |
| 16 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 17 | +# add these directories to sys.path here. If the directory is relative to the |
| 18 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 19 | + |
18 | 20 | sys.path.insert(0, os.path.abspath("../../")) |
19 | 21 |
|
20 | 22 | repodir = os.path.abspath(os.path.join(__file__, r"../../..")) |
|
97 | 99 | # at a commit (not a Git repo). |
98 | 100 | if os.path.exists(gitdir): |
99 | 101 | tag_refs = subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split() |
| 102 | + tag_refs = [tag for tag in tag_refs if re.match(r"^v[0-9]+.[0-9]+.[0-9]+$", tag)] |
100 | 103 | tag_refs = natsorted(tag_refs)[-6:] |
101 | 104 | smv_tag_whitelist = r"^(" + r"|".join(tag_refs) + r")$" |
102 | 105 | else: |
103 | 106 | # SMV is reading conf.py from a Git archive of the repo at a specific commit. |
104 | 107 | smv_tag_whitelist = r"^v.*$" |
105 | 108 |
|
106 | 109 | # Only include main branch for now |
107 | | -smv_branch_whitelist = "^main$" |
| 110 | +smv_branch_whitelist = "^(main|stable)$" |
108 | 111 |
|
109 | 112 | smv_refs_override_suffix = r"-docs" |
110 | 113 |
|
|
113 | 116 | "cudf": ("https://docs.rapids.ai/api/cudf/stable/", None), |
114 | 117 | "distributed": ("https://distributed.dask.org/en/latest/", None), |
115 | 118 | "torch": ("https://pytorch.org/docs/stable/", None), |
116 | | - "merlin-core": ("https://nvidia-merlin.github.io/core/main/", None), |
| 119 | + "merlin-core": ("https://nvidia-merlin.github.io/core/stable/", None), |
117 | 120 | } |
118 | 121 |
|
119 | 122 | html_sidebars = {"**": ["versions.html"]} |
120 | | -html_baseurl = "https://nvidia-merlin.github.io/dataloader/main" |
| 123 | +html_baseurl = "https://nvidia-merlin.github.io/dataloader/stable/" |
121 | 124 |
|
122 | 125 | # Add any paths that contain custom static files (such as style sheets) here, |
123 | 126 | # relative to this directory. They are copied after the builtin static files, |
|
0 commit comments