Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions docs/legate/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
from os import getenv
from typing import Any

import legate

SWITCHER_PROD = "https://docs.nvidia.com/legate/switcher.json"
SWITCHER_DEV = "http://localhost:8000/legate/switcher.json"
JSON_URL = SWITCHER_DEV if getenv("SWITCHER_DEV") == "1" else SWITCHER_PROD

ANNOTATE = getenv("LEGATE_ANNOTATION_DOCS") == "1"

# This is the "YY.MM" version string that we want users to see
BASE_VERSION = ".".join(legate.__version__.split(".", 2)[:2])
# This final documentation snapshot always displays the final release line.
BASE_VERSION = "26.06"

# make sure BASE VERSION is formatted as expected
_yy, _mm = BASE_VERSION.split(".")
Expand All @@ -38,14 +36,7 @@
copyright = f"2021-{datetime.now().year}, NVIDIA" # noqa: A001
author = "NVIDIA Corporation"

if "dev" in legate.__version__ or "rc" in legate.__version__:
# for dev/rc versions just use the entire version with everything, and
# add it to the page title as well, for easy recognition
version = release = legate.__version__
project += f" ({legate.__version__})"
else:
# otherwise, we actually only want the YY.MM to be visible for releases
version = release = BASE_VERSION
version = release = BASE_VERSION

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -84,6 +75,11 @@

html_theme = "nvidia_sphinx_theme"
html_theme_options = {
"announcement": (
"This project has reached end of life and is no longer maintained or "
"supported. The final release is 26.06.01. This "
"documentation is retained for historical reference."
),
"switcher": {
"json_url": JSON_URL,
"navbar_start": ["navbar-logo", "version-switcher"],
Expand Down
5 changes: 0 additions & 5 deletions docs/legate/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,5 @@
"preferred": true,
"url": "https://docs.nvidia.com/legate/26.06/",
"version": "26.06"
},
{
"name": "dev",
"url": "https://nv-legate.github.io/legate/",
"version": "dev"
}
]