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: Add interactive examples with jupyterlite-sphinx #25969

Open
steppi opened this issue Mar 8, 2024 · 0 comments
Open

DOC: Add interactive examples with jupyterlite-sphinx #25969

steppi opened this issue Mar 8, 2024 · 0 comments

Comments

@steppi
Copy link
Contributor

steppi commented Mar 8, 2024

I'd like to assess interest in adding interactive examples to NumPy's docs. @mattip mentioned in scipy/scipy#19729 (comment), that this was briefly discussed in one of the NumPy community meetings.

For background info. The jupyterlite-sphinx extension offers the try_examples directive, which adds a button which can be used to swap the rendered examples sections for a docstring in-place with an embedded Jupyterlite notebook. The notebooks run in-browser using a wasm based kernel like pyodide .

I've deployed SciPy's docs with this extension in action here: https://steppi.github.io/scipy/reference/index.html

Here's a direct link to a page with an example: https://steppi.github.io/scipy/reference/generated/scipy.integrate.quad.html#scipy.integrate.quad.

scipy/scipy#20019 was recently merged, adding jupyterlite-sphinx to SciPy's docs. Examples are currently disabled (it's possible to enable or disable them for deployed docs without rebuilding), but we plan to roll them out within the next two weeks.

I'd be interested in getting feedback on the extension, and if there are any changes or new features you'd like to see before it could be used for NumPy. NumPy being able to ship interactive examples would need to wait for Pyodide support for NumPy 2.0, which I suspect would not be too difficult. My understanding is the primary blocker making updates of SciPy in Pyodide difficult is the dependence on Fortran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants