Skip to content

Commit

Permalink
Merge branch 'main' into add-version-switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 committed Jan 4, 2024
2 parents 514582f + 8e8d1e3 commit 2d4eb10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
# The full version, including alpha/beta/rc tags.
release = cmweather.__version__

if '+' in version:
version += 'dev'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
Expand Down Expand Up @@ -143,7 +146,13 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
html_theme_options = {
'switcher': {
'json_url': 'https://raw.githubusercontent.com/mgrover1/cmweather/add-version-switcher/docs/source/_static/pst-versions.json',
'version_match': 'dev' if 'dev' in version else f'v{version}',
}
}
print('dev' if 'dev' in version else f'v{version}')

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
description='A library of useful colormaps when visualizing weather and climate data, with numerous color vision deficiency friendly options',
install_requires=requirements,
setup_requires='setuptools_scm',
setup_requires=['setuptools', 'wheel', 'setuptools_scm'],
license='MIT license',
long_description=long_description,
include_package_data=True,
Expand Down

0 comments on commit 2d4eb10

Please sign in to comment.