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

Test to run nbgrader in JupyterHub #2

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
23 changes: 23 additions & 0 deletions demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_VERSION=16.17.1

RUN apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install git sudo curl

# cache some of the bigger installs
RUN apt-get -y install python3-pip npm
RUN python3 -m pip install --upgrade pip jupyterhub

# Install nodejs v16 (not available yet on apt).
ENV NVM_DIR=/root/.nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"

RUN git clone https://github.com/jupyter/nbgrader /srv/nbgrader/nbgrader
WORKDIR /srv/nbgrader/nbgrader/demos
CMD ./restart_demo.sh demo_multiple_classes
64 changes: 64 additions & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Testing out nbgrader quickstart

```shell
python3 -m venv venv
pip install -r requirements.txt
mkdir exchange
```

```shell
nbgrader quickstart hydro-mod-1
cd hydro-mod-1
```

To `nbgrader_config.py` add `c.Exchange.root = "<cwd>/../exchange"
`

```
jupyter lab
```

## Create student version

```shell
mkdir -p submitted/student1
cp -r release/* submitted/student1/
```

## JupyterHub

Follow https://nbgrader.readthedocs.io/en/stable/configuration/jupyterhub_config.html#example-use-case-multiple-classes
and
https://github.com/jupyter/nbgrader/tree/main/demos/demo_multiple_classes

```
docker build -t nbgraderhub .
docker run -p 8000:8000 nbgraderhub
```

Goto http://localhost:8000

Login with
* instructor1: instructor1
* student1: student1

To edit assignemt
1. As instructor1
1. Goto Nbgrader -> Courses -> select course101
1. Authorize yourself
1. You can now edit the ps1 assigment in Formgrader

To fetch assigment

1. As student1
1. Goto Nbgrader -> Assignment list
1. Fetch ps1

# TODO

* [x] JupyterHub
* [x] Multiple users
* [x] Multiple courses
* R
* oauth or user sync
*
2 changes: 2 additions & 0 deletions demo/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jupyterlab
nbgrader
18 changes: 18 additions & 0 deletions technology_stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,18 @@ Autograding: Secure grading of student code.

https://okpy.org/

# cocalc

CoCalc is a virtual online workspace for calculations, research, collaboration and authoring documents. Your web browser is all you need to escape the confined space of your desktop and move to the cloud. This guide explains the features of CoCalc in depth and shows how you can use them productively.

https://cocalc.com/
https://github.com/sagemathinc/cocalc

# e2x

* https://github.com/DigiKlausur/e2xhub - A JupyterHub extension for simplifying course management for teaching and exams
* https://github.com/DigiKlausur/e2xgrader - e2xgrader is an add-on for nbgrader that adds functionality for teachers and students. e2xgrader introduces new cell types and tools for graders (per question grading view, authoring component, pen-based grading) and students (assignment toolbar, exam toolbar, restricted notebook extension).
* notebook extension, not a lab extension


# Brightspace
Expand Down Expand Up @@ -74,3 +82,13 @@ https://github.com/LibreTexts/ngshare - nbgrader sharing service
* https://github.com/jupyterhub/hubshare - A directory sharing service for JupyterHub
* https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/174 - nbgrader support in JupyterHub on Kubernetes

# GitHub Classroom

https://docs.github.com/en/education/manage-coursework-with-github-classroom/get-started-with-github-classroom

- can link with LMS google classroom, canvas, moodle, sakai

# abc-classroom

The abc-classroom package is designed for course instructors who are using GitHub Classroom to distribute and collect assignments to and from students.
https://abc-classroom.readthedocs.io/