Add sphinx-copybutton, fix readthedocs setup

This commit is contained in:
Joshua Bronson 2021-11-04 21:30:54 +00:00
parent f155e8b303
commit 214cd996fc
7 changed files with 29 additions and 18 deletions

View File

@ -1,3 +1,4 @@
---
# https://docs.readthedocs.io/en/latest/config-file/
version: 2
@ -5,12 +6,13 @@ formats:
- htmlzip
build:
image: latest
os: "ubuntu-20.04"
tools:
python: "3.10"
sphinx:
configuration: docs/conf.py
python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- docs
- requirements: requirements/docs.txt

View File

@ -41,6 +41,7 @@ suppress_warnings = ['image.nonlocal_uri']
# extensions coming with Sphinx (named 'sphinx.ext.*') or custom ones.
extensions = [
'alabaster',
'sphinx_copybutton',
'sphinx.ext.autodoc',
'sphinx.ext.autosectionlabel',
'sphinx.ext.coverage',
@ -325,6 +326,9 @@ autodoc_typehints = 'description'
doctest_global_setup = """
"""
# https://sphinx-copybutton.readthedocs.io/en/latest/#strip-and-configure-input-prompts-for-code-cells
copybutton_prompt_text = '>>> '
def setup(app):
"""https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html#adding-custom-css-or-javascript-to-a-sphinx-project"""

View File

@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.9
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile dev.in
@ -138,6 +138,10 @@ sortedcontainers==2.4.0
# hypothesis
# sortedcollections
sphinx==4.2.0
# via
# -r docs.in
# sphinx-copybutton
sphinx-copybutton==0.4.0
# via -r docs.in
sphinxcontrib-applehelp==1.0.2
# via sphinx
@ -165,10 +169,6 @@ tomli==1.2.2
# pep517
tox==3.24.4
# via -r dev.in
typing-extensions==3.10.0.2
# via
# astroid
# pylint
urllib3==1.26.7
# via requests
virtualenv==20.10.0

View File

@ -1 +1,2 @@
sphinx
sphinx-copybutton

View File

@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.9
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile docs.in
@ -35,6 +35,10 @@ requests==2.26.0
snowballstemmer==2.1.0
# via sphinx
sphinx==4.2.0
# via
# -r docs.in
# sphinx-copybutton
sphinx-copybutton==0.4.0
# via -r docs.in
sphinxcontrib-applehelp==1.0.2
# via sphinx

View File

@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.9
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile lint.in
@ -61,10 +61,6 @@ toml==0.10.2
# pre-commit
# pylint
# pytest
typing-extensions==3.10.0.2
# via
# astroid
# pylint
virtualenv==20.10.0
# via pre-commit
wrapt==1.13.3

View File

@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.9
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile tests.in
@ -80,6 +80,10 @@ sortedcontainers==2.4.0
# hypothesis
# sortedcollections
sphinx==4.2.0
# via
# -r docs.in
# sphinx-copybutton
sphinx-copybutton==0.4.0
# via -r docs.in
sphinxcontrib-applehelp==1.0.2
# via sphinx