From f4efa16d245b2c45eaccbc7356ba6318f640b3f3 Mon Sep 17 00:00:00 2001 From: Robert Luke <748691+rob-luke@users.noreply.github.com> Date: Thu, 23 Sep 2021 10:15:22 +1000 Subject: [PATCH] Use environmental variable to set multi version sphinx tag list (#390) --- .github/workflows/SphinxBuild_PR.yml | 3 ++- doc/conf.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/SphinxBuild_PR.yml b/.github/workflows/SphinxBuild_PR.yml index b41a369a3..fcee97e7e 100644 --- a/.github/workflows/SphinxBuild_PR.yml +++ b/.github/workflows/SphinxBuild_PR.yml @@ -1,4 +1,4 @@ -name: "docs" +name: "PR Docs" on: - pull_request @@ -20,6 +20,7 @@ jobs: PYTHONUNBUFFERED: '1' PYTHON_VERSION: '3.9' MNE_3D_BACKEND: 'pyvistaqt' + SMV_TAG_WHITELIST: 'ignore all tags' steps: - uses: actions/checkout@v2 with: diff --git a/doc/conf.py b/doc/conf.py index 6b0593aac..2cea56935 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -27,6 +27,9 @@ from mne.tests.test_docstring_parameters import error_ignores +smv_tag_whitelist = os.getenv('SMV_TAG_WHITELIST', r'^v\d+\.\d+.\d+$') + + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -57,7 +60,7 @@ # smv_tag_whitelist = r'^v\d+\.\d+.\d+$' # They say to set this to None, but then Sphinx complains about it not being # a string, so let's just use a regex that should lead to no tags -smv_tag_whitelist = 'ignore all tags' +# smv_tag_whitelist = 'ignore all tags' # Mark vX.Y.Z as releases smv_released_pattern = r'^.*v.*$'