- Copy the
submit.py
file to the same folder as the Exercise Notebook. - Install the requirements on this repo
cd nb-grades-collector
pip install -r requirements.txt
- Update the requirements of the LU you're working on
cd Week\ 00/SLU00\ -\ Jupyter\ Notebook/
pip freeze > requirements.txt
- To enable students to submit a LU you'll need to add 3 cells at the bottom of the notebook, as follows (dont forget to set the learning unit number!):
Cell 1 markdown, read-only
# Submit your work!
To submit your work, [get your slack id](https://moshfeu.medium.com/how-to-find-my-member-id-in-slack-workspace-d4bba942e38c) and fill it in the `slack_id` variable.
Example: `slack_id = "UTS63FC02"`
Cell 2 code, Autograded Answer
### BEGIN SOLUTION
slack_id = "UTS63FC02"
### END SOLUTION
# slack_id =
Cell 3 code, Autograded tests, 0 points (dont forget to set the learning unit number!)
from submit import submit
assert slack_id is not None
submit(slack_id=slack_id, learning_unit=0)
This serves to collect the student slack ids so that we know who has submitted the LU.
curl --header "Content-Type: application/json" \
--request PUT \
--data '{"learning_unit": 0,"slack_id":"UTS63FC02","grade": 0,"metadata":{}}' \
http://localhost:8000/submit
curl --header "Content-Type: application/json" \
--request PUT \
--data '{"learning_unit": 0,"slack_id":"UTS63FC02","grade": 0,"metadata":{}}' \
http://localhost/submit
curl --header "Content-Type: application/json" \
--request PUT \
--data '{"learning_unit": 0,"slack_id":"UTS63FC02","grade": 0,"metadata":{}}' \
https://sub-nb-grades-collector.herokuapp.com/submit
uvicorn main:app --reload
docker build -t nb-grades-collector .
docker run --rm -it -p 80:80 nb-grades-collector
# first time
heroku stack:set heroku-20
heroku git:remote -a sub-nb-grades-collector
heroku stack:set container
heroku config:set DATABASE="wouldntyouliketoknow"
heroku config:set USER="wouldntyouliketoknow"
heroku config:set PASSWORD="wouldntyouliketoknow"
heroku config:set HOST="wouldntyouliketoknow"
# every time
git push heroku main
https://sub-nb-grades-collector.herokuapp.com/docs
heroku pg:psql