-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add preserve stop times flag to avoid normalizing stop_sequence #304
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; |
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.
Rename to preserveStopTimesSequence
and simplify the comment above.
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.
Please see my comments.
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.
Cool
OK, just waiting on the gtfs-lib release. I'll merge this once I've updated the pom. |
brings in preserveStopTimes flag for snapshotting
* 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. |
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.
Seems like it'd be good to have some kind of UI warning for this.
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.
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.
🎉 This PR is included in version 3.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Checklist
dev
before they can be merged tomaster
)Description
This PR adds a
FeedSource#preserveStopTimes
flag to avoid the stop_sequence normalization that typically happens when making a snapshot for the editor.re conveyal/gtfs-lib#283.
Note: needs
pom.xml
updated to [email protected] 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})