Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix labextension plugin IDs in the docs and demos #1927

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions demos/restart_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ install_nbgrader () {
# Install global extensions, and disable them globally. We will re-enable
# specific ones for different user accounts in each demo.
jupyter labextension develop --overwrite .
jupyter labextension disable --level=sys_prefix nbgrader:assignment-list
jupyter labextension disable --level=sys_prefix nbgrader:formgrader
jupyter labextension disable --level=sys_prefix nbgrader:course-list
jupyter labextension disable --level=sys_prefix nbgrader:create-assignment
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:assignment-list
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:formgrader
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:course-list
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:create-assignment
jupyter server extension disable --sys-prefix --py nbgrader

# Everybody gets the validate extension, however.
jupyter labextension enable --level=sys_prefix nbgrader:validate-assignment
jupyter labextension enable --level=sys_prefix @jupyter/nbgrader:validate-assignment
jupyter server extension enable --sys-prefix nbgrader.server_extensions.validate_assignment

# Reset exchange.
Expand Down Expand Up @@ -114,4 +114,4 @@ restart_demo () {
jupyterhub
}

restart_demo "${@}"
restart_demo "${@}"
18 changes: 9 additions & 9 deletions demos/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ enable_create_assignment () {
HOME="/home/${USER}"
local runas="sudo -u ${USER}"

${runas} jupyter labextension disable --level=user nbgrader:create-assignment
${runas} jupyter labextension enable --level=user nbgrader:create-assignment
${runas} jupyter labextension disable --level=user @jupyter/nbgrader:create-assignment
${runas} jupyter labextension enable --level=user @jupyter/nbgrader:create-assignment
}

enable_formgrader () {
USER="${1}"
HOME="/home/${USER}"
local runas="sudo -u ${USER}"

${runas} jupyter labextension disable --level=user nbgrader:formgrader
${runas} jupyter labextension enable --level=user nbgrader:formgrader
${runas} jupyter labextension disable --level=user @jupyter/nbgrader:formgrader
${runas} jupyter labextension enable --level=user @jupyter/nbgrader:formgrader
${runas} jupyter server extension enable --user nbgrader.server_extensions.formgrader
}

Expand All @@ -84,8 +84,8 @@ enable_assignment_list () {
HOME="/home/${USER}"
local runas="sudo -u ${USER}"

${runas} jupyter labextension disable --level=user nbgrader:assignment-list
${runas} jupyter labextension enable --level=user nbgrader:assignment-list
${runas} jupyter labextension disable --level=user @jupyter/nbgrader:assignment-list
${runas} jupyter labextension enable --level=user @jupyter/nbgrader:assignment-list
${runas} jupyter server extension enable --user nbgrader.server_extensions.assignment_list
}

Expand All @@ -94,8 +94,8 @@ enable_course_list () {
HOME="/home/${USER}"
local runas="sudo -u ${USER}"

${runas} jupyter labextension disable --level=user nbgrader:course-list
${runas} jupyter labextension enable --level=user nbgrader:course-list
${runas} jupyter labextension disable --level=user @jupyter/nbgrader:course-list
${runas} jupyter labextension enable --level=user @jupyter/nbgrader:course-list
${runas} jupyter server extension enable --user nbgrader.server_extensions.course_list
}

Expand All @@ -112,4 +112,4 @@ create_course () {
${runas} nbgrader generate_assignment ps1
${runas} nbgrader release_assignment ps1
cd "${currdir}"
}
}
36 changes: 18 additions & 18 deletions nbgrader/docs/source/user_guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ The server extensions can be disabled individually by running::

The labextensions are all enabled by default, but can be disabled individually by running::

jupyter labextension disable nbgrader:formgrader
jupyter labextension disable nbgrader:assignment-list
jupyter labextension disable nbgrader:course-list
jupyter labextension disable nbgrader:create-assignment
jupyter labextension disable nbgrader:validate-assignment
jupyter labextension disable @jupyter/nbgrader:formgrader
jupyter labextension disable @jupyter/nbgrader:assignment-list
jupyter labextension disable @jupyter/nbgrader:course-list
jupyter labextension disable @jupyter/nbgrader:create-assignment
jupyter labextension disable @jupyter/nbgrader:validate-assignment

or enabled::

jupyter labextension enable nbgrader:formgrader
jupyter labextension enable nbgrader:assignment-list
jupyter labextension enable nbgrader:course-list
jupyter labextension enable nbgrader:create-assignment
jupyter labextension enable nbgrader:validate-assignment
jupyter labextension enable @jupyter/nbgrader:formgrader
jupyter labextension enable @jupyter/nbgrader:assignment-list
jupyter labextension enable @jupyter/nbgrader:course-list
jupyter labextension enable @jupyter/nbgrader:create-assignment
jupyter labextension enable @jupyter/nbgrader:validate-assignment

To work properly, the **assignment list**, **formgrader**, **course list** and **validate assignment**
extensions require both the labextension and server extension. The **create
Expand All @@ -65,13 +65,13 @@ There are a number of ways you may need to customize the installation:
- To install or enable the labextensions/server extension for just the
current user, run the above commands with ``--user`` instead of ``--sys-prefix``::

jupyter labextension enable --level=user nbgrader
jupyter labextension enable --level=user @jupyter/nbgrader
jupyter server extension enable --user --py nbgrader

- To install or enable the labextensions/server extension for all
Python installations on the system, run the above commands with ``--system`` instead of ``--sys-prefix``::

jupyter labextension enable --level=system nbgrader
jupyter labextension enable --level=system @jupyter/nbgrader
jupyter server extension enable --system --py nbgrader

Disabling extensions
Expand All @@ -81,21 +81,21 @@ You may want to only install one of the nbgrader extensions. To do this, follow
the above steps to install everything and then disable the extension you don't
need. For example, to disable the Assignment List extension::

jupyter labextension disable --level=sys_prefix nbgrader:assignment-list
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:assignment-list
jupyter server extension disable --sys-prefix nbgrader.server_extensions.assignment_list

or to disable the Create Assignment extension::

jupyter labextension disable --level=sys_prefix nbgrader:create-assignment
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:create-assignment

or to disable the Formgrader extension::

jupyter labextension disable --level=sys_prefix nbgrader:formgrader
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:formgrader
jupyter server extension disable --sys-prefix nbgrader.server_extensions.formgrader

or to disable the Course List extension::

jupyter labextension disable --level=sys_prefix nbgrader:course-list
jupyter labextension disable --level=sys_prefix @jupyter/nbgrader:course-list
jupyter server extension disable --sys-prefix nbgrader.server_extensions.course_list

For example lets assume you have installed nbgrader via `Anaconda
Expand All @@ -106,12 +106,12 @@ only want the *create assignment* extension available to a specific user and
not everyone else. First you will need to disable the *create assignment*
extension for everyone else::

jupyter labextension disable nbgrader:create-assignment
jupyter labextension disable @jupyter/nbgrader:create-assignment

Log in with the specific user and then enable the *create assignment* extension
only for that user::

jupyter labextension enable --level=user nbgrader:create-assignment
jupyter labextension enable --level=user @jupyter/nbgrader:create-assignment

Finally to see all installed labextensions/server extensions, run::

Expand Down
Loading