Skip to content
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

Properly load/export/snapshot feeds w/ mixed calendar definitions. #287

Merged
merged 4 commits into from
May 19, 2020

Conversation

evansiroky
Copy link
Contributor

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

Fixes ibi-group/datatools-server#313. When snapshotting feeds with a mixture of calendar definitions (some calendar + calendar_dates and some calendar_date only service_ids), the auto-generated calendar entries weren't being created thus causing problems in datatools. This fixes that and adds a test case to prove it.

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2020

Codecov Report

Merging #287 into dev will increase coverage by 0.00%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##                dev     #287   +/-   ##
=========================================
  Coverage     65.35%   65.35%           
  Complexity      880      880           
=========================================
  Files           135      135           
  Lines          6743     6749    +6     
  Branches        794      793    -1     
=========================================
+ Hits           4407     4411    +4     
- Misses         2037     2038    +1     
- Partials        299      300    +1     
Impacted Files Coverage Δ Complexity Δ
src/main/java/com/conveyal/gtfs/GTFS.java 55.26% <33.33%> (-0.30%) 12.00 <1.00> (ø)
.../com/conveyal/gtfs/loader/JdbcGtfsSnapshotter.java 82.29% <92.30%> (-0.07%) 26.00 <1.00> (-1.00)
src/main/java/com/conveyal/gtfs/loader/Table.java 85.18% <100.00%> (ø) 74.00 <0.00> (+1.00)
src/main/java/com/conveyal/gtfs/PatternFinder.java 85.22% <0.00%> (ø) 20.00% <0.00%> (ø%)

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 e7259b6...c83f7e0. Read the comment docs.

numRecordsSearched,
ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().greaterThan(0)
);
if (mismatches != null) {
if (!foundRecord && mismatches != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Conditional could probably use a comment.

@landonreed landonreed mentioned this pull request May 19, 2020
5 tasks
Copy link
Contributor

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

@evansiroky, this looks great. I have a few suggestions for improvement which I've included in #288. If those look good to you, we can go ahead and merge.

Copy link
Contributor

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

Looks great!

@landonreed landonreed merged commit cc1cbe6 into dev May 19, 2020
@landonreed landonreed deleted the mixed-calendar-definition-fix branch May 19, 2020 16:46
@landonreed landonreed mentioned this pull request May 19, 2020
7 tasks
@landonreed
Copy link
Contributor

🎉 This PR is included in version 6.0.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor: issue with calendar_dates feed
3 participants