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

refactor: add standardized constructor to notices #923

Merged
merged 2 commits into from
Jul 8, 2021

Conversation

lionel-nj
Copy link
Contributor

@lionel-nj lionel-nj commented Jul 7, 2021

This relates to #899

Summary:

This PR provides additional constructors to notices such as:

  • CsvParsingFailedNotice
  • DuplicateRouteNameNotice
  • BlockTripsWithOverlappingStopTimesNotice

This change is the following: in the process to extract metadata from the ValidationNotice subclasses, we intend to leverage the constructor's parameters. However, the aforementioned notices use take exceptions or GtfsRoute as parameters (from which information is extracted in the call to super). Having this additional constructor allows to directly extract information about the parameters for said notices from their constructor.

Expected behavior:

No changed 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
  • 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)

@lionel-nj lionel-nj requested a review from barbeau July 7, 2021 22:02
@lionel-nj lionel-nj self-assigned this Jul 7, 2021
@lionel-nj lionel-nj changed the title add standardized constructor to notices chore: add standardized constructor to notices Jul 7, 2021
@lionel-nj lionel-nj linked an issue Jul 7, 2021 that may be closed by this pull request
@lionel-nj lionel-nj changed the title chore: add standardized constructor to notices refactor: add standardized constructor to notices Jul 8, 2021
Copy link
Contributor

@maximearmstrong maximearmstrong left a comment

Choose a reason for hiding this comment

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

LGTM

@lionel-nj lionel-nj merged commit e817531 into master Jul 8, 2021
@lionel-nj lionel-nj deleted the task/standardize-notice-contructors branch July 8, 2021 19:41
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.

Ability to dump validator notice schemas to json or yaml
2 participants