Skip to content

Commit

Permalink
Bump to dev version + update versions in switcher.json (#574)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Holdgraf <choldgraf@berkeley.edu>
  • Loading branch information
jorisvandenbossche and choldgraf authored Feb 25, 2022
1 parent 4199b17 commit 0c77b6d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 38 deletions.
51 changes: 18 additions & 33 deletions docs/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,36 @@
[
{
"name": "v0.7.1 (stable)",
"version": "0.7.1"
"name": "dev",
"version": "latest",
"extra_classes": ["dev"]
},
{
"version": "0.7.0"
"name": "0.8.0 (stable)",
"version": "stable",
"extra_classes": ["stable"]
},
{
"version": "0.6.3"
"name": "0.8.0",
"version": "v0.8.0"
},
{
"version": "0.6.2"
"name": "0.7.2",
"version": "v0.7.2"
},
{
"version": "0.6.1"
"name": "0.6.3",
"version": "v0.6.3"
},
{
"version": "0.6.0"
"name": "0.5.2",
"version": "v0.5.2"
},
{
"version": "0.5.2"
"name": "0.4.3",
"version": "v0.4.3"
},
{
"version": "0.5.1"
},
{
"version": "0.5.0"
},
{
"version": "0.4.3"
},
{
"version": "0.4.2"
},
{
"version": "0.4.1"
},
{
"version": "0.4.0"
},
{
"version": "0.3.2"
},
{
"version": "0.3.1"
},
{
"version": "0.3.0"
"name": "0.3.2",
"version": "v0.3.2"
}
]
18 changes: 14 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

import pydata_sphinx_theme

release = pydata_sphinx_theme.__version__
version = release.replace("dev0", "")

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

Expand Down Expand Up @@ -80,6 +78,18 @@
html_theme = "pydata_sphinx_theme"
# html_logo = "_static/pandas.svg" # For testing

# Define the version we use for matching in the version switcher.
version_match = os.environ.get("READTHEDOCS_VERSION")
# If READTHEDOCS_VERSION doesn't exist, we're not on RTD
# If it is an integer, we're in a PR build and the version isn't correct.
if not version_match or version_match.isdigit():
# For local development, infer the version to match from the package.
release = pydata_sphinx_theme.__version__
if "dev" in release:
version_match = "latest"
else:
version_match = "v" + release

html_theme_options = {
"external_links": [
{
Expand Down Expand Up @@ -116,8 +126,8 @@
"switcher": {
# "json_url": "/_static/switcher.json",
"json_url": "https://pydata-sphinx-theme.readthedocs.io/en/latest/_static/switcher.json",
"url_template": "https://pydata-sphinx-theme.readthedocs.io/en/v{version}/",
"version_match": version,
"url_template": "https://pydata-sphinx-theme.readthedocs.io/en/{version}/",
"version_match": version_match,
},
}

Expand Down
2 changes: 1 addition & 1 deletion src/pydata_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from .bootstrap_html_translator import BootstrapHTML5Translator

__version__ = "0.8.0"
__version__ = "0.9.0.dev0"

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 0c77b6d

Please sign in to comment.