A Jupyter extension to support integration with MarkUs.
This extension is available as a Python package. To install it:
$ pip install markus-jupyter-extension
Then install and enable the extension:
$ jupyter nbextension install --py --user markus-jupyter-extension
$ jupyter nbextension enable --py --user markus-jupyter-extension
Ensure that the MarkUs instances that this extension will integrate with have included the host name of the server that is running your Jupyter instance.
For example, if you are installing this extension to a Jupyter instance running at www.my_jupyter.com, then make sure that 'my_jupyter.com' is included in the jupyter_server.hosts
settings on MarkUs.
To begin development on the extension, first clone this repository:
$ git clone https://github.com/MarkUsProject/markus-jupyter-extension.git
Then go into the cloned repository and install the contained Python package in editable mode:
$ pip install -e .
You'll also need to install Jupyter notebook:
$ pip install notebook
To test whether your extension is working properly:
-
Start the MarkUs server (see MarkUs development instructions for details).
-
Login as a student in MarkUs and go to the "Account Settings" page using the dropdown at the top-right of the website.
-
Copy the API key for the student.
-
Run the Jupyter notebook server from the
examples
directory:$ cd examples $ jupyter notebook
-
The Jupyter front-end client should launch automatically in your web browser.
-
Create a new file called
markus-api-key.txt
and save the API key you copied in step 3. -
Open the demo notebook. Optionally, you can run the notebook cell to see the notebook's metadata (including the
"markus"
metadata) -
Click on the MarkUs icon button in the toolbar, which will submit the file to MarkUs.
-
If you then go back to MarkUs as the student, you should see the file submitted to the specified assignment.