diff --git a/doc/source/conf.py b/doc/source/conf.py index 2a6ec8947c8d7..ad83e11171599 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -50,23 +50,25 @@ # sphinxext. extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.doctest", - "sphinx.ext.extlinks", - "sphinx.ext.todo", - "numpydoc", # handle NumPy documentation formatted docstrings + "contributors", # custom pandas extension "IPython.sphinxext.ipython_directive", "IPython.sphinxext.ipython_console_highlighting", "matplotlib.sphinxext.plot_directive", - "sphinx.ext.intersphinx", + "numpydoc", + "sphinx_copybutton", + "sphinx_panels", + "sphinx_toggleprompt", + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", "sphinx.ext.coverage", - "sphinx.ext.mathjax", + "sphinx.ext.doctest", + "sphinx.ext.extlinks", "sphinx.ext.ifconfig", + "sphinx.ext.intersphinx", "sphinx.ext.linkcode", + "sphinx.ext.mathjax", + "sphinx.ext.todo", "nbsphinx", - "sphinx_panels", - "contributors", # custom pandas extension ] exclude_patterns = [ @@ -144,6 +146,9 @@ # already loads it panels_add_bootstrap_css = False +# https://sphinx-toggleprompt.readthedocs.io/en/stable/#offset +toggleprompt_offset_right = 35 + # Add any paths that contain templates here, relative to this directory. templates_path = ["../_templates"] diff --git a/environment.yml b/environment.yml index eb4d53e116927..fd0822b13984e 100644 --- a/environment.yml +++ b/environment.yml @@ -103,6 +103,7 @@ dependencies: - pytest-cython # doctest - sphinx - sphinx-panels + - sphinx-copybutton - types-python-dateutil - types-PyMySQL - types-pytz @@ -128,3 +129,4 @@ dependencies: - jupyterlab >=3.4,<4 - pip: - jupyterlite==0.1.0b10 + - sphinx-toggleprompt diff --git a/requirements-dev.txt b/requirements-dev.txt index ff410c59b43dd..e1e98ef8ffe23 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -80,6 +80,7 @@ pydata-sphinx-theme==0.8.0 pytest-cython sphinx sphinx-panels +sphinx-copybutton types-python-dateutil types-PyMySQL types-pytz @@ -98,4 +99,5 @@ pyyaml requests jupyterlab >=3.4,<4 jupyterlite==0.1.0b10 +sphinx-toggleprompt setuptools>=51.0.0