Skip to content

Add get_first_trip_stop function for run_stop#306

Merged
felixguendling merged 1 commit intomotis-project:masterfrom
pialwis:feat/get_first_trip_stop
Jan 29, 2026
Merged

Add get_first_trip_stop function for run_stop#306
felixguendling merged 1 commit intomotis-project:masterfrom
pialwis:feat/get_first_trip_stop

Conversation

@pialwis
Copy link
Copy Markdown
Contributor

@pialwis pialwis commented Jan 29, 2026

This PR adds a get_first_trip_stop function for run_stop the same way get_last_trip_stop already exists.

I merely copied the structure of get_last_trip_stop, adapted it for the first stop case, and simplified a little bit the function (contrary to get_last_trip_stop that needs to do some index checks because of section_idx using stop_idx_ - 1, get_first_trip_stop only depends on stop_idx_ so less boundary checks need to be done).

Please proofread carefully my yet simple PR. I have little experience with all the nigiri code.

@felixguendling felixguendling merged commit 18ef898 into motis-project:master Jan 29, 2026
8 checks passed
@pialwis pialwis deleted the feat/get_first_trip_stop branch January 29, 2026 12:52
@pialwis
Copy link
Copy Markdown
Contributor Author

pialwis commented Jan 29, 2026

Just for information regarding this PR: I got it wrong. See #307. Turns out this function was already somewhat implemented in the code here.

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.

2 participants