diff --git a/ci/requirements/rtd.yml b/ci/requirements/rtd.yml index ac21d1f..40726cb 100644 --- a/ci/requirements/rtd.yml +++ b/ci/requirements/rtd.yml @@ -7,4 +7,5 @@ dependencies: - numpy - scipy - sphinx + - sphinx-copybutton - sphinx_rtd_theme diff --git a/docs/tephi/source/conf.py b/docs/tephi/source/conf.py index 68efaa7..a6a3893 100644 --- a/docs/tephi/source/conf.py +++ b/docs/tephi/source/conf.py @@ -44,6 +44,7 @@ 'matplotlib.sphinxext.plot_directive', 'custom_class_autodoc', 'generate_package_rst', + 'sphinx_copybutton', ] # List of packages to document @@ -269,3 +270,6 @@ 'numpy': ('http://docs.scipy.org/doc/numpy/', None), 'matplotlib': ('http://matplotlib.sourceforge.net/', None), } + +# Define Python input prompt to copybutton. +copybutton_prompt_text = ">>> " diff --git a/requirements-dev.txt b/requirements-dev.txt index 0196ffb..2be40b5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,4 +9,5 @@ pytest pytest-cov pytest-xdist sphinx +sphinx-copybutton sphinx_rtd_theme