Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: include jupyterlite in the supported extention (#1023)
* display a jupyterlite output * simplify the build * add jupyterlite to the req * add disclaimer * split viz libs and execution libs * Update docs/examples/pydata.md
- Loading branch information
Showing
5 changed files
with
42 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Execution Libraries | ||
=================== | ||
|
||
Many execution libraries can be used to display the output of IPyhton cells. We used ``MySTnb`` to parse and display the outputs presented in :doc:`./pydata`. In this section we'll show alternatives that runs code for you using a Jupyter like kernel. | ||
|
||
Jupyterlite | ||
----------- | ||
|
||
.. warning:: | ||
The jupyterLite lib is not yet providing a handle to switch from light to dark theme. If you consider using it in your documentation you should also enforce the light theme to your users. | ||
Follow https://github.com/jupyterlite/jupyterlite-sphinx/issues/69 for more information. | ||
|
||
``jupyterlite-sphinx`` brings the power of `JupyterLite <https://jupyterlite.readthedocs.io/en/latest/>`__ to your Sphinx documentation. It makes a full JupyterLite deployment in your docs and provide some utilities for using that deployment easily. | ||
|
||
This section demonstrate how it displays in a **pydata-sphinx-theme** context: | ||
|
||
.. replite:: | ||
:kernel: python | ||
:height: 600px | ||
:prompt: Try Replite! | ||
|
||
print("it's a test") | ||
|
||
jupyter-sphinx | ||
-------------- | ||
|
||
Another common library is ``jupyter-sphinx``. | ||
This section demonstrates a subset of functionality to make sure it behaves as expected. | ||
|
||
.. jupyter-execute:: | ||
|
||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
|
||
rng = np.random.default_rng() | ||
data = rng.standard_normal((3, 100)) | ||
fig, ax = plt.subplots() | ||
ax.scatter(data[0], data[1], c=data[2], s=3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters