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

Allow for viz_stops to be used without stop_code column for MGTFS #236

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

CBROWN-ONS
Copy link
Collaborator

…at: add new tests

Description

This PR fixes an issue where gtfs::multi_validation::MultiGtfsInstance.viz_stops() can not be used if any of the GTFS are missing a stop_code column. This has been fixed by synthesizing a stop_code column if it is not present.

Fixes
Fixes #234

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Test configuration details:

  • OS: Windows 10
  • Python version: 3.9.13
  • Java version: N/A
  • Python management system: Conda

Checklist:

  • My code follows the intended structure of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional comments

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa98494) 97.62% compared to head (fc6688e) 97.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #236   +/-   ##
=======================================
  Coverage   97.62%   97.63%           
=======================================
  Files          20       20           
  Lines        1770     1775    +5     
=======================================
+ Hits         1728     1733    +5     
  Misses         42       42           
Flag Coverage Δ
unittests 97.63% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@r-leyshon r-leyshon left a comment

Choose a reason for hiding this comment

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

Good approach - placeholder stop_code column is created but the original feed remains untouched. Test to prove the enhancement behaviour.

@r-leyshon r-leyshon self-assigned this Jan 22, 2024
@r-leyshon r-leyshon added this to the sprint 7 end milestone Jan 22, 2024
@r-leyshon r-leyshon merged commit 7cc6c62 into dev Jan 22, 2024
9 checks passed
@r-leyshon r-leyshon deleted the 234-viz_stops-fix-stop_code branch January 22, 2024 11:26
github-actions bot pushed a commit that referenced this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing stop_code column kills MultiGtfsInstance.viz_stops.
3 participants