jupyter / nbgrader

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.28k stars 316 forks source link

Feature Request: Improve documentation for installation and configuration #1787

Open christina-seegers opened 1 year ago

christina-seegers commented 1 year ago

I am running a jupyterhub 2.3 and am trying to use nbgrader 0.8.2 .

And I run into errors, currently KeyError: "getpwnam(): name not found: 'grader-course101'" (although the server has a user of that name and the hub as well, it is part of the database the hub uses) .

It is really difficult to get everything to work. The demos folder helps, but I want nbgrader to run with an existing JupyterHub. And I guess I am missing some parts that would be set up by setup_demo or restart_demo. The documentation (https://nbgrader.readthedocs.io) is only suitable for older JupyterHubs and does not help if someone is stuck.

Please try to enhance the documentation so it is easier/possible to install and configure nbgrader. This should help a lot of people and could increase the number of users.

nbgrader --version

0.8.2

jupyterhub --version (if used with JupyterHub)

2.3

Expected behavior

a few hours of work to get nbgrader to run with JupyterHub 2.3

Actual behavior

after several hours still not running

Steps to reproduce the behavior

take a person new to nbgrader and JupyterHub and ask the person to install and configure nbgrader ...

analyticray commented 1 year ago

@christina-seegers Did you manage to get it installed? Can you please share what commands you use to solve the installation issue?

christina-seegers commented 1 year ago

Partly. I went through the setup_demo.sh and looked up every command in the utils.sh to implement them. Putting some like the general enable/disable part into the dockerfile for the hub and others into a bash-script to run after starting the hub where the users are present. In the later not only disable/enable of labextension/nbextension/serverextension s are present but also before that the creation of users and their storage structure (as in make_users of utils.sh). I also added all the create_course parts there and the distribution of the nbgrader_config.py to courses. I have to restart the hub then so that all the file structure is present upon starting. But it is still not working properly (#1794).

What I put into the dockerfile right after installation of nbgrader:

# Install global extensions, and disable them globally. We will re-enable
# specific ones for different user accounts in each demo.
# enabled the following lines as well to try to get hub running with grader 0.8.4
RUN jupyter nbextension install --symlink --sys-prefix --py nbgrader --overwrite
RUN jupyter nbextension disable --sys-prefix --py nbgrader
RUN jupyter labextension disable --level=sys_prefix nbgrader/assignment-list
RUN jupyter labextension disable --level=sys_prefix nbgrader/formgrader
RUN jupyter labextension disable --level=sys_prefix nbgrader/course-list
RUN jupyter labextension disable --level=sys_prefix nbgrader/create-assignment
RUN jupyter serverextension disable --sys-prefix --py nbgrader
    # Everybody gets the validate extension, however.
RUN jupyter nbextension enable --sys-prefix validate_assignment/main --section=notebook
RUN jupyter labextension enable --level=sys_prefix nbgrader/validate_assignment
RUN jupyter serverextension enable --sys-prefix nbgrader.server_extensions.validate_assignment

So I guess it is possible to create this set of commands - but I'm not there yet (and I've got to do some other stuff before I can try with nbgrader and the hub again).