ssl-hep / ServiceX_frontend

Client access library for ServiceX
https://servicex-frontend.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
5 stars 11 forks source link

Add sphinx-copybutton to get copy buttons on examples in docs #462

Closed matthewfeickert closed 1 month ago

matthewfeickert commented 1 month ago

The examples in the docs would be made nicer if sphinx-copybutton was added to the docs extra

https://github.com/ssl-hep/ServiceX_frontend/blob/c555974324dc7341ec2c89cfb8632d25f0df8ad9/pyproject.toml#L82-L90

and to the docs/conf.py extensions

https://github.com/ssl-hep/ServiceX_frontend/blob/c555974324dc7341ec2c89cfb8632d25f0df8ad9/docs/conf.py#L22-L31

will probably also want to add this do the conf.py:

# sphinx-copybutton configuration
copybutton_prompt_text = r">>> |\.\.\. |\$ "
copybutton_prompt_is_regexp = True
copybutton_here_doc_delimiter = "EOF"
matthewfeickert commented 1 month ago

Resolved by PR #463

(Not sure why resolves keyword not working)