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

Check for existence of column before running for more validators. #1888

Open
jcpitre opened this issue Oct 15, 2024 · 0 comments
Open

Check for existence of column before running for more validators. #1888

jcpitre opened this issue Oct 15, 2024 · 0 comments
Labels
enhancement New feature request or improvement on an existing feature status: Needs triage Applied to all new issues

Comments

@jcpitre
Copy link
Contributor

jcpitre commented Oct 15, 2024

Describe the problem

In PR #1875 we added logic so we don't have to call some validators if the columns related to the validator do not exist.

This was implement for some validators, but not all. We should add this check to all validators that would benefit.

This was implemented in #1875

  • For generated validators:
    • Mixed case validators will not be run if the column that is annotated with MixedCase is not present
    • Foreign key validators will not be run if the column containing the foreign key is not present
  • Custom validators:
    • StopTimesGeographyIdPresenceValidator will not be run in none of stop_is, location_id and location_group_id is present
    • AttributionWithoutRoleValidator will not be run if none of isProducer, isOperator and isAuthority columns are present
    • StopNameValidator validator will not be run if none of stopName and locationType is present

You can find a list of all validators here.

Proposed solution

See above

Alternatives you've considered

No response

Additional context

No response

@jcpitre jcpitre added enhancement New feature request or improvement on an existing feature status: Needs triage Applied to all new issues labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request or improvement on an existing feature status: Needs triage Applied to all new issues
Projects
None yet
Development

No branches or pull requests

1 participant