diff --git a/docs/environment.yml b/docs/environment.yml deleted file mode 100644 index 2529353f0..000000000 --- a/docs/environment.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Conda environment configuration for readthedocs - -name: rtdenv -dependencies: - - python=3.9 - - sphinx - # https://stackoverflow.com/questions/67542699/readthedocs-sphinx-not-rendering-bullet-list-from-rst-fileA - - docutils==0.16 diff --git a/docs/source/conf.py b/docs/source/conf.py index ae4ea5253..b76f52c9f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,10 +15,9 @@ import sys import os -import shlex from datetime import datetime -on_rtd = os.environ.get('READTHEDOCS') == 'True' +import sphinx_rtd_theme # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -58,9 +57,10 @@ copyright = '2015, Continuum Analytics' author = 'Continuum Analytics' -if on_rtd: +if os.environ.get('READTHEDOCS'): # RTD replaces the last update date. So we need to hack it in here. - copyright += '. Last updated on {}'.format(datetime.utcnow().strftime('%b %d, %Y')) + copyright += '. Last updated on {}'.format( + datetime.utcnow().strftime('%b %d, %Y')) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -121,18 +121,9 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' - -# on_rtd is whether we are on readthedocs.org -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: - # only import and set the theme if we're building docs locally - # otherwise, readthedocs.org uses their theme by default, so no need to specify it - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme = 'sphinx_rtd_theme' +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # 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 diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index 0798c1333..000000000 --- a/readthedocs.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Configuration file for readthedocs -# See https://read-the-docs.readthedocs.org/en/latest/yaml-config.html - -conda: - file: docs/environment.yml diff --git a/setup.py b/setup.py index 75150ea4b..d327e5ce0 100644 --- a/setup.py +++ b/setup.py @@ -42,9 +42,6 @@ def _guard_py_ver(): _guard_py_ver() -if os.environ.get('READTHEDOCS', None) == 'True': - sys.exit("setup.py disabled on readthedocs: called with %s" - % (sys.argv,)) import versioneer