diff --git a/docs/conf.py b/docs/conf.py index d11a7be8..595d6312 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,6 +21,7 @@ # ones. extensions = [ "sphinx.ext.todo", + "sphinx_copybutton" ] # Add any paths that contain templates here, relative to this directory. diff --git a/poetry.lock b/poetry.lock index c137f071..3621fb2b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. [[package]] name = "accessible-pygments" @@ -582,6 +582,25 @@ code-style = ["pre-commit"] doc = ["ablog (>=0.11.13)", "folium", "ipywidgets", "matplotlib", "myst-nb", "nbclient", "numpy", "numpydoc", "pandas", "plotly", "sphinx-copybutton", "sphinx-design", "sphinx-examples", "sphinx-tabs", "sphinx-thebe", "sphinx-togglebutton", "sphinxcontrib-bibtex", "sphinxcontrib-youtube", "sphinxext-opengraph"] test = ["beautifulsoup4", "coverage", "defusedxml", "myst-nb", "pytest", "pytest-cov", "pytest-regressions", "sphinx_thebe"] +[[package]] +name = "sphinx-copybutton" +version = "0.5.2" +description = "Add a copy button to each of your code cells." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "sphinx-copybutton-0.5.2.tar.gz", hash = "sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd"}, + {file = "sphinx_copybutton-0.5.2-py3-none-any.whl", hash = "sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e"}, +] + +[package.dependencies] +sphinx = ">=1.8" + +[package.extras] +code-style = ["pre-commit (==2.12.1)"] +rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] + [[package]] name = "sphinxcontrib-applehelp" version = "2.0.0" @@ -951,4 +970,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.11" -content-hash = "5ced45204441ffe15fc8f1b31f70e8829d057fc60010ee4444a528eafaabec62" +content-hash = "72efa62d7b7da40eb67fcf7a4d0711aceab25e02222e04ea454babe53ae8b861" diff --git a/pyproject.toml b/pyproject.toml index 32b5ec18..014ff568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,3 +10,4 @@ python = "^3.11" sphinx = "^8.2.3" sphinx-autobuild = "^2024.10.3" sphinx-book-theme = "^1.2.0" +sphinx-copybutton = "^0.5.2"