Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Update conf.py #756

Merged
merged 1 commit into from
Dec 12, 2024
Merged
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
28 changes: 21 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,33 @@

# General information about the project.
project = 'ANTsPy'
copyright = '2017, ANTs Contributors'
copyright = '2017-2024, ANTs Contributors'
author = 'ANTs Contributors'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
# TODO: change to [:2] at v1.0
version = 'master (0.1.3)'
# The full version, including alpha/beta/rc tags.
# TODO: verify this works as expected
release = 'master'
# Default values for local builds
version = 'local'
release = 'local'

# Determine if we are on Read the Docs
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if on_rtd:
rtd_version = os.environ.get('READTHEDOCS_VERSION', 'local')
rtd_version_type = os.environ.get('READTHEDOCS_VERSION_TYPE', 'branch')

if rtd_version_type == 'tag':
version = rtd_version.lstrip('v')
release = f'release {version}'
elif rtd_version_type == 'branch' and rtd_version == 'latest':
version = 'dev'
release = f'dev ({rtd_version})'
else:
version = rtd_version
release = rtd_version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down