Skip to content

Commit 3a6c40a

Browse files
authored
Merge pull request #1238 from jcb91/docs
docs updates
2 parents 48b089d + 876255b commit 3a6c40a

File tree

5 files changed

+65
-60
lines changed

5 files changed

+65
-60
lines changed

README.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,10 @@ if you encounter any problems.
3333
IPython/Jupyter version support
3434
===============================
3535

36-
| Version | Description |
37-
|-------------|-------------------------------------------------------------------------------------------------|
38-
| IPython 2.x | checkout [2.x branch](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/2.x) |
39-
| IPython 3.x | checkout [3.x branch](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/3.x) |
40-
| Jupyter 4.x | checkout [master branch](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/) |
36+
For Jupyter version 4 or 5, use the master branch of the repository.
37+
Most nbextensions have been updated to work with both Jupyter 4.x and 5.x, but occasionally things get missed, or the Jupyter API changes in a minor version update, so if anything doesn't work as you'd expect/hope, please do check the issues, or open a new one as necessary!
4138

42-
There are different branches of the notebook extensions in this repository.
43-
Please make sure you use the branch corresponding to your IPython/Jupyter version.
39+
This repo is pretty much all in the main master branch, although there remain vestigial branches for IPython notebook versions 2.x and 3.x.
4440

4541

4642
Documentation
@@ -49,20 +45,20 @@ Documentation
4945
Documentation for all maintained extensions can be found at
5046
[jupyter-contrib-nbextensions.readthedocs.io](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest)
5147

52-
In the 4.x Jupyter repository, all extensions that are maintained and active
48+
All extensions that are maintained and active
5349
have at least a yaml file to allow them being configured using the
5450
[jupyter_nbextensions_configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator)
5551
server extension, which is installed as a dependency of this package.
5652
Most also have a markdown readme file for documentation.
5753
The `jupyter_nbextensions_configurator` server extension shows an nbextensions
5854
tab on the main notebook dashboard (file tree page) from which you can see each
5955
nbextension's markdown readme, and configure its options.
60-
To view documentation without installing, you can browse the nbextensions
56+
To view documentation without installing, you can check the list at
57+
[jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions.html](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions.html),
58+
or browse the nbextensions
6159
directory to read markdown readmes on github at
6260
[github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions).
6361

64-
For older releases (2.x and 3.x), look at the [Wiki](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/wiki)
65-
6662
Some extensions are not documented. We encourage you to add documentation for them.
6763

6864

@@ -207,32 +203,22 @@ configuration options are presented.
207203
![jupyter_nbextensions_configurator](https://raw.githubusercontent.com/Jupyter-contrib/jupyter_nbextensions_configurator/master/src/jupyter_nbextensions_configurator/static/nbextensions_configurator/icon.png)
208204

209205

210-
4\. Migrating from older versions of this repo
211-
----------------------------------------------
212-
213-
The `jupyter contrib nbextensions` command also offers a `migrate` subcommand,
214-
which will
215-
216-
* uninstall the old repository version's files, config and python package
217-
* adapt all `require` paths which have changed. E.g. if you had the
218-
collapsible headings nbextension enabled with its old require path of
219-
`usability/collapsible_headings/main`, the `migrate` command will alter
220-
this to match the new require path of `collapsible_headings/main`.
206+
4\. More complex setups
207+
-----------------------
221208

222209
For complex or customized installation scenarios, please look at the
223210
documentation for installing notebook extensions, server extensions, nbconvert
224211
pre/postprocessors and templates on the [Jupyter homepage](https://jupyter.org).
225-
More information can also be found in the
226-
[Wiki](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/wiki).
212+
Most nbextensions here should work fine with jupyterhub (because jupyterhub spawns regular notebook servers for each individual user), but won't work with jupyterlab (because the jupyterlab javascript framework is different to notebook's, and still rapidly changing under active development).
227213

228214
See also [installing Jupyter](https://jupyter.readthedocs.io/en/latest/install.html)
229215

230216

231217
Notebook extension structure
232218
============================
233219

234-
The nbextensions are stored in the repository each as a separate subdirectory of
235-
`src/jupyter_contrib_nbextensions/nbextensions`.
220+
Most of the nbextensions are stored in the repository each as a separate subdirectory of
221+
[`src/jupyter_contrib_nbextensions/nbextensions`](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions).
236222

237223
Each notebook extension typically has its own directory named after the extension, containing:
238224

@@ -241,12 +227,16 @@ Each notebook extension typically has its own directory named after the extensio
241227
* `thisextension/thisextension.css` - optional CSS file, which may be loaded by the javascript
242228
* `thisextension/README.md` - readme file describing the nbextension in markdown format
243229

230+
A few (jupyter_highlight_selected_word, jupyter_latex_envs), exist as separate packages on pypi, which are included as dependencies of this package.
231+
244232
For further details, see [the documentation at jupyter-contrib-nbextensions.readthedocs.io](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/internals.html).
245233

234+
246235
Contributing
247236
============
248237

249-
To learn how to setup a development enivornment and contribution guidelines, see [CONTRIBUTING.md](./CONTRIBUTING.md).
238+
To learn how to setup a development environment and for contribution guidelines, see [CONTRIBUTING.md](./CONTRIBUTING.md).
239+
250240

251241
Changes
252242
=======

docs/source/install.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -139,22 +139,12 @@ configuration options are presented.
139139
![jupyter_nbextensions_configurator](https://raw.githubusercontent.com/Jupyter-contrib/jupyter_nbextensions_configurator/master/src/jupyter_nbextensions_configurator/static/nbextensions_configurator/icon.png)
140140

141141

142-
4\. Migrating from older versions of this repo
143-
----------------------------------------------
144-
145-
The `jupyter contrib nbextensions` command also offers a `migrate` subcommand,
146-
which will
147-
148-
* uninstall the old repository version's files, config and python package
149-
* adapt all `require` paths which have changed. E.g. if you had the
150-
collapsible headings nbextension enabled with its old require path of
151-
`usability/collapsible_headings/main`, the `migrate` command will alter
152-
this to match the new require path of `collapsible_headings/main`.
142+
4\. More complex setups
143+
-----------------------
153144

145+
Most nbextensions here should work fine with jupyterhub (because jupyterhub spawns regular notebook servers for each individual user), but won't work with jupyterlab (because the jupyterlab javascript framework is different to notebook's, and still rapidly changing under active development).
154146
For complex or customized installation scenarios, please look at the
155147
documentation for installing notebook extensions, server extensions, nbconvert
156148
pre/postprocessors and templates on the [Jupyter homepage](https://jupyter.org).
157-
More information can also be found in the
158-
[Wiki](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/wiki).
159149

160150
See also [installing Jupyter](https://jupyter.readthedocs.io/en/latest/install.html)

src/jupyter_contrib_nbextensions/nbextensions/exercise/readme.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ enabled.
1010
The example below demonstrates some of the features of the exercise extensions.
1111

1212
- First, an solution or "details" cell is created by (a) selecting two cells with the rubberband and (b) clicking on the menu-button [exercise extension]
13-
- Second, the two next cells are selected using the keyboard shortcut Shift-J and a solution is created using the shortcut Alt-D [exercise2 extension]
13+
- Second, the two next cells are selected using a keyboard shortcut, and a solution is created using the shortcut Alt-D [exercise2 extension]
1414
- Third, the two solutions are expanded by clicking on the corresponding widgets
1515
- Fourth, the solutions are removed by selecting them and clicking on the buttons in the toolbar.
1616

@@ -23,18 +23,30 @@ The extensions provide
2323
- a menubar button
2424
- a cell widget -- A plus/minus button in `exercise` and a sliding checkbox in `exercise2`.
2525

26-
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected either by multicell selection (*Shift-J* (select next) or *Shift-K* (select previous) keyboard shortcuts --
27-
*Shift-up* and *Shift-down* will probably work in a near future) or using the [rubberband extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/wiki/Rubberband).
26+
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected by the usual notebook multicell selection methods (e.g. *Shift-down* (select next) or *Shift-up* (select previous) keyboard shortcuts, or using the rubberband extension.
27+
28+
29+
### Creating a solution
2830

29-
**Creating a solution **
3031
Several cells being selected, pressing the menubar button adds a `cell widget` and hides the cells excepted the first one which serves as a heading cell. *Do not forget to keep the Shift key pressed down while clicking on the menu button
3132
(otherwise selected cells will be lost)*. It is also possible to use a keyboard shortcut for creating the solution from selected cells: Alt-S for exercise extension and Alt-D for exercise2.
3233

33-
**Removing a solution** If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
3434

35-
**Showing/hiding solution** At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
35+
### Removing a solution
36+
37+
If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
38+
39+
40+
### Showing/hiding solution
41+
42+
At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
43+
44+
45+
### Persistence
46+
47+
The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3648

37-
**Persistence** The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3849

39-
**Internals** exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell.
50+
### Internals
4051

52+
exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell. A solution[.2]_first metadada is also added to enable an easy detection of the first cell in an "exercise" and then allow several consecutive exercises.
Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Exercise2 extensions
1+
Exercise2
2+
=========
23

34
These are two extensions for Jupyter, for hiding/showing solutions cells.
45
They use the same approach and codebase and differ only by the type of
@@ -9,31 +10,43 @@ enabled.
910
The example below demonstrates some of the features of the exercise extensions.
1011

1112
- First, an solution or "details" cell is created by (a) selecting two cells with the rubberband and (b) clicking on the menu-button [exercise extension]
12-
- Second, the two next cells are selected using the keyboard shortcut Shift-J and a solution is created using the shortcut Alt-D [exercise2 extension]
13+
- Second, the two next cells are selected using a keyboard shortcut, and a solution is created using the shortcut Alt-D [exercise2 extension]
1314
- Third, the two solutions are expanded by clicking on the corresponding widgets
1415
- Fourth, the solutions are removed by selecting them and clicking on the buttons in the toolbar.
1516

1617
![](image.gif)
1718

1819

19-
## The extensions provide
20+
The extensions provide
21+
----------------------
2022

2123
- a menubar button
2224
- a cell widget -- A plus/minus button in `exercise` and a sliding checkbox in `exercise2`.
2325

24-
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected either by multicell selection (*Shift-J* (select next) or *Shift-K* (select previous) keyboard shortcuts --
25-
*Shift-up* and *Shift-down* will probably work in a near future) or using the
26-
[rubberband extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/wiki/Rubberband).
26+
The menubar button is devoted to the creation or removing of the solution. The solution consists in several consecutive cells that can be selected by the usual notebook multicell selection methods (e.g. *Shift-down* (select next) or *Shift-up* (select previous) keyboard shortcuts, or using the rubberband extension.
27+
28+
29+
### Creating a solution
2730

28-
**Creating a solution **
2931
Several cells being selected, pressing the menubar button adds a `cell widget` and hides the cells excepted the first one which serves as a heading cell. *Do not forget to keep the Shift key pressed down while clicking on the menu button
3032
(otherwise selected cells will be lost)*. It is also possible to use a keyboard shortcut for creating the solution from selected cells: Alt-S for exercise extension and Alt-D for exercise2.
3133

32-
**Removing a solution** If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
3334

34-
**Showing/hiding solution** At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
35+
### Removing a solution
36+
37+
If a solution heading (first) cell is selected, then clicking the menu bar button removes this solution and its solutions cells are shown. Using the keyboard shortcut has the same effect.
38+
39+
40+
### Showing/hiding solution
41+
42+
At creation of the solution, the solution cells are hidden. Clicking the `cell widget` toggles the hidden/shown state of the solution.
43+
44+
45+
### Persistence
46+
47+
The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3548

36-
**Persistence** The state of solutions, hidden or shown, is preserved and automatically restored at startup and on reload.
3749

38-
**Internals** exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell. A solution[.2]_first metadada is also added to enable an easy detection of the first cell in an "exercise" and then allow several consecutive exercises.
50+
### Internals
3951

52+
exercise and exercise2 add respectively a solution and solution2 metadata to solution cells, with for value the current state hidden/shown of the solution. For exercise, a div with the plus/minus character is prepended to the solution heading cell. For exercise2, a flex-wrap style is added to the solution heading cell and a checkbox widget, with some css styling, is appended to the cell. A solution[.2]_first metadada is also added to enable an easy detection of the first cell in an "exercise" and then allow several consecutive exercises.

src/jupyter_contrib_nbextensions/nbextensions/snippets_menu/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ Comment out whatever you've got in `custom.js`, and add in the simple
549549
configuration from [the beginning](#installation). If that doesn't
550550
work, try the following steps
551551
suggested
552-
[here](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/wiki#troubleshooting):
552+
[here](http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/troubleshooting.html):
553553

554554
1. Clear your browser cache or start a private browser tab.
555555
2. Verify your `custom.js` is the one the notebook is seeing, by opening it

0 commit comments

Comments
 (0)