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

fix: add exception for decreasing_or_equal_stop_time_distance #1895

Merged
merged 7 commits into from
Oct 21, 2024

Conversation

davidgamez
Copy link
Member

Summary:

The change ensures that the DecreasingOrEqualStopTimeDistanceNotice is not triggered in specific cases where certain identifiers are missing or present.

Closes #1882
Expected behavior:

Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit ac027d3
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1602 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 4.02 4.16 ⬆️+0.14
Median -- 1.39 1.47 ⬆️+0.08
Standard Deviation -- 11.57 11.87 ⬆️+0.30
Minimum in References Reports us-massachusetts-massachusetts-area-express-max-gtfs-431 0.51 0.62 ⬆️+0.11
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 302.78 296.31 ⬇️-6.48
Minimum in Latest Reports us-michigan-detroit-people-mover-gtfs-417 0.59 0.55 ⬇️-0.04
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 302.78 296.31 ⬇️-6.48
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 490.38 MiB 490.25 MiB ⬇️-130.77 KiB
Median -- 246.25 MiB 246.02 MiB ⬇️-232.12 KiB
Standard Deviation -- 894.81 MiB 880.52 MiB ⬇️-14.29 MiB
Minimum in References Reports us-michigan-detroit-people-mover-gtfs-417 34.04 MiB 34.06 MiB ⬆️+24.00 KiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.16 GiB 10.20 GiB ⬆️+34.99 MiB
Minimum in Latest Reports us-california-city-of-wasco-gtfs-1788 34.06 MiB 34.05 MiB ⬇️-16.00 KiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.16 GiB 10.20 GiB ⬆️+34.99 MiB

Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit a68711d
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1602 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 4.02 4.08 ⬆️+0.06
Median -- 1.39 1.45 ⬆️+0.06
Standard Deviation -- 11.64 11.57 ⬇️-0.07
Minimum in References Reports us-california-flex-v2-developer-test-feed-2-gtfs-1818 0.51 0.61 ⬆️+0.10
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 307.27 300.61 ⬇️-6.66
Minimum in Latest Reports us-michigan-detroit-people-mover-gtfs-417 0.58 0.54 ⬇️-0.04
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 307.27 300.61 ⬇️-6.66
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 479.68 MiB 501.02 MiB ⬆️+21.34 MiB
Median -- 248.02 MiB 246.09 MiB ⬇️-1.92 MiB
Standard Deviation -- 855.07 MiB 920.60 MiB ⬆️+65.53 MiB
Minimum in References Reports tr-kocaeli-metro-izmir-gtfs-1824 34.05 MiB 34.06 MiB ⬆️+8.00 KiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 9.77 GiB 10.15 GiB ⬆️+386.10 MiB
Minimum in Latest Reports us-michigan-detroit-people-mover-gtfs-417 34.09 MiB 34.04 MiB ⬇️-56.00 KiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 9.77 GiB 10.15 GiB ⬆️+386.10 MiB

@davidgamez davidgamez requested a review from jcpitre October 18, 2024 17:29
Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 5c8bab6
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1602 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 4.01 4.07 ⬆️+0.05
Median -- 1.38 1.44 ⬆️+0.06
Standard Deviation -- 11.55 11.51 ⬇️-0.04
Minimum in References Reports us-california-flex-v2-developer-test-feed-2-gtfs-1818 0.50 0.65 ⬆️+0.15
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 302.22 297.23 ⬇️-4.99
Minimum in Latest Reports us-california-city-of-wasco-gtfs-1788 0.54 0.51 ⬇️-0.02
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 302.22 297.23 ⬇️-4.99
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 496.02 MiB 479.85 MiB ⬇️-16.17 MiB
Median -- 246.38 MiB 245.99 MiB ⬇️-400.46 KiB
Standard Deviation -- 912.39 MiB 871.98 MiB ⬇️-40.41 MiB
Minimum in References Reports us-california-flex-v2-developer-test-feed-2-gtfs-1818 34.04 MiB 34.05 MiB ⬆️+16.00 KiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.04 GiB 10.10 GiB ⬆️+58.16 MiB
Minimum in Latest Reports us-massachusetts-massachusetts-area-express-max-gtfs-431 34.05 MiB 34.05 MiB ⬇️-8.00 KiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.04 GiB 10.10 GiB ⬆️+58.16 MiB

Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 4e7bb19
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1602 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 4.19 4.08 ⬇️-0.11
Median -- 1.40 1.45 ⬆️+0.05
Standard Deviation -- 13.49 11.33 ⬇️-2.16
Minimum in References Reports us-michigan-detroit-people-mover-gtfs-417 0.51 0.66 ⬆️+0.14
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 296.52 288.82 ⬇️-7.71
Minimum in Latest Reports us-florida-citrus-county-transit-gtfs-630 0.52 0.55 ⬆️+0.03
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 296.52 288.82 ⬇️-7.71
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 492.22 MiB 493.25 MiB ⬆️+1.03 MiB
Median -- 246.31 MiB 245.98 MiB ⬇️-337.25 KiB
Standard Deviation -- 882.97 MiB 882.04 MiB ⬇️-959.53 KiB
Minimum in References Reports ar-buenos-aires-subterraneos-de-buenos-aires-subte-gtfs-6 34.05 MiB 34.09 MiB ⬆️+48.00 KiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.13 GiB 10.09 GiB ⬇️-48.41 MiB
Minimum in Latest Reports us-michigan-detroit-people-mover-gtfs-417 34.07 MiB 34.05 MiB ⬇️-24.00 KiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.13 GiB 10.09 GiB ⬇️-48.41 MiB

if (prev.hasShapeDistTraveled()
GtfsStopTime prev = null;
GtfsStopTime curr;
for (int i = 0; i < stopTimeList.size(); ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: Now that it starts at 0 and i is not needed in the loop, for (var curr : stopTimeList) { would be enough.
Don't feel you have to change it.

Copy link
Member Author

@davidgamez davidgamez Oct 21, 2024

Choose a reason for hiding this comment

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

It's needed to set the first valid prev value.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I misread the feedback. Nice catch; yes, what you are proposing looks cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I don't see where the i is used, except for curr = stopTimeList.get(i);

Copy link
Contributor

@jcpitre jcpitre left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 7f858db
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1602 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1602 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 4.01 4.07 ⬆️+0.07
Median -- 1.39 1.43 ⬆️+0.04
Standard Deviation -- 11.50 11.47 ⬇️-0.03
Minimum in References Reports us-california-city-of-wasco-gtfs-1788 0.52 0.51 ⬇️-0.01
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 297.08 294.60 ⬇️-2.49
Minimum in Latest Reports us-california-city-of-wasco-gtfs-1788 0.52 0.51 ⬇️-0.01
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 297.08 294.60 ⬇️-2.49
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 491.08 MiB 476.58 MiB ⬇️-14.50 MiB
Median -- 248.47 MiB 246.35 MiB ⬇️-2.12 MiB
Standard Deviation -- 899.44 MiB 859.91 MiB ⬇️-39.53 MiB
Minimum in References Reports ph-unknown-hm-transport-inc-and-robinsons-malls-gtfs-1105 34.48 MiB 34.52 MiB ⬆️+41.45 KiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 9.82 GiB 10.13 GiB ⬆️+324.00 MiB
Minimum in Latest Reports us-oregon-hut-airport-shuttle-gtfs-635 34.48 MiB 34.48 MiB ⬇️0 bytes
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 9.82 GiB 10.13 GiB ⬆️+324.00 MiB

@davidgamez davidgamez merged commit e0f5217 into master Oct 21, 2024
335 checks passed
@davidgamez davidgamez deleted the fix/decreasing_or_equal_stop_time_distance branch October 21, 2024 17:36
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.

Flex: create exception for decreasing_or_equal_stop_time_distance
3 participants