FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix devdocs version switcher by dstansby · Pull Request #27886 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 9 additions & 1 deletion doc/conf.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@

# are we running circle CI?
CIRCLECI = 'CIRCLECI' in os.environ
# are we deploying this build to matplotlib.org/devdocs?
# This is a copy of the logic in .circleci/deploy-docs.sh
DEVDOCS = (
CIRCLECI and
(os.environ.get("CIRCLE_PROJECT_USERNAME") == "matplotlib") and
(os.environ.get("CIRCLE_BRANCH") == "main") and
(not os.environ.get("CIRCLE_PULL_REQUEST", "").startswith(
"https://github.com/matplotlib/matplotlib/pull")))


def _parse_skip_subdirs_file():
Expand Down Expand Up @@ -489,7 +497,7 @@ def js_tag_with_cache_busting(js):
"https://output.circle-artifacts.com/output/job/"
f"{os.environ['CIRCLE_WORKFLOW_JOB_ID']}/artifacts/"
f"{os.environ['CIRCLE_NODE_INDEX']}"
"/doc/build/html/_static/switcher.json" if CIRCLECI else
"/doc/build/html/_static/switcher.json" if CIRCLECI and not DEVDOCS else
f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}"
),
"version_match": (
Expand Down

Back | FazBrowse Home | New Git URL