Skip to content

fix: standardize SSA Auditorium locations#143

Open
Deepak8858 wants to merge 2 commits intoUTDNebula:developfrom
Deepak8858:fix/issue-142-calendar-event
Open

fix: standardize SSA Auditorium locations#143
Deepak8858 wants to merge 2 commits intoUTDNebula:developfrom
Deepak8858:fix/issue-142-calendar-event

Conversation

@Deepak8858
Copy link
Copy Markdown

Standardize SSA 13.330 and SSA Auditorium to a single "SSA Auditorium" location for consistency.

Fixes #142

@mikehquan19 mikehquan19 requested a review from KBui4 March 30, 2026 18:59
Copy link
Copy Markdown
Contributor

@KBui4 KBui4 left a comment

Choose a reason for hiding this comment

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

It would be better to standardize to the room number not the room name, so SSA 13.330 instead of SSA Auditorium, since currently, the parser will incorrectly return "Other" for the event's room.

This is because the parser looks for the building abbreviation and room numbers first, as they are way more common and easier to parse with regular expressions. The parser only falls back to checking for building names and using the room name if those regular expressions fail to capture anything.

Specifically, the scraped locations tend to have the following structure:

  1. [building with abbreviation / random place], [building abbreviation] [room number / name]
  2. [building with abbreviation / random place]

So after failing to find a room number, the parser checks if rooms exist by splitting the string at the comma if one exists; otherwise, it assumes that without the comma indicating a room, it will just be the building name or some other place.

If someone specifically needs "SSA Auditorium", the whole location string is included in the Event itself with that info, or they could map the room number to the name.


// Standardize SSA Auditorium locations
if location != nil && (strings.Contains(*location, "SSA 13.330") || strings.Contains(*location, "SSA Auditorium")) {
standardized := "SSA Auditorium"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be standardized as "SSA 13.330".

Copy link
Copy Markdown
Contributor

@KBui4 KBui4 Mar 31, 2026

Choose a reason for hiding this comment

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

If the location really needed to be parsed to SSA Auditorium, then standardize after parsing the building and room, not before like here.

@KBui4
Copy link
Copy Markdown
Contributor

KBui4 commented Mar 31, 2026

Additionally, there are some other locations that can be standardized. There are some events with the location SP/N Gallery which fails to parse the building due to the /. Also, I have seen a few events with either Ballrooms or some combination of Ballrooms A, B, and C. The other auditoriums tend to be fine; they tend to include both the name and the room number. But atriums are the other places where the location might mix up room numbers and names, though typically the events mention atriums by name.

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.

Add information to ComentCalendarEvent

4 participants