cca / libraries_syllabus_notifications

send email reminders to upload syllabi from a CSV
Other
0 stars 0 forks source link

Faculty Syllabus Notifications

Take a CSV of missing syllabi VAULT report and send emails to faculty about which syllabi we expect from them. We skip notifying faculty for courses which do not require syllabi (e.g. Graduate Studio Practice) and work around problematic faculty values like "Staff" and "Standby".

Setup

Usual Python projects steps and configure a .env file with values for SMTP domain, port, user, and password (see example.env). Consult Mailgun or the Moodle outgoing mail configuration for these values.

> pipenv install
> cp reminders/example.env reminders/.env
> vim reminders/.env # edit in real values
> pipenv shell # run inside the virtual environment
> python cli.py -h # view usage information, see steps below

We also need access to the "integration files source" Google Storage Bucket. Once our CCA account has access permission, we use Application Default Credentials to allow this project access. This should be a matter of installing gcloud and running gcloud auth application-default login once.

Steps

Testing

There are pytest tests, but not much coverage. The testing utilities are written as pipenv scripts in the Pipfile.

pipenv run test # run tests
pipenv run coverage # test coverage
pipenv run report # coverage report

Other Notes

We can dry-run the app by setting a DEBUG environment variable (or .env value) to True. Run DEBUG=true python cli.py report.csv to test the script, for instance. The DEBUG env var can also be used to debug issues with Google Cloud authentication, e.g. DEBUG=True python reminders/update_usernames.py.

We can use "has_syllabus.py" to count the number of rows in a CSV of courses which have syllabi:

> python reminders/has_syllabus.py data/report.csv
760 courses have syllabi of 806 total in the CSV

Report Format

Report CSV should have the following columns with this exact header row

"Semester","Department Code","Course Title","Instructor(s)","Section"

Some of the columns are not used but these are the ones typically contained in the VAULT report.

LICENSE

ECL Version 2.0