-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add toggle for prompts in example code in docs #1095
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
Comments
For those who remembered talking about prompts before, here's the link: https://groups.google.com/g/pvlib-python/c/BT3Mjerp92g/m/TvuXIHwFAwAJ |
This is a nice feature to add. Curious how does numpy do it? |
Numpy uses the scipy sphinx theme, which has copied the functionality from the cpython docs theme (sphinx-toggleprompt also copied it from the cpython docs theme, and modified it slightly) |
@jurasofish the pvlib surface is certainly easier with your library. @pvlib/pvlib-maintainer My only hesitation is the dependency on a relatively new package and how that might affect those who want to build the documents themselves. Not much of a concern, since I think those users are the exception. |
Could be that a part of #329 is to switch sphinx themes, but in the meantime I think this is a good idea. Looks like it doesn't have any dependencies so as long as we pin a version I think it shouldn't be a burden for building locally. |
@kanderso-nrel what is the implication for switching sphinx themes? I missed it if it was discussed in the linked google group or PR. @cwhanse this is the group handle: @pvlib/pvlib-maintainer I have a mild preference for the new sphinx-toggleprompt package over maintaining this non-python code ourselves. |
I only meant that apparently some sphinx themes include this functionality out of the box (e.g. the scipy theme as mentioned earlier in this thread), so sphinx-toggleprompt would become unnecessary if we eventually switch to one of those themes. |
Currently copying code examples out of the docs is tricky because it's formatted as an IPython notebook.
I propose adding the sphinx-toggleprompt extension so these can be toggled.
Similar functionality exists in the offical python docs, numpy docs, and scipy docs (among others)
(nb i am the developer of this library)
The text was updated successfully, but these errors were encountered: