diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6f83b67..9385d8c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,15 +1,18 @@ version: 2 +build: + os: "ubuntu-22.04" + tools: + python: "3.11" + sphinx: builder: html configuration: docs/conf.py fail_on_warning: true python: - version: 3.7 install: - method: pip path: . extra_requirements: - readthedocs - system_packages: true diff --git a/docs/conf.py b/docs/conf.py index 39529e6..f69b327 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,8 +3,10 @@ import sprockets_statsd project = 'sprockets-statsd' version = sprockets_statsd.version copyright = '2021 AWeber Communications, Inc.' -html_theme = 'pyramid' +html_theme = 'python_docs_theme' extensions = [] +html_static_path = ['.'] +html_css_files = ['custom.css'] # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html extensions.append('sphinx.ext.autodoc') @@ -19,9 +21,9 @@ intersphinx_mapping = { # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html extensions.append('sphinx.ext.extlinks') extlinks = { - 'issue': ("https://github.com/sprockets/sprockets-statsd/issues/%s", "#"), + 'issue': ("https://github.com/sprockets/sprockets-statsd/issues/%s", "#%s"), 'tag': ("https://github.com/sprockets/sprockets-statsd/compare/%s", "%s"), } # https://pypi.org/project/sphinx-autodoc-typehints/ -extensions.append('sphinx_autodoc_typehints') +# extensions.append('sphinx_autodoc_typehints') diff --git a/docs/custom.css b/docs/custom.css new file mode 100644 index 0000000..931b56e --- /dev/null +++ b/docs/custom.css @@ -0,0 +1 @@ +div.sphinxsidebarwrapper { overflow-x: scroll } diff --git a/setup.cfg b/setup.cfg index 4748a99..a635fab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,14 +40,14 @@ dev = coverage==7.2.7 flake8==3.9.2 flake8-import-order==0.18.1 - sphinx==4.1.1 - sphinx-autodoc-typehints==1.12.0 + python-docs-theme==2023.5 + sphinx>=7,<8 sprockets.http==2.2.0 tornado>=5 yapf==0.31.0 readthedocs = - sphinx==4.1.1 - sphinx-autodoc-typehints==1.12.0 + python-docs-theme==2023.5 + sphinx>=7,<8 tornado>=5 [options.packages.find] diff --git a/tox.ini b/tox.ini index 1dfcac4..7c20c9a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,distcheck,py38,py39,py311,tornado5 +envlist = lint,distcheck,py38,py39,py311,tornado5,docs toxworkdir = ./build/tox [testenv] @@ -31,3 +31,9 @@ base_python = py39 deps = tornado>=5,<6 .[dev] + +[testenv:docs] +deps = + .[readthedocs] +commands = + python -m sphinx -b html -aE docs build/sphinx