Compute

With compute, readers can run the code in your site’s submissions: run a notebook’s cells, rerun the code behind a figure and interact with it, or open the submission in Jupyter. The code runs on a compute hub, a BinderHub or JupyterHub that builds each submission’s environment and starts it for the reader.

Site admins set up compute on the Compute page, in the Administration section of the site’s menu. You choose which hub the site uses and what readers can do, and you can give a kind of submission settings of its own.

Before you start

  • You’re a site admin. Only site admins see the Compute page and can change it. See Users & Access for site roles.

  • Compute is part of your site’s plan. Without it, the page explains what compute adds, and Contact support sends Curvenote a request to add it.

  • A hub is enabled for your site. Curvenote adds hubs to sites; you can’t add one yourself. A site with no hub has no compute, and readers can’t run its code. If your site has none and you expect one, the page’s support link sends Curvenote a request.

Your site’s hubs

Compute hubs, at the top of the page, lists the hubs Curvenote has added to your site. Each row shows the hub’s name, its type and description, what on your site uses it, and its health. The page checks each hub when it opens; select Check again to check it again.

The hubs on a site. Curvenote Shared Compute runs the site’s code, and it’s up and passing its checks.

Figure 1:The hubs on a site. Curvenote Shared Compute runs the site’s code, and it’s up and passing its checks.

Healthy means the hub answered and its checks passed. If a hub isn’t healthy, readers may not be able to run code until it recovers; contact Curvenote support if it stays that way.

A site that ran code before hubs were added to sites may show a row marked Legacy hub assignment: a server named in your site’s advanced settings, which Curvenote hasn’t added as a hub. Readers still run code on it, but the page can’t check it. Choose one of your site’s hubs instead once Curvenote has added it.

The site’s settings

The Site card sets what every submission on your site gets.

Compute on for the whole site, running on Curvenote Shared Compute, with readers able to rerun figures.

Figure 2:Compute on for the whole site, running on Curvenote Shared Compute, with readers able to rerun figures.

  1. Compute on switches compute on or off for the whole site.

  2. Compute hub chooses which of your site’s hubs runs the code.

  3. Features choose what readers can do:

    • Run notebooks: run a notebook’s cells from its toolbar.

    • Run figures: rerun the code behind a figure, and interact with it.

    • Open in Jupyter: open the submission’s notebooks in a full Jupyter session.

    • Enforce MECA bundles only: build the compute environment from the submission’s MECA bundle instead of a GitHub repository. Submissions without a MECA bundle don’t get compute.

    • Open at the server root: open Jupyter at the top of the server’s files instead of at the notebook.

  4. Select Save changes. Discard puts back what was saved.

Your site’s settings aren’t enough on their own: authors still have to opt in with a jupyter: true flag to enable compute on their submission.

Settings for one kind of submission

Some kinds of submission need different settings: a report with no code doesn’t need compute, or a kind of submission might run on another hub. Submission Kind overrides lists only the kinds whose settings differ from the site’s, with what each one changes.

Working Group Reports have compute off; every other kind gets the site’s settings.

Figure 3:Working Group Reports have compute off; every other kind gets the site’s settings.

To add one, select Add override, choose the kind, and set what it changes:

An override for Working Group Reports: compute off, and everything else the same as the site.

Figure 4:An override for Working Group Reports: compute off, and everything else the same as the site.

Each setting is Same as the site, On or Off. A setting left the same as the site follows the site when you change it there. Compute hub can choose another of your site’s hubs for this kind. Select Save changes.

To change an override, open its menu (⋮) and select Edit override. Remove override gives the kind the site’s settings again.

Choose who can submit each kind in Submission Kinds, and how the site looks in Website & Design.