Skip to content

Commit

Permalink
✏️ Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
veit committed Jul 19, 2023
1 parent cf8b399 commit 9be02e9
Show file tree
Hide file tree
Showing 26 changed files with 3,858 additions and 314 deletions.
6 changes: 3 additions & 3 deletions docs/dashboards/appmode/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ The server can be configured with the following three options:
``True``.

``Appmode.show_other_buttons``
shows other buttons in app mode, e.g. :menuselection:`Logout`; Default
setting: ``True``.
shows other buttons in app mode, for example
:menuselection:`Logout`; Default setting: ``True``.

You can find more information about the server configuration in
:doc:`/notebook/config`.
Expand All @@ -77,7 +77,7 @@ Client-side configuration

The UI elements can also be adapted on the client side in the `custom.js
<https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/JavaScript%20Notebook%20Extensions.html#custom.js>`_
file, e.g. with:
file, for example with:

.. code-block:: Javascript
Expand Down
3 changes: 2 additions & 1 deletion docs/dashboards/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Dashboards

:doc:`Jupyter Dashboards Layout Extension <jupyter-dashboards/index>`
Add-on for Jupyter notebooks, with which outputs (text, plots, widgets,
etc.) can be arranged in a design grid or in report form.
:abbr:`etc. (et cetera)`) can be arranged in a design grid or in report
form.
:doc:`appmode/index`
Jupyter extension that turns notebooks into web applications.
:doc:`/nbviewer`
Expand Down
2 changes: 1 addition & 1 deletion docs/dashboards/jupyter-dashboards/use.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ information:
:scale: 53%
:alt: Dashboard info

With :menuselection:`Dashboard Preview` you get a preview, e.g. for the
With :menuselection:`Dashboard Preview` you get a preview, for example for the
:doc:`matplotlib-example`:

.. image:: dashboard-matplotlib-example.png
Expand Down
2 changes: 1 addition & 1 deletion docs/dashboards/jupyter-flex/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Jupyter extension that turns notebooks into dashboards:
* flexible and easy way to define row- and column-oriented layouts
* uses :doc:`/nbconvert` for static reports
* uses :doc:`../voila/index` for dynamic applications with a Jupyter
:doc:`/kernels/index`
:doc:`kernel </kernels/index>`
* :doc:`/ipywidgets/index` support

.. seealso::
Expand Down
2 changes: 1 addition & 1 deletion docs/dashboards/panel/deploy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2544,7 +2544,7 @@
"* `max_states`: Maximum number of states to be embedded\n",
"* `max_opts`: Maximum number of states for a single widget\n",
"* `json`: Specifies whether the data should be exported to json files\n",
"* `save_path`: Path to save JSON filesDateien (`default='./'`)\n",
"* `save_path`: Path to save JSON files (`default='./'`)\n",
"* `load_path`: Path or URL from which the JSON files are loaded (as `save_path` unless otherwise specified)\n",
"\n",
"As you can easily imagine, a combinatorial explosion of the statuses can quickly occur with several widgets, so that the output is limited to around 1000 statuses by default. For larger apps, the status can also be exported to JSON files. For example, if you want to make the app available on a website, specify `save_path` where the JSON file should be saved and `load_path` where the JS code should search for the files."
Expand Down
8 changes: 4 additions & 4 deletions docs/dashboards/panel/interact.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@
"source": [
"## *Widget abbreviations*\n",
"\n",
"If you pass certain values, `interact` use automatically the appropriate widget, e.g. a checkbox for `True` or `IntSlider` for integer values. So you don’t have to explicitly specify the appropriate widget:"
"If you pass certain values, `interact` use automatically the appropriate widget, for example a checkbox for `True` or `IntSlider` for integer values. So you don’t have to explicitly specify the appropriate widget:"
]
},
{
Expand Down Expand Up @@ -1708,18 +1708,18 @@
"source": [
"This example shows how the keyword arguments are processed by `interact`:\n",
"\n",
"1. If the keyword argument is an instance of `Widget` with an `value` attribute, this widget is used. Any widget with an `value` attribute can be used, including custom ones.\n",
"1. If the keyword argument is an instance of `Widget` with a `value` attribute, this widget is used. Any widget with a `value` attribute can be used, including custom ones.\n",
"2. Otherwise, the value is treated as a *Widget Abbreviation* that is converted to a widget before use.\n",
"\n",
"The following table gives an overview of the various *Widget Abbreviations*:\n",
"\n",
"| Keyword argument | Widget |\n",
"|:----------------------------------------------------|:--------------|\n",
"| `True` or `False` | `Checkbox` |\n",
"| `'Hi Pythonistas!'` | `Text` |\n",
"| `\"Hi Pythonistas!\"` | `Text` |\n",
"| Integer value as `min`, `max`,`step`, `value` | `IntSlider` |\n",
"| Floating-point `min`, `max`,`step`, `value` | `FloatSlider` |\n",
"| `['apple','pear']` or `{'one':1,'two':2}` | `Dropdown` |"
"| `[\"apple\", \"pear\"]` or `{\"one\": 1, \"two\": 2}` | `Dropdown` |"
]
}
],
Expand Down
8 changes: 4 additions & 4 deletions docs/dashboards/panel/overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As long as a live Python process is running, dragging these widgets calls the `sine` callback function and evaluates the combination of parameter values ​​you selected and displays the results. With such a panel you can easily examine all functions that provide a visual result of a supported object type (see [Supported object types and libraries](https://github.com/holoviz/panel/issues/2), e.g. Matplotlib, Bokeh, Plotly, Altair or various text and image types."
"As long as a live Python process is running, dragging these widgets calls the `sine` callback function and evaluates the combination of parameter values ​​you selected and displays the results. With such a panel you can easily examine all functions that provide a visual result of a supported object type (see [Supported object types and libraries](https://github.com/holoviz/panel/issues/2), for example Matplotlib, Bokeh, Plotly, Altair or various text and image types."
]
},
{
Expand Down Expand Up @@ -1292,7 +1292,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The `Sine` class and `sine_obj` instance are not dependent on Panel, Jupyter or any other GUI or web toolkit – they simply declare facts about a particular domain (e.g. that sine waves take frequency and amplitude parameters and that the amplitude is a number greater or equals zero). That information is then enough for Panel to create an editable and viewable representation for this object without having to specify anything that depends on the domain-specific details contained in the `Sine` class and the `sine_obj` -Instance are not dependent on Panel, Jupyter or any other GUI or web toolkit. They simply declare facts about a certain range (e.g., that sine waves take frequency and amplitude parameters, and that the amplitude is a number greater than or equal to zero). That information is enough for Panel to create an editable and viewable representation for this object without having to specify anything that depends on the domain-specific details contained outside of `sine_obj`:"
"The `Sine` class and `sine_obj` instance are not dependent on Panel, Jupyter or any other GUI or web toolkit – they simply declare facts about a particular domain (for example that sine waves take frequency and amplitude parameters and that the amplitude is a number greater or equals zero). That information is then enough for Panel to create an editable and viewable representation for this object without having to specify anything that depends on the domain-specific details contained in the `Sine` class and the `sine_obj` -Instance are not dependent on Panel, Jupyter or any other GUI or web toolkit. They simply declare facts about a certain range (for example, that sine waves take frequency and amplitude parameters, and that the amplitude is a number greater than or equal to zero). That information is enough for Panel to create an editable and viewable representation for this object without having to specify anything that depends on the domain-specific details contained outside of `sine_obj`:"
]
},
{
Expand Down Expand Up @@ -1412,7 +1412,7 @@
"source": [
"## Linking plots and actions between panels\n",
"\n",
"The above approaches each work with a variety of displayable objects, including images, equations, tables, and charts. In each case, the panel provides interactive functionality using widgets and updates the objects displayed accordingly, making very few assumptions about what is actually displayed. Panel also supports a broader and more dynamic interactivity in which the displayed object itself is interactive, e.g. JavaScript-based diagrams of Bokeh and Plotly.\n",
"The above approaches each work with a variety of displayable objects, including images, equations, tables, and charts. In each case, the panel provides interactive functionality using widgets and updates the objects displayed accordingly, making very few assumptions about what is actually displayed. Panel also supports a broader and more dynamic interactivity in which the displayed object itself is interactive, for example JavaScript-based diagrams of Bokeh and Plotly.\n",
"\n",
"For example, if we replace the matplotlib wrapper that came with pandas with the [Bokeh](https://docs.bokeh.org/en/latest/) wrapper [hvPlot](https://hvplot.holoviz.org/), we automatically get interactive plots that allow *zooming*, *panning* and *hovering*:"
]
Expand Down Expand Up @@ -2093,7 +2093,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"These interactive actions can be combined with more complex interactions in a plot (e.g. `tap`, `hover`) to make it easier to explore data and uncover connections. For example, we can use HoloViews to create a more comprehensive version of the hvPlot example that is dynamically updated to show the position on the circle as we hover over the sine curve:"
"These interactive actions can be combined with more complex interactions in a plot (for example `tap`, `hover`) to make it easier to explore data and uncover connections. For example, we can use HoloViews to create a more comprehensive version of the hvPlot example that is dynamically updated to show the position on the circle as we hover over the sine curve:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/dashboards/voila/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ execution requests by default.
.. warning::
The current version of Voilà does not respond to the first ``GET`` request
until all cells have been executed. This can take longer. However, work is
being done to enable progressive rendering, s. `feat: progressive cell
being done to enable progressive rendering, see `feat: progressive cell
rendering
<https://github.com/maartenbreddels/voila/commit/cfd0204231313ebe5dd110c488a5cc6254c85a65>`_.

Expand Down
10 changes: 5 additions & 5 deletions docs/dashboards/voila/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To use ``voila-vuetify`` in a notebook, you first have to import ``ipyvuetify``:
import ipyvuetify as v
Then you can create a layout, e.g. with:
Then you can create a layout, for example with:

.. code-block:: python
Expand Down Expand Up @@ -153,8 +153,8 @@ You can use the template with:
$ pipenv run voila --template=reveal reveal.ipynb
Additional options can be used to override the default settings, e.g. to change
the default value for transition ``Fade`` to ``Zoom`` with:
Additional options can be used to override the default settings, for example to
change the default value for transition ``Fade`` to ``Zoom`` with:

.. code-block:: console
Expand Down Expand Up @@ -232,14 +232,14 @@ A Voilà template is a folder that is located in the virtual environment at
└── tree.html
``conf.json``
Configuration file that e.g. refers to the basic template:
Configuration file that for example refers to the basic template:

.. code-block:: json
{"base_template": "default"}
``nbconvert_templates``
Custom templates for nbconvert :doc:`/nbconvert`.
Custom templates for :doc:`/nbconvert`.
``static``
Directory for static files.
``templates``
Expand Down
8 changes: 4 additions & 4 deletions docs/hub/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ System Service for JupyterHub
c.Spawner.cmd = ['/srv/jupyter/.local/share/virtualenvs/jupyter-tutorial-aFv4x91/bin/jupyterhub-singleuser']
#. Add a new systemd unit file ``/etc/systemd/system/jupyterhub.service`` with
the command:
#. Add a new systemd unit file :file:`/etc/systemd/system/jupyterhub.service`
with the command:

.. code-block:: console
Expand Down Expand Up @@ -182,7 +182,7 @@ authentication.
$ chmod 600 /srv/jupyterhub/venv/jupyterhub_cookie_secret
#. Finally it will be entered in the ``jupyterhub_config.py`` file:
#. Finally it will be entered in the :file:`jupyterhub_config.py` file:

.. code-block:: python
Expand All @@ -202,7 +202,7 @@ to be restarted every time unless the proxy is a subprocess of the hub.
$ openssl rand -hex 32
#. It can then be entered in the configuration file, e.g. with
#. It can then be entered in the configuration file, for example with

.. code-block:: python
Expand Down
11 changes: 6 additions & 5 deletions docs/hub/ipyparallel/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Configuration

For the configuration, a configuration file is created for the client and engine
when the IPython hub is started, usually in
``~/.ipython/profile_default/security/``.
:file:`~/.ipython/profile_default/security/`.

#. If we don’t want to use the ``default`` profile, we should first create a new
IPython profile with:
Expand All @@ -18,11 +18,12 @@ when the IPython hub is started, usually in
[ProfileCreate] Generating default config file: '/Users/veit/.ipython/profile_parallel/ipcluster_config.py
``--parallel``
includes the configuration files for *Parallel Computing* (``ipengine``, ``ipcontroller`` etc.).
includes the configuration files for *Parallel Computing* (``ipengine``,
``ipcontroller`` :abbr:`etc. (et cetera)`).

#. When the IPython controller and the engines are started, the files
``ipcontroller-engine.json`` and ``ipcontroller-client.json`` are generated
in ``~/.ipython/profile_default/security/``.
:file:`ipcontroller-engine.json` and :file:`ipcontroller-client.json` are
generated in :file:`~/.ipython/profile_default/security/`.

``ipcluster`` in ``mpiexec``/``mpirun`` mode
--------------------------------------------
Expand All @@ -38,7 +39,7 @@ when the IPython hub is started, usually in
[ProfileCreate] Generating default config file: '/Users/veit/.ipython/profile_mpi/ipengine_config.py'
[ProfileCreate] Generating default config file: '/Users/veit/.ipython/profile_mpi/ipcluster_config.py'
#. Editing of ``ipcluster_config.py``:
#. Editing of :file:`ipcluster_config.py`:

#. so that the MPI launcher can be used:

Expand Down
2 changes: 1 addition & 1 deletion docs/hub/ipyparallel/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Start
The possible routing scheme. ``leastload`` always assigns tasks to the
engine with the fewest open tasks. Alternatively, ``lru`` (Least Recently
Used), ``plainrandom``, ``twobin`` and ``weighted`` can be selected, the
latter two also need Numpy.
latter two also need NumPy.

This can be configured in ``ipcontroller_config.py``, for example with
``c.TaskScheduler.scheme_name = 'leastload'`` or with
Expand Down
2 changes: 1 addition & 1 deletion docs/hub/nbviewer-service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Create service ``nbviewer``
]
``name``
The path name under which the notebook viewer can be reached:: ``/services/<name>``
The path name under which the notebook viewer can be reached: :samp:`/services/{NAME}`
``url``
Protocol, address and port used by ``nbviewer``
``cwd``
Expand Down
42 changes: 21 additions & 21 deletions docs/ipywidgets/embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,40 +63,40 @@ Configuration
:::::::::::::

Adds ``jupyter_sphinx.embed_widgets`` to the list of extensions in the
``conf.py`` file.
:file:`conf.py` file.

Then you can use the following directives in reStructuredText:

``ipywidgets-setup``
::
.. code-block:: python
from ipywidgets import VBox, jsdlink, IntSlider, Button
from ipywidgets import Button, IntSlider, VBox, jsdlink
``ipywidgets-display``
::
.. code-block:: python
s1, s2 = IntSlider(max=200, value=100), IntSlider(value=40)
b = Button(icon='legal')
jsdlink((s1, 'value'), (s2, 'max'))
VBox([s1, s2, b])
s1, s2 = IntSlider(max=200, value=100), IntSlider(value=40)
b = Button(icon="legal")
jsdlink((s1, "value"), (s2, "max"))
VBox([s1, s2, b])
Example
:::::::

::
.. code-block:: rest
.. ipywidgets-setup::
.. ipywidgets-setup::
from ipywidgets import VBox, jsdlink, IntSlider, Button
from ipywidgets import VBox, jsdlink, IntSlider, Button
.. ipywidgets-display::
:hide-code:
.. ipywidgets-display::
:hide-code:
s1, s2 = IntSlider(max=200, value=100), IntSlider(value=40)
b = Button(icon='legal')
jsdlink((s1, 'value'), (s2, 'max'))
VBox([s1, s2, b])
s1, s2 = IntSlider(max=200, value=100), IntSlider(value=40)
b = Button(icon="legal")
jsdlink((s1, "value"), (s2, "max"))
VBox([s1, s2, b])
Options
:::::::
Expand All @@ -113,10 +113,10 @@ following options:

Widget

``:code-below:``
shows the code after the widget
``:alt:``
Alternate text if the widget cannot be rendered
``:code-below:``
shows the code after the widget
``:alt:``
Alternate text if the widget cannot be rendered

.. seealso::
`Options <https://jupyter-sphinx.readthedocs.io/en/latest/#configuration-options>`_
4 changes: 2 additions & 2 deletions docs/ipywidgets/libs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Popular widget libraries are
* :doc:`pyviz:js/pythreejs`

``ipyvolume``
IPyvolume is a Python library for visualizing 3D volumes and glyphs (e.g.
3D scatter plots).
IPyvolume is a Python library for visualizing 3D volumes and glyphs (for
example 3D scatter plots).

* :doc:`pyviz:js/ipyvolume`

Expand Down
2 changes: 1 addition & 1 deletion docs/ipywidgets/libs/ipysheet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Numpy"
"### NumPy"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/ipywidgets/libs/ipyvuetify.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
"source": [
"## `VuetifyTemplate`\n",
"\n",
"You can get a closer match with the Vue/Vuetify API with `VuetifyTemplate`. For this you create a subclass of `VuetifyTemplate` and define your own traitlets. The traitlets can be accessed via the template as if they were in a Vue model. Methods can be defined with the prefix `vue_`, e.g. `def vue_button_click(self, data)`, which can then be called with `@click=\"button_click(e)\"`. In the following I show you a table with search, sorting and number of lines:"
"You can get a closer match with the Vue/Vuetify API with `VuetifyTemplate`. For this you create a subclass of `VuetifyTemplate` and define your own traitlets. The traitlets can be accessed via the template as if they were in a Vue model. Methods can be defined with the prefix `vue_`, for example `def vue_button_click(self, data)`, which can then be called with `@click=\"button_click(e)\"`. In the following I show you a table with search, sorting and number of lines:"
]
},
{
Expand Down

0 comments on commit 9be02e9

Please sign in to comment.