Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eric / Implemented Script For Automating Email Outreach Information #923

Merged
merged 6 commits into from
Feb 25, 2025

Conversation

EricWeng23
Copy link
Collaborator

@EricWeng23 EricWeng23 commented Feb 8, 2025

Summary

UPDATE 2:
Added the additional column 'Has course/professor use QMI before' to the output CSV file

  • Populated the column cells using data from past semester tracker csv (SP24)
    • Past semester csv located in scripts/tracker folder called past_semester.csv
  • Blacklisted courses that are not interested in using QMI

As documented the code for the status of columns are as follows:

  • 2 indicates that both the course and professor have used QMI before
  • 1 indicates that professor used QMI before
  • 0 indicates that course used QMI before
  • -1 indicates that neither the course nor the professor have used QMI before

Implementation Logic:

  1. If one of the professors teaching this semester has taught the course in the past, check whether the course decided to use QMI that past semester
    • If the course decided to use QMI, return 2 (since both professor and course used QMI)
    • If the course decided not to use QMI, then return the original status
  2. If a new professor teaching the course this semester, check if the course previously used QMI
    • If the course has decided to use QMI in the past semester, return 0 (course has used QMI, maybe not prof)
    • If the course decided not to use QMI, but historically the course or the past professors used QMI (0 or 2) return 0

Return -1 if the course is not tracked in spreadsheet.
Screenshot 2025-02-22 at 8 45 59 PM

UPDATE:
Additional Filtering Logic implemented:

  1. Filtered out Academic Support
  2. Filtered out Independent Research and Studies
  3. Filtered out Graduate Level courses
  4. Filtered out Cornell Tech Courses
  5. Filtered out courses with < 3 credits
    I still kept the bar for class level for <5000 because some 4k classes still has high demand for OH. Filtered out the Independent Research and PRJ instead.

From Nidhi's Comment regarding the Professor teaching multiple courses, it would happen under 2 cases:

  1. Professor ACTUALLY teaches 2 courses
  2. A course is crosslisted with other subject fields
    A check is implemented to combine these courses into one like below:
Screenshot 2025-02-18 at 12 01 07 AM

This PR focuses on implementing a script to automate and compile all the course informations (Course Number, Professors, Emails, etc) into a csv file. The data are fetched from the class roster API to retrieve the JSON files for all the relevant courses that QMI is tracking.

API URL: https://classes.cornell.edu/api/2.0/config/rosters.json
Note: The semester rosters are sorted in chronological order with the last element being the most recent SP25
Screenshot 2025-02-08 at 3 30 27 PM

Supply the appropriate URL parameters to get the corresponding data (e.g specify the subject)
Screenshot 2025-02-08 at 3 33 49 PM
Screenshot 2025-02-08 at 3 36 02 PM

NOTE: Class roster API does not supply the total class size of the course, so we are unable to filter with this property. Researched Course-Grab github repo, but its seems like they are only fetching the status code (open, closed, waitlist) of the courses instead of class sizes. Thus, course grab does not apply to our use case. An alternative is to webscrape from Student Center, but this is extremely difficult to implement as I had experimented already.

This only compiles the csv with the subjects courses we discussed, did not implement much of the filtering logic (only filtered out some graduate courses)

Test Plan

Tested locally via the terminal and verified that contents are written to the output csv file
Screenshot 2025-02-08 at 3 43 03 PM

Notes

Breaking Changes

None

  • I have updated the documentation accordingly.
  • My PR adds a @ts-ignore

@EricWeng23 EricWeng23 requested a review from a team as a code owner February 8, 2025 20:47
@dti-github-bot
Copy link
Member

dti-github-bot commented Feb 8, 2025

[diff-counting] Significant lines: 434.

Copy link
Contributor

@NIDHI2023 NIDHI2023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making such a speedy PR, it looks really good so far and the formatting for the csv seems to work out for most cases! I think other filter ideas could be setting the location to Ithaca instead of Cornell Tech, and some of the class levels could probably be lower since the 4000s tend to be research/project courses.
One other small note, in general when making branches, I'd suggest naming them like 'eric/"your task here"'

…taught by same Prof

- Implemented filters for academic support, project, research, independent studies
- Compiled only courses at Cornell Ithaca Campus
- Combined courses taught by same professor to prevent duplicate emailing
- Lowered class level to below 4k
@EricWeng23 EricWeng23 changed the title Implemented Script For Automating Email Outreach Information (In Progress) Eric / Implemented Script For Automating Email Outreach Information (In Progress) Feb 18, 2025
Copy link
Contributor

@NIDHI2023 NIDHI2023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic + csv file looks good, great work finishing up this PR! Before merging, just add INFO/CS 4152 to the blacklisted courses and the word "Thesis" to irrelevant_courses, I think that'd be useful for one last filtering edit

@EricWeng23 EricWeng23 merged commit c1b46d2 into master Feb 25, 2025
4 checks passed
@EricWeng23 EricWeng23 deleted the automate_email branch February 25, 2025 22:22
@NIDHI2023 NIDHI2023 mentioned this pull request Mar 3, 2025
2 tasks
@EricWeng23 EricWeng23 changed the title Eric / Implemented Script For Automating Email Outreach Information (In Progress) Eric / Implemented Script For Automating Email Outreach Information Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants