Add preserve stop times flag to avoid normalizing stop_sequence#304
Merged
landonreed merged 5 commits intodevfrom May 19, 2020
Merged
Add preserve stop times flag to avoid normalizing stop_sequence#304landonreed merged 5 commits intodevfrom
landonreed merged 5 commits intodevfrom
Conversation
…zing stop_sequence re conveyal/gtfs-lib#283
src/main/java/com/conveyal/datatools/editor/jobs/ExportSnapshotToGTFSJob.java
Show resolved
Hide resolved
| * stop_times or individual patterns. WARNING: enabling this flag for a feed and then attempting to edit patterns in | ||
| * complicated ways (e.g., modifying the order of pattern stops) could have unexpected consequences. | ||
| */ | ||
| public boolean preserveStopTimes; |
Contributor
There was a problem hiding this comment.
Rename to preserveStopTimesSequence and simplify the comment above.
binh-dam-ibigroup
requested changes
Apr 23, 2020
Contributor
binh-dam-ibigroup
left a comment
There was a problem hiding this comment.
Please see my comments.
Contributor
Author
|
OK, just waiting on the gtfs-lib release. I'll merge this once I've updated the pom. |
brings in preserveStopTimes flag for snapshotting
evansiroky
reviewed
Apr 29, 2020
| * zero-based and incrementing. This can muck with GTFS files that are linked to GTFS-rt feeds by stop_sequence, so | ||
| * this override flag currently provides a workaround for feeds that need to be edited but do not need to edit | ||
| * stop_times or individual patterns. WARNING: enabling this flag for a feed and then attempting to edit patterns in | ||
| * complicated ways (e.g., modifying the order of pattern stops) could have unexpected consequences. |
Contributor
There was a problem hiding this comment.
Seems like it'd be good to have some kind of UI warning for this.
Contributor
There was a problem hiding this comment.
oh, just read the PR description. Maybe edit this comment to say that there is no UI setting for this and it is not recommended to do this unless absolutely necessary.
evansiroky
approved these changes
Apr 29, 2020
Contributor
Author
|
🎉 This PR is included in version 3.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
devbefore they can be merged tomaster)Description
This PR adds a
FeedSource#preserveStopTimesflag to avoid the stop_sequence normalization that typically happens when making a snapshot for the editor.re conveyal/gtfs-lib#283.
Note: needs
pom.xmlupdated to gtfs-lib@6.0.2 in order for build to pass (conveyal/gtfs-lib#285 needs to be merged and released first).Note: there is no corresponding datatools-ui PR to set this flag (primarily just so that users don't "try this at home"). It must be done with a MongoDB update statement like:
db.getCollection('FeedSource').update({"_id": "YOUR_TEST_FEED_ID"}, {"preserveStopTimes": true})