Skip to content

DOC: Website should copy code only #62108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
5 changes: 5 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"matplotlib.sphinxext.plot_directive",
"numpydoc",
"sphinx_copybutton",
"sphinx_toggleprompt",
"sphinx_design",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
Expand Down Expand Up @@ -461,6 +462,10 @@
# If false, no module index is generated.
# latex_use_modindex = True

# Configure copybutton to strip Python REPL prompts and output when copying code cells
copybutton_prompt_text = r">>> |\.\.\.:|In \[\d+\]:\n?|Out\[\d+\]:\n?"
copybutton_prompt_is_regexp = True


if include_api:
intersphinx_mapping = {
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ dependencies:
- sphinx
- sphinx-design
- sphinx-copybutton
- sphinx-toggleprompt
- types-python-dateutil
- types-PyMySQL
- types-pytz
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pytest-cython
sphinx
sphinx-design
sphinx-copybutton
sphinx-toggleprompt
types-python-dateutil
types-PyMySQL
types-pytz
Expand Down
Loading