Skip to content

Update event_type enum values to snake_case#247

Open
chrisyamas wants to merge 3 commits intodevelopfrom
feature/issue-235-event-naming
Open

Update event_type enum values to snake_case#247
chrisyamas wants to merge 3 commits intodevelopfrom
feature/issue-235-event-naming

Conversation

@chrisyamas
Copy link
Copy Markdown
Contributor

@chrisyamas chrisyamas commented Dec 30, 2025

Summary

In addition to being a normative change (that requires data migration for existing TIDES implementations) this is also a breaking change. This change updates passenger_events.event_type enum values from 'Sentence case' with spaces to snake_case for improved code compatibility.

Resolves #235

Changes

  • spec/passenger_events.schema.json updated event_type enum from Sentence case to snake_case. Note: In addition to the snake_case conversion, this PR also removes unnecessary characters/words from several of the enum values for the sake of conciseness. I am eager from TIDES Contributors for input on those modifications. Here are all enum value changes:
    • Vehicle arrived at stop --> vehicle_arrived,
    • Vehicle departed stop --> vehicle_departed
    • Door opened --> door_opened
    • Door closed --> door_closed
    • Passenger boarded --> passenger_boarded
    • Passenger alighted --> passenger_alighted
    • Kneel was engaged --> kneel_engaged
    • Kneel was disengaged --> kneel_disengaged
    • Ramp was deployed --> ramp_deployed
    • Ramp was raised --> ramp_raised
    • Ramp deployment failed --> ramp_failed
    • Lift was deployed --> lift_deployed
    • Lift was raised --> lift_raised
    • Individual bike boarded --> bike_boarded
    • Individual bike alighted --> bike_alighted
    • Bike rack deployed --> bike_rack_deployed
  • CHANGELOG.md added BREAKING change entry under [Unreleased] section

Reason for this change

The original 'Sentence case' enum values with spaces (e.g., "Vehicle arrived at stop") create unnecessary friction for some data manipulation operations in code. Values formatted in this way must be quoted in queries, cannot be used as variable names, and require case handling.

The new snake_case format (vehicle_arrived) will yield improvements including:

  • no quoting required in SQL queries, making for easier WHERE clauses
  • direct mapping to constants/enums within various programming languages
  • consistency with common naming conventions in data pipelines
  • alignment with other TIDES string conventions

- For reference, see related discussion in Issue #235 and Fall 2025 TIDES Issues Working Group notes from December 1 and December 10.

Review checklist

Per change management policy, the following must be met before feature branch changes can merge to develop branch:

  • All JSON files validate
  • Reviewed and approved by 2+ contributors or board members

@chrisyamas chrisyamas self-assigned this Dec 30, 2025
@chrisyamas chrisyamas requested review from a team as code owners December 30, 2025 17:40
@chrisyamas chrisyamas added 📄 spec Pertains to the specification itself 🔄 normative change A normative change requires approval of TIDES Board labels Dec 30, 2025
@chrisyamas chrisyamas added this to the v2.0 milestone Dec 30, 2025
@github-actions
Copy link
Copy Markdown
Contributor

@chrisyamas chrisyamas added the 📙 docs Elaborating or updating the documentation – inline or otherwise label Dec 30, 2025
@chrisyamas chrisyamas changed the base branch from main to develop January 2, 2026 16:05
@jlstpaul
Copy link
Copy Markdown
Contributor

jlstpaul commented Jan 2, 2026

This may end up being a separate issue, but I notice that we have bike_rack_deployed, but not bike_rack_raised. We also have ramp_failed but not lift_failed.

Copy link
Copy Markdown
Contributor

@botanize botanize left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Copy Markdown

@CTRAN-Sutinen CTRAN-Sutinen left a comment

Choose a reason for hiding this comment

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

Edit: the other events tables need to be updated as well for consistency's sake. if we are going to snake_case enums in passenger events, we should be doing the same in fare events as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📙 docs Elaborating or updating the documentation – inline or otherwise 🔄 normative change A normative change requires approval of TIDES Board 📄 spec Pertains to the specification itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛📄 – Improve event_type naming convention in passenger_events

4 participants