Skip to content
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

DOC: Use sphinx-copybutton extension in the documentation #168

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/conf.py
Expand Up @@ -62,6 +62,7 @@
'sphinxarg.ext',
'sphinx.ext.inheritance_diagram',
'sphinxcontrib.apidoc',
'sphinx_copybutton',
'matplotlib.sphinxext.plot_directive',
'nbsphinx',
'sphinx_gallery.load_style',
Expand Down Expand Up @@ -365,3 +366,17 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"http://docs.python.org/3": None}


# -- sphinx-copybutton extension configuration -------------------------------

copybutton_prompt_text = r">>> |\.\.\. |\$ | |\(py37cmp-gui\)\$ "
copybutton_prompt_is_regexp = True
# copybutton_only_copy_prompt_lines = False
copybutton_remove_prompts = True
# copybutton_copy_empty_lines = False
# copybutton_line_continuation_character = "\\"
# copybutton_here_doc_delimiter = "EOT"

# See https://sphinx-copybutton.readthedocs.io/en/latest/use.html#keep-empty-lines
# for more details
1 change: 1 addition & 0 deletions docs/requirements.txt
Expand Up @@ -8,6 +8,7 @@ sphinx-gallery==0.10.1
recommonmark==0.7.1
readthedocs-sphinx-ext==2.1.4
sphinx-autodoc-typehints==1.12.0
sphinx-copybutton==0.5.0
traits==6.3.2
traitsui==7.2.0
grabbit
Expand Down