The sole purpose of this repository is to share my experiences in installing nbgrader-to-jupyterlab's lab-common branch. The original README file for common branch is README_original.md.
I am in an early stage of learning how to use git and GitHub, so there may be some unintended handlings of codes. I would be happy if you write any of your findings in the Issues, which I will fix as soon as I can.
This installation method worked at least for me.
- Operating system: mac os Catalina 10.15.4
- nbgrader --version: 0.7.0.dev
- jupyter notebook --version: 6.0.3
Disclaimer: Please use this code at your own risk.
Create a clean conda environment.
conda create -n nbgrader python==3.8.1 jupyterlab nodejs
conda activate nbgrader
Clone the codes and install it by following the instructions at nbgrader.readthedocs.io, development install.
git clone --single-branch --branch lab-common https://github.com/sdyang1729/nbgrader-to-jupyterlab
cd nbgrader-to-jupyterlab
pip install -r dev-requirements.txt -e .
Install all the labextensions by following the instructions at jupyterlab.readthedocs.io for developing JupyterLab extension.
cd ./nbgrader/labextensions/assignment_list
jlpm install
jupyter labextension install . --no-build
cd ../course_list
jlpm install
jupyter labextension install . --no-build
cd ../create_assignment
jlpm install
jupyter labextension install . --no-build
cd ../validate_assignment
jlpm install
jupyter labextension install . --no-build
cd ../../..
Install lab-serverextensions.
jupyter serverextension enable --user nbgrader.labextensions.assignment_list.assignment_list
jupyter serverextension enable --user nbgrader.labextensions.course_list.course_list
Remark:
-
One has to change lab_app.web_app to lab_app in the line 19 of the file nbgrader.labextensions.assignment_list.assignment_list.__init__.py. Otherwise, assignment_list labextension does not work as it is supposed to.
-
The following serverextensions are enabled.
- nbgrader.labextensions.assignment_list.assignment_list
- nbgrader.labextensions.course_list.course_list
-
validate_asignment lab-serextension seems incomplete. In this install, we use the original.
Install nb-serverextensions
jupyter serverextension enable --user nbgrader.server_extensions.formgrader
jupyter serverextension enable --user nbgrader.server_extensions.validate_assignment
jupyter serverextension enable --user nbgrader.labextensions.validate_assignment.validate_assignment
Remark:
-
I am installing the original formgrader and validate_assignment.
-
This step installs the following two serverextensions.
- nbgrader.server_extensions.formgrader
- nbgrader.server_extensions.validate_assignment
-
I modified
assignment_list/src/assignmentlist
a little bit so that we use the original validate_assignment nb-serverextension.
In the following, python/ is the root directory for a course where all the homeworks are stored.
cd /somewhere/in/my/computer/python
jupyter lab --watch
Enjoy!
-
If formgrader pops up but does not list the homeworks properly, check if your course directoty is well made.
-
If you change a file, then save it and perform the following command to make it work.
jupyter lab build