Skip to content

Commit 9150743

Browse files
committed
Add changes
2 parents 214241b + 5c7a942 commit 9150743

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4254
-1077
lines changed

.github/workflows/binder-badge.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#./.github/workflows/binder-badge.yaml
2+
name: Binder Badge
3+
on:
4+
pull_request_target:
5+
types: [opened, edited, reopened]
6+
7+
jobs:
8+
binder:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
12+
steps:
13+
- name: comment on PR with Binder link
14+
uses: actions/github-script@v3
15+
with:
16+
github-token: ${{secrets.GITHUB_TOKEN}}
17+
script: |
18+
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
19+
var PR_HEAD_REF = process.env.PR_HEAD_REF;
20+
github.issues.createComment({
21+
issue_number: context.issue.number,
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=%2Flab) :point_left: Launch a binder notebook on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
25+
})
26+
env:
27+
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
28+
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# The Jupyter Widget Ecosystem
22

3-
## Tutorial, SciPy 2020
3+
## Tutorial, SciPy 2021
44

55
# https://github.com/jupyter-widgets/tutorial
66

77
# Installation
88

9+
### Installation instructions last updated 2021-06-07
10+
911
The code in the tutorial has been written using Python 3; many of the dependencies may not be available for Python 2.7.
1012

1113
We **strongly recommend** using the conda Python distribution. You can install either [miniconda](https://conda.io/miniconda.html) (much smaller, only essential packages) or the full [anaconda distribution](https://www.continuum.io/downloads) (very extensive, but very, very large).
@@ -63,11 +65,11 @@ To update your copy of the tutorial materials, navigate in a terminal to folder
6365

6466
## Using binder
6567

66-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/tutorial/master?urlpath=%2Flab)
68+
Click the badge below to run the tutorial online:
6769

68-
Many of the materials work without modification on mybinder.org without needing to install anything on your computer. However, this is *not* the recommended way to do the tutorial.
70+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/tutorial/master?urlpath=%2Flab%2Ftree%2Fnotebooks)
6971

70-
Go to [mybinder.org](https://mybinder.org/v2/gh/jupyter-widgets/tutorial/master) to run the tutorial online.
72+
Many of the materials work without modification on mybinder.org without needing to install anything on your computer. However, this is *not* the recommended way to do the tutorial.
7173

7274

7375
## Any ipywidgets or custom widgets library question?

apt.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xvfb

binder/environment.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

environment.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
- bqplot=0.12.29
6-
- ipycanvas=0.9.0
6+
- ipycanvas=0.8.2
77
- ipycytoscape=1.2.2
88
- ipydatagrid=1.0.7
99
- ipygany=0.5.0
@@ -19,9 +19,12 @@ dependencies:
1919
- pip
2020
- python=3.8
2121
- pythreejs=2.3.0
22+
- pyvista=0.31.3
2223
- requests
2324
- scikit-image
2425
- scipy
2526
- sidecar=0.5.1
2627
- voila=0.2.10
2728
- voila-vuetify=0.5.2
29+
- voila-material=0.4.0
30+
- vtk=8.2.0

install_check.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
'ipydatagrid',
2020
'ipycytoscape',
2121
'ipygany',
22-
'jupyterlab'
22+
'jupyterlab',
23+
'voila',
24+
'pyvista',
2325
]
2426

2527
import_result = {p: False for p in requirements}

notebooks/00.00-index.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"metadata": {},
1414
"source": [
1515
"# The Jupyter Interactive Widget Ecosystem \n",
16+
"## SciPy 2021\n",
1617
"\n",
17-
"## SciPy 2020\n",
18-
"## Matt Craig, Mehmet Bektas, Itay Dafna, and Martin Renou\n",
18+
"### Matt Craig, Martin Renou, Itay Dafna, Mariana Meireles, Youness Bennani\n",
1919
"\n",
2020
"This tutorial will introduce you to the widgets in the Jupyter Notebook, walk through a few approaches to writing widgets, and introduce some relatively new widget packages.\n",
2121
"\n",
@@ -100,7 +100,7 @@
100100
"name": "python",
101101
"nbconvert_exporter": "python",
102102
"pygments_lexer": "ipython3",
103-
"version": "3.8.3"
103+
"version": "3.8.10"
104104
}
105105
},
106106
"nbformat": 4,

notebooks/00.00-introduction.ipynb

Lines changed: 9 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"source": [
1515
"# Jupyter Widgets Tutorial Introduction\n",
1616
"\n",
17-
"## Matt Craig, Martin Renou, Mehmet Bektas, Itay Dafna\n",
17+
"### Matt Craig, Martin Renou, Itay Dafna, Mariana Meireles, Youness Bennani\n",
1818
"\n",
1919
"## Jupyter lab essentials\n",
2020
"\n",
@@ -28,7 +28,7 @@
2828
"cell_type": "markdown",
2929
"metadata": {},
3030
"source": [
31-
"# Interactive Jupyter widgets\n",
31+
"## Interactive Jupyter widgets\n",
3232
"\n",
3333
"A Python widget is an object that represents a control on the front end, like a slider. A single control can be displayed multiple times - they all represent the same python object."
3434
]
@@ -59,40 +59,6 @@
5959
"slider"
6060
]
6161
},
62-
{
63-
"cell_type": "code",
64-
"execution_count": null,
65-
"metadata": {},
66-
"outputs": [],
67-
"source": [
68-
"slider"
69-
]
70-
},
71-
{
72-
"cell_type": "markdown",
73-
"metadata": {},
74-
"source": [
75-
"The control attributes, like its value, are automatically synced between the frontend and the kernel."
76-
]
77-
},
78-
{
79-
"cell_type": "code",
80-
"execution_count": null,
81-
"metadata": {},
82-
"outputs": [],
83-
"source": [
84-
"slider.value"
85-
]
86-
},
87-
{
88-
"cell_type": "code",
89-
"execution_count": null,
90-
"metadata": {},
91-
"outputs": [],
92-
"source": [
93-
"slider.value = 8"
94-
]
95-
},
9662
{
9763
"cell_type": "markdown",
9864
"metadata": {},
@@ -126,29 +92,6 @@
12692
"square"
12793
]
12894
},
129-
{
130-
"cell_type": "markdown",
131-
"metadata": {},
132-
"source": [
133-
"You can link control attributes and lay them out together."
134-
]
135-
},
136-
{
137-
"cell_type": "code",
138-
"execution_count": null,
139-
"metadata": {},
140-
"outputs": [],
141-
"source": [
142-
"# Create text box to hold slider value\n",
143-
"text = widgets.FloatText(description='Value')\n",
144-
"\n",
145-
"# Link slider value and text box value\n",
146-
"widgets.link((slider, 'value'), (text, 'value'))\n",
147-
"\n",
148-
"# Put them in a vertical box\n",
149-
"widgets.VBox([slider, text])"
150-
]
151-
},
15295
{
15396
"cell_type": "markdown",
15497
"metadata": {},
@@ -199,7 +142,7 @@
199142
"cell_type": "markdown",
200143
"metadata": {},
201144
"source": [
202-
"### How to load exercise solutions \n",
145+
"## How to load exercise solutions \n",
203146
"\n",
204147
"Some exercises have solutions you can load if you prefer. To do that, uncomment the line with `%load` in it, then run the cell **twice**. The first time loads the solution, the second time runs the solution.\n",
205148
"\n",
@@ -214,14 +157,16 @@
214157
"metadata": {},
215158
"outputs": [],
216159
"source": [
217-
"# %load solutions/intro/intro-example.py\n"
160+
"# %load solutions/intro/intro-example.py"
218161
]
219162
},
220163
{
221164
"cell_type": "markdown",
222165
"metadata": {},
223166
"source": [
224-
"# Behind the scenes\n",
167+
"## Additional reading\n",
168+
"\n",
169+
"### Behind the scenes\n",
225170
"\n",
226171
"Behind the scenes, even pure Python widgets are composed of two pieces:\n",
227172
"\n",
@@ -237,7 +182,7 @@
237182
"cell_type": "markdown",
238183
"metadata": {},
239184
"source": [
240-
"# Jupyter widgets as a framework\n",
185+
"### Jupyter widgets as a framework\n",
241186
"\n",
242187
"Jupyter widgets forms a framework for representing python objects interactively. Some large open-source interactive controls based on Jupyter widgets include:\n",
243188
"\n",
@@ -279,7 +224,7 @@
279224
"name": "python",
280225
"nbconvert_exporter": "python",
281226
"pygments_lexer": "ipython3",
282-
"version": "3.8.3"
227+
"version": "3.8.10"
283228
},
284229
"widgets": {
285230
"state": {

notebooks/01.00-overview.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"name": "python",
9797
"nbconvert_exporter": "python",
9898
"pygments_lexer": "ipython3",
99-
"version": "3.8.3"
99+
"version": "3.8.10"
100100
}
101101
},
102102
"nbformat": 4,

notebooks/02.00-Using-Interact.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@
475475
"name": "python",
476476
"nbconvert_exporter": "python",
477477
"pygments_lexer": "ipython3",
478-
"version": "3.8.3"
478+
"version": "3.8.10"
479479
}
480480
},
481481
"nbformat": 4,

0 commit comments

Comments
 (0)