Skip to content

GTFS Spec Updates#312

Merged
landonreed merged 46 commits intodevfrom
gtfs-spec-updates
Aug 16, 2021
Merged

GTFS Spec Updates#312
landonreed merged 46 commits intodevfrom
gtfs-spec-updates

Conversation

@br648
Copy link
Copy Markdown
Collaborator

@br648 br648 commented Apr 21, 2021

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

This PR seeks to address the changes that have been made to the GTFS spec between Augusut 2018 and present. In particular, this PR is looking to enhance GTFS-lib by including conditionally required field checks which are now part of the GTFS spec. Initial work to determine the required updates can be reviewed here:

https://docs.google.com/document/d/1J_RlOx6wUml_fGhxX6pW1dr1-JKPMInia-73FTr3LJ8/edit

Current Breaking Changes

Routes -> continuous_pickup (New field)
Routes -> continuous_drop_off (New field)
Stop Times -> continuous_pickup (New field)
Stop Times -> continuous_drop_off (New field)
Stop -> platform_code (New field)
Stop -> wheelchair_boarding (Type change from String to Int)
Feed Info -> default_lang (New field)
Feed Info -> feed_contact_email (New field)
Feed Info -> feed_contact_url (New field)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 21, 2021

Codecov Report

Merging #312 (5e7f9d8) into dev (7ee0b08) will increase coverage by 0.47%.
The diff coverage is 70.40%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #312      +/-   ##
============================================
+ Coverage     66.15%   66.63%   +0.47%     
- Complexity      928      998      +70     
============================================
  Files           136      146      +10     
  Lines          6838     7217     +379     
  Branches        816      850      +34     
============================================
+ Hits           4524     4809     +285     
- Misses         2024     2109      +85     
- Partials        290      299       +9     
Impacted Files Coverage Δ
...java/com/conveyal/gtfs/loader/JdbcTableWriter.java 60.17% <0.00%> (-0.18%) ⬇️
...main/java/com/conveyal/gtfs/model/Attribution.java 0.00% <0.00%> (ø)
...main/java/com/conveyal/gtfs/model/Translation.java 0.00% <0.00%> (ø)
...rc/main/java/com/conveyal/gtfs/model/FeedInfo.java 59.67% <60.00%> (+0.06%) ⬆️
src/main/java/com/conveyal/gtfs/model/Stop.java 70.00% <66.66%> (+4.42%) ⬆️
...conveyal/gtfs/validator/NewTripTimesValidator.java 78.48% <70.00%> (+4.56%) ⬆️
.../java/com/conveyal/gtfs/loader/JdbcGtfsLoader.java 73.36% <75.00%> (+1.08%) ⬆️
...rc/main/java/com/conveyal/gtfs/model/StopTime.java 73.52% <75.00%> (+0.19%) ⬆️
src/main/java/com/conveyal/gtfs/model/Route.java 69.04% <80.00%> (+1.48%) ⬆️
.../loader/conditions/AgencyHasMultipleRowsCheck.java 81.25% <81.25%> (ø)
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ee0b08...5e7f9d8. Read the comment docs.

.idea/
target/

lambda$*.json No newline at end of file
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.

What's this for?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think this is related to running the snapshot related unit tests under Windows. Instead of using:

src\test\resources\snapshots\com\conveyal\gtfs\graphql\GTFSGraphQLTest\canFetchAgencies-0.json

the following is created instead:

src\test\resources\snapshots\com\conveyal\gtfs\graphql\GTFSGraphQLTest\lambda$canFetchAgencies$7-0.json

This is repeated for all 22 snapshot unit tests. I think it is related to how the paths are interpreted in Windows and maybe similar to a fix that was put in place for otp-middleware.

For now, I have added this to git ignore so I don't accidentally commit them. Once I have addressed I will remove.

Copy link
Copy Markdown
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

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

Please add tests for fetching GraphQL for the new tables as mentioned.

@br648 br648 requested a review from evansiroky June 10, 2021 09:02
@br648 br648 assigned evansiroky and unassigned br648 Jun 10, 2021
@evansiroky
Copy link
Copy Markdown
Contributor

Assigning to @binh-dam-ibigroup since there have been a few commits since his approval.

Copy link
Copy Markdown
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

LGTM. Please address the comment formatting and typo before merging. (My other code suggestions are not blocking.)

Copy link
Copy Markdown
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Please consider changes from #322 that should address ibi-group/datatools-server#387 (review).

Add stop_times linked fields continuous_pickup, continuous_drop_off.
Copy link
Copy Markdown
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Should be good now I think

@br648 br648 assigned landonreed and unassigned br648 Aug 2, 2021
@br648
Copy link
Copy Markdown
Collaborator Author

br648 commented Aug 2, 2021

@landonreed - TODO: add a BREAKING CHANGE commit.

pattern_stop.drop_off_type = 3;
pattern_stop.pickup_type = 4;
pattern_stop.continuous_pickup = 5;
pattern_stop.continuous_drop_off = 6;
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.

I don't think these invalid values should be allowed to be written to the database through JdbcTableWriter. But perhaps that's an issue for another day.

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