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

feat: Tests for invalid data in GTFS dataset #115

Merged
merged 8 commits into from
Sep 20, 2023

Conversation

CBROWN-ONS
Copy link
Collaborator

Description

closes #66

This PR provides testing for cases where invalid data has been introduced into the GTFS tables. This includes invalid and non-matching IDs. The tests ensure that these cases are identified and relayed back to the user through gtfs_kit.feed.validate() or in this case GtfsInstance().is_valid().

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

@CBROWN-ONS CBROWN-ONS linked an issue Aug 31, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (87216ed) 87.27% compared to head (e847951) 87.27%.
Report is 16 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #115   +/-   ##
=======================================
  Coverage   87.27%   87.27%           
=======================================
  Files          11       11           
  Lines         896      896           
=======================================
  Hits          782      782           
  Misses        114      114           
Flag Coverage Δ
unittests 87.27% <ø> (ø)

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.

@CBROWN-ONS CBROWN-ONS added small technical debt A better way is available. Fix later approach has been adopted. GTFS labels Sep 1, 2023
@r-leyshon r-leyshon self-assigned this Sep 19, 2023
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.

@CBROWN-ONS please see comments in PR. Happy to have a call if anything is unclear, let me know.

tests/gtfs/test_unmatched_id_warnings.py Outdated Show resolved Hide resolved
@r-leyshon r-leyshon merged commit 4fe7c03 into dev Sep 20, 2023
11 checks passed
@r-leyshon r-leyshon deleted the 66-check_unmatched_id_warnings-unit-test branch September 20, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GTFS small technical debt A better way is available. Fix later approach has been adopted.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn notebooks/gtfs/check_unmatched_id_warnings.py into a unit test
3 participants