-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update trip#shape_id and frequency stop_times on pattern updates #164
Merged
+597
−88
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a4d43a2
fix(shape-edits): update trip#shape_id if pattern value changes
landonreed 07e0e29
style: add new lines to reduce line width
landonreed f773972
fix(editor): update stop_time travel times when frequency pattern is …
landonreed 903aebd
refactor(editor): fix NPE
landonreed a9ad0f6
refactor: change method arg from Integer -> int
landonreed 040a9f8
test(JdbcTableWriter): add CRUD tests for trips and basic create test…
landonreed 667d3fc
refactor: address PR comments about inlining string literals
landonreed 55f2d87
refactor(writer): fix check for useFrequency when updating patterns o…
landonreed 6e9042f
test(JdbcTableWriter): improve writer tests for frequencies
landonreed 0fcf662
refactor: fix comment language from bad copypasta
landonreed 37fb468
test(writer): rename frequency trip crud test
landonreed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
335 changes: 271 additions & 64 deletions
335
src/main/java/com/conveyal/gtfs/loader/JdbcTableWriter.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.conveyal.gtfs.util; | ||
|
||
public class CalendarDTO { | ||
public Integer id; | ||
public String service_id; | ||
public Integer monday; | ||
public Integer tuesday; | ||
public Integer wednesday; | ||
public Integer thursday; | ||
public Integer friday; | ||
public Integer saturday; | ||
public Integer sunday; | ||
public String start_date; | ||
public String end_date; | ||
public String description; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.conveyal.gtfs.util; | ||
|
||
public class FrequencyDTO { | ||
public String trip_id; | ||
public Integer start_time; | ||
public Integer end_time; | ||
public Integer headway_secs; | ||
public Integer exact_times; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.conveyal.gtfs.util; | ||
|
||
public class PatternDTO { | ||
public Integer id; | ||
public String pattern_id; | ||
public String shape_id; | ||
public String route_id; | ||
public Integer direction_id; | ||
public Integer use_frequency; | ||
public String name; | ||
public PatternStopDTO[] pattern_stops; | ||
public ShapePointDTO[] shapes; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.conveyal.gtfs.util; | ||
|
||
public class PatternStopDTO { | ||
public Integer id; | ||
public String pattern_id; | ||
public String stop_id; | ||
public Integer default_travel_time; | ||
public Integer default_dwell_time; | ||
public Double shape_dist_traveled; | ||
public Integer drop_off_type; | ||
public Integer pickup_type; | ||
public Integer stop_sequence; | ||
public Integer timepoint; | ||
|
||
public PatternStopDTO (String patternId, String stopId, int stopSequence) { | ||
pattern_id = patternId; | ||
stop_id = stopId; | ||
stop_sequence = stopSequence; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.conveyal.gtfs.util; | ||
|
||
// TODO add fields | ||
public class ShapePointDTO { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.conveyal.gtfs.util; | ||
|
||
public class StopDTO { | ||
public Integer id; | ||
public String stop_id; | ||
public String stop_name; | ||
public String stop_code; | ||
public String stop_desc; | ||
public Double stop_lon; | ||
public Double stop_lat; | ||
public String zone_id; | ||
public String stop_url; | ||
public String stop_timezone; | ||
public String parent_station; | ||
public Integer location_type; | ||
public Integer wheelchair_boarding; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! This should be renamed to indicate that it also does some checking of the updating and deleting of some trips.