Using workshops

This page is for the person working through a workshop: how one is opened, what the trust dialog asks, how to move through the pages and what the checks want, and how to start over or clear up afterwards. Authors and operators need it too, since it is what their learners see.

Commands named “Workshop: …” below are in JupyterLab’s command palette, the searchable list of every command, opened with Ctrl+Shift+C (Cmd+Shift+C on a Mac) or View, Activate Command Palette. Most also have a button in the panel header.

Opening a workshop

The Workshop panel is the graduation cap tab in the sidebar. With no workshop open it offers three ways in, and the panel header keeps the same three as buttons once one is open:

  • Browse workshops opens a tab listing the workshops already installed and, under Available, those the subscribed collections offer, both grouped by collection. Install downloads one into the workshops directory under the JupyterLab root and lists it under Installed, and a collection’s heading offers “Install all…” for the rest of a course at once, or Subscribe for a collection a launch link added for the session only; Open or Resume opens an installed one. “Collections…” subscribes to and unsubscribes from collections and catalogs; see Finding and installing workshops.

    A card whose progress was made under a JupyterLab that has since restarted says “needs restart” and puts Restart first, with Continue beside it: the files and the progress are still there, but the terminals, running programs and notebook kernels that earlier pages set up are gone, so the steps that remain may fail or behave differently. Restart is the only way back to a known state. Continue is the learner’s call, and asks first with a dialog that says as much; a workshop whose steps leave nothing live behind says so in its manifest with resumable: true and resumes without the fuss.

  • Open a directory opens a workshop directory that is already on disk, by path relative to the JupyterLab root. Right-clicking a directory in the file browser and choosing “Open as Workshop” does the same.

  • Open from URL downloads a workshop from a git repository, a forge tree URL, a GitHub gist or an archive URL.

A JupyterLab URL with a workshop parameter, a launch link, opens a workshop as soon as JupyterLab starts, which is how a course hands one out. A deployment may remove some of these routes; see Deploying workshops.

The workshop that was open when the browser tab closed opens again when JupyterLab next starts on the same server, at the page it was on. That is remembered per server, since a workshop is named by its path under the server’s root, and a workshop whose directory has since gone is simply forgotten. When the server itself has restarted in between, and the workshop is not marked resumable, a dialog asks whether to Restart or Continue before the workshop opens, for the reason the browser card gives; the same dialog appears when such a workshop is opened by command or launch link, and from the card’s own Continue, so there is no way to carry on without having been told what is lost.

The trust dialog

Before a workshop runs anything it shows a dialog with where it came from, a hash of its content, where it will run (the computer JupyterLab was started on, a container, Binder, Codespaces, a JupyterHub or the browser alone) with what running there means for your files and the network, the capabilities it declares with how many actions use each (a terminal, writing files, running code in kernels, changing settings, and so on), the number of actions that run without a click, and any warnings the linter found in it. Three buttons choose how far to trust it:

  • Trust runs every declared capability, including automatic runs.

  • Restricted turns commands into text: execute types the command into the terminal and leaves you to press Enter, and actions that write files, change notebooks, run code, press keys or change settings show what they will do and ask first. Automatic runs are skipped. This is the default choice, and the sensible one for a workshop you do not know.

  • Ask each time confirms every action that needs a capability, with an Allow button that can also allow that capability for the rest of the workshop.

The trust dialog

The trust dialog for a showcase workshop.

While the dialog is up the panel already shows the workshop’s first page, so you can see what you are being asked about; nothing on it can be clicked, and nothing runs, until you answer. Cancel leaves the workshop closed. The choice is remembered for that workshop at that content, so it opens without asking next time and asks again only if it has changed. The badge in the panel header shows the level; clicking it, or “Workshop: Change Trust Level…”, brings the dialog back. In restricted mode the affected actions carry a badge saying “types only”, “confirms” or “auto off”, and an action whose capability the workshop never declared says “not allowed” and does not run at any level. A workshop that asks to report progress to a server adds a checkbox, off by default; see Progress events.

Reading and clicking

The panel shows one page at a time. The header has the workshop title, a progress bar and a page selector; the footer has Previous and Next, and Finish on the last page. Prose explains the step and the boxes are actions: each shows what it will do, a command, a file, a notebook cell, and clicking runs it in the session beside the panel. A word at the right of the box shows how it went, “running”, then “done” or “failed”, and the bar down the box’s left edge takes a matching colour: orange, then green or red. A failure shows its message under the box. Clicking again runs it again, and the word then counts the runs, as in “done ×2”. An action that did not run, because it was not allowed or had nothing to do on this platform, says “skipped”. Some actions run by themselves when a page opens or after another action, which the workshop declares up front. When something grows in place near the bottom of the panel, a hint opened, an action’s output or a quiz’s feedback, the panel scrolls just enough to show it, but never so far that the hint or action itself rises above the top third of the panel, so what led up to it stays in view.

The workshop may arrange the window when it opens: a rendered README, a terminal, a notebook. Drag things where you like; the arrangement is remembered, and “Workshop: Reset Layout” puts the workshop’s own back. Commands typed by hand into a workshop terminal work as well as clicked ones; the workshop’s checks look at results, not at what was clicked. A workshop terminal has its own prompt, showing where you are relative to the workshop’s work directory: ~ $ is the work directory itself, ~/demo $ the demo directory inside it, and a full path means you have left it.

About the workshop

The info button in the panel header, or “Workshop: About This Workshop…” in the command palette, opens a dialog with what the manifest says about the workshop: its description, version, authors, expected duration, the platforms it was written for and its tags. When the author gives them it also has a link to the workshop’s website, usually the repository it is developed in, and a link for reporting a problem with it. The Finish dialog repeats the problem-report link.

The About dialog

The About dialog for a showcase workshop.

Checks, quizzes and forms

A check is a box with a label, a Check button and its last result, shown as a mark at the left of the box: a circle until it has a result, then a tick for a pass or a cross for a failure. Many run on their own when the action before them completes or when the terminal shows something, so a step often ticks itself; Check runs it now. A failing check says what is missing in plain words written by the author. A quiz asks a question with one or several right answers and may limit attempts; a wrong answer explains why. A form collects values the rest of the workshop uses, such as a name or a directory, and can be submitted again to change them.

A page may require some of these before moving on. With soft gating the footer lists what is still to do, with links that scroll to it, but Next still works and the page is not counted as done; with strict gating Next waits. Moving forwards with the requirements met marks the page done, which fills the progress bar and ticks the page in the selector. The page selector always allows going back.

Finishing

Finish on the last page marks it done and opens a dialog saying the workshop is complete, with what to do next: browse other workshops, close this one, shut the session down on Binder, or keep reading. The author may add a note there, such as where to go next. Afterwards the footer shows Finished with a “What next?” link that brings the dialog back.

The Finish dialog

The Finish dialog, with the next workshop of the collection, browsing and closing on offer.

Starting over and clearing up

Everything the workshop records lives in a _workshop directory inside it, and three commands in the panel header and the command palette deal with it:

  • Restart (“Workshop: Restart…”, the restart button in the header, or Restart on the workshop’s card in the browser) empties the workspace and fills it again from the workshop’s shipped files, so everything made in it goes and it looks as it did when the workshop was first opened; the pages and the manifest are never touched. It forgets all progress, closes the documents and terminals it had open, and reopens the workshop at the first page with its layout applied again. It works offline and in JupyterLite. It only covers the workspace, so a workshop that writes elsewhere, such as into the home directory, is not undone there. A workshop with an isolated environment loses that too, kernel registration included, and offers to create it again: a restart is for when something is broken, and an environment that has been installed into is one of the things that can be.

  • Reset Progress (“Workshop: Reset Progress…”) forgets page progress, action results, captured variables and the action log, restores any JupyterLab settings the workshop changed, and reopens it at the first page with its layout applied again, keeping the files and the environment as they are.

    Neither Restart nor Reset Progress touches the records kept about the workshop rather than about progress through it: where it was downloaded from (source.json), its Workshop Author conversation (agent.json), and the gist it was published to (gist.json). Remove deletes those along with everything else.

  • Remove (“Workshop: Remove…”, or Remove on the card in the browser) lists what it will do before doing it: delete the workshop directory for a downloaded workshop (for a local directory only the _workshop state is removed), restore any settings the workshop changed, unregister the kernel of an isolated environment it created, and forget the trust decision. Remove on a card follows the same rule for a workshop that is not open: a directory the browser downloaded is deleted, while one that was put there by other means, such as a checkout’s own directory, keeps its files and loses only its _workshop state. For one of your own workshops in a library the dialog offers both, Clean up for the state alone and Delete for the directory.

Closing a workshop, from the header button or the Finish dialog, closes the documents it put on screen and shuts down its terminals, so the next workshop starts in a clear window. A file with unsaved changes asks first. Restart and Remove do the same before touching the files.

Variables and the action log

The gear button in the header, or “Workshop: Variables…”, lists the workshop’s variables with their current values and where each came from, and lets you change the ones the workshop allows; see Variables. “Workshop: Show Action Log” lists every action that ran, was skipped or asked for confirmation, with its time, page, description and result, which is also where to look when something did not do what the page said it would.