Skip to content

cs161-staff/cron-jobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS 161 Cron Jobs (Miscellaneous Internal Logistics Scripts)

This repository holds an assortment of scripts and cron jobs deployed as Google Cloud Functions and run locally to handle miscellaneous internal infrastructure-related tasks.

Grading the Feedback Question (Google Cloud Function)

In main.py, there's a grade_feedback endpoint that's deployed as a Google Cloud Function in the cs161-logistics project (owned by cs161-staff@berkeley.edu). This pulls data from the CS 161 Feedback Manager spreadsheet, which defines a list of assignments as well as a Gradescope email/password. The spreadsheet contains an Apps-Script based cron job that hits the endpoint every ~5 minutes. The function grades the feedback question on the provided homework assignments, which enables students to see their assignments as "Graded" shortly after submitting.

Scraping the Feedback Question (Local Script)

To scrape the feedback question, run python scripts/scrape-feedback.py locally (after creating a virtualenv using python -m venv cron-jobs, activating using source cron-jobs/bin/activate, and installing requirements using pip install -r requirements.txt). This will prompt you for a username + password, and then scrape the feedback question and dump results into a text file called feedback.txt

Authenticating

To run both of these scripts, you'll need a valid service-account.json file in the root folder of this project. To get this file, create one here (or, download an existing service-account.json file from the deployed cloud function.)

About

Assorted internal logistics scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published