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

Don't configure the "sphinx-copybutton" extension #1653

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

rahulporuri
Copy link
Contributor

This PR simply removes the sphinx-copybutton extension-specific configuration from the sphinx configuration file.

This is because the configuration was in some cases returning bad data. See for example the all_wildcard.py code block at https://traits.readthedocs.io/en/latest/traits_user_manual/advanced.html#trait-attribute-name-wildcard. Trying to copy that codeblock returns only the code within """ and not the actual class. The prompt text configuration seems complicated and difficult to get "right" to support the wide range of code samples we have in the documentation.

For now, having a copy button that copies the entire code sample is better than a smart copy button that only copies the "right" piece of code

Checklist

  • Tests
  • Update API reference (docs/source/traits_api_reference)
  • Update User manual (docs/source/traits_user_manual)
  • Update type annotation hints in traits-stubs

This PR simply removes the sphinx-copybutton extension-specific
configuration from the sphinx configuration file.

this is because the configuration was in some cases returning bad data.
the prompt text configuration seems complicated and difficult to get
right to support the wide range of code samples we have in the
documentation.

for now, having a copy button that copies the entire code sample is
better than a smart copy button that only copies the "right" piece of
code

	modified:   docs/source/conf.py
@mdickinson
Copy link
Member

LGTM. Thank you!

@mdickinson mdickinson merged commit 0b64767 into main Jun 29, 2022
@mdickinson mdickinson deleted the doc/dont-config-copybutton-text branch June 29, 2022 08:03
mdickinson pushed a commit that referenced this pull request Aug 9, 2022
FIX: Dont configure the sphinx copybutton extension in docs

This PR simply removes the sphinx-copybutton extension-specific
configuration from the sphinx configuration file.

this is because the configuration was in some cases returning bad data.
the prompt text configuration seems complicated and difficult to get
right to support the wide range of code samples we have in the
documentation.

for now, having a copy button that copies the entire code sample is
better than a smart copy button that only copies the "right" piece of
code

	modified:   docs/source/conf.py

(cherry picked from commit 0b64767)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants