@@ -97,6 +97,25 @@ First we'll look at the final extension together. It:
9797
9898## 🏋️ Exercise A (15 minutes): Extension creation and development loop
9999
100+ ### Set up workshop dependency environment
101+
102+ ``` bash
103+ # Create an environment named "jupytercon2025"
104+ micromamba create -n jupytercon2025
105+
106+ # Activate it
107+ # IMPORTANT: Run this every time you open a new terminal!
108+ micromamba activate jupyutercon2025
109+
110+ # Install workshop dependencies
111+ # # python & pip: Python language and its official package installer
112+ # # nodejs: A JavaScript runtime
113+ # # gh: The GitHub CLI
114+ # # copier: A tool for quickstarting an extension from a template
115+ # # jinja2-time: A dependency of the official JupyterLab extension template
116+ micromamba install python pip nodejs gh " copier~=9.2" jinja2-time
117+ ```
118+
100119### Create a repository in GitHub and clone it
101120
1021210 . Change to the parent directory where you want to work, e.g.
@@ -121,18 +140,7 @@ First we'll look at the final extension together. It:
121140
122141# ## First, create a new extension from the [official template](https://github.com/jupyterlab/extension-template)
123142
124- :::{important} Prerequisites
125- * ` copier` . Install with any of the following options:
126- * Into an existing environment (don' t forget to activate it first):
127- * `pip install "copier~=9.2" jinja2-time`
128- * `conda install -c conda-forge "copier~=9.2" jinja2-time`
129- * Globally:
130- * `pipx install "copier~=9.2" --preinstall jinja2-time`
131- * `uv tool install --with jinja2-time copier~=9.2`
132- * `pixi global install "copier~=9.2" --with jinja2-time`
133- :::
134-
135- 2. Instantiate the template to get started on your new extension!
143+ 1. Instantiate the template to get started on your new extension!
136144
137145 ` ` ` bash
138146 copier copy --trust https://github.com/jupyterlab/extension-template .
@@ -147,17 +155,13 @@ First we'll look at the final extension together. It:
147155
148156 ! [A demo of instantiating an extension project from the official template](../assets/images/init-from-template.gif)
149157
150- 3 . List out the files that were created (`ls -la` or `tree -a` are good options)
158+ 2 . List out the files that were created (` ls -la` or ` tree -a` are good options)
151159
152- 4 . Install the extension in development mode
160+ 3 . Install the extension in development mode
153161
154162 ` ` ` bash
155- # Create and activate a virtualenv
156- uv venv .venv
157- source .venv/bin/activate
158-
159163 # Install package in development mode
160- uv pip install --editable ".[dev,test]"
164+ pip install --editable " .[dev,test]"
161165
162166 # Install the frontend and backend components of the extension in development mode:
163167 jupyter labextension develop . --overwrite
@@ -168,7 +172,7 @@ First we'll look at the final extension together. It:
168172 jlpm build
169173 ` ` `
170174
171- 5 . 🧪 Test it out! Run this command in a **separate terminal**.
175+ 4 . 🧪 Test it out! Run this command in a ** separate terminal** .
172176 It will open JupyterLab in your browser automatically.
173177 Remember to activate the virtual environment again with ` source .venv/bin/activate`
174178 any time you create a new terminal.
@@ -178,7 +182,7 @@ First we'll look at the final extension together. It:
178182 jupyter lab
179183 ` ` `
180184
181- 6 . Confirm the extension was loaded. Open your browser' s dev console (F12 or
185+ 5 . Confirm the extension was loaded. Open your browser' s dev console (F12 or
182186 `CTRL+SHIFT+I`) and look for log messages reading:
183187
184188 * `JupyterLab extension jupytercon2025-extension-workshop is activated!`
@@ -187,7 +191,7 @@ First we'll look at the final extension together. It:
187191
188192 **If you do not see these messages, let us know you need help!**
189193
190- 7 . Directly test the server portion of the extension by visiting the endpoint in your
194+ 6 . Directly test the server portion of the extension by visiting the endpoint in your
191195 browser (`http://localhost:8888/jupytercon2025-extension-workshop/hello`).
192196 You should see the same message as the last step:
193197 `Hello, world! This is the ' /jupytercon2025-extension-workshop/hello' endpoint. Try
0 commit comments