vngshare is the stand-alone mode of ngshare. It stands for Vserver-like Notebook Grader Share. It is similar to vserver and allows easy testing. For details about vserver, see “Development History” below.
For detailed instructions, see Developer Installation.
pip3 install tornado jupyterhub sqlalchemy cd ngshare python3 vngshare.py [--host <bind_IP_address> [--port <port_number>]]
vngshare by default enables debug (e.g. verbose error output). It allows developers to view and reset database content easily. Users can be authenticated by simply passing in their username in GET / POST requests (see Authentication).
vngshare will create a database at
/tmp/ngshare.db and store uploaded files in
/tmp/ngshare/. Though there is no file system APIs like in vserver, unauthorized users can easily corrupt your data. So do not use in production.
The development of
ngshare (backend) requires collaborating with frontend development and requires solving technical issues, so our plan breaks the development into different stages.
vserver(see Project Structure) with Unix file system APIs. This allows frontend to forward all file system calls (e.g. read file, write file) to another server. It allows frontend to test the idea when backend is implementing next stage.
vserverwith nbgrader APIs (e.g. create course, release assignment). After this the frontend can begin large changes to the exchange mechanism by replacing file system calls with nbgrader API calls. At this point no authentication is made.
- Add authentication to
vservernbgrader APIs. To make things simple the frontend just needs to send the username, and the backend trusts what frontend does. During the first three stages, the backend can concurrently investigate how to set up a JupyterHub service.
vserver’s nbgrader APIs to
ngshare(final API server). There should be minimal effort in both backend and frontend as long as JupyterHub service can be set up correctly. The front end need to change the address of the server and send an API token instead of username; the backend need to copy the logic of
ngshare, fix any bugs and implement any features as frontend requests.
Currently we are at stage 5.
Historical Project Structure¶
This project used to has 2 parts
ngshareis the final API server that will be used in nbgrader in production. Written as Tornado Web Server and using SQLAlchemy.
vngsharestands for Vserver-like Notebook Grader Share. It has the same functionality as
ngsharebut is built as a stand-alone server (does not require JupyterHub environment), which makes testing easier.
vserveris a simple and vulnerable API server, written in Flask, that allows testing the project structurte and development of frontend without waiting for backend.
- Mar 7, 2020: Since
ngshareis already mature,
vserveris no longer maintained.
- May 9, 2020:
vserveris migrated to https://github.com/lxylxy123456/ngshare-vserver/
- Mar 7, 2020: Since