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

Apply validator flags from testdata.yaml #355

Merged
merged 21 commits into from
Mar 10, 2024

Conversation

thorehusfeldt
Copy link
Collaborator

@thorehusfeldt thorehusfeldt commented Mar 8, 2024

Read flags for validators from testdata.yaml, such as

input_validator_flags:
  format_validator: case_sensitive
  topology: --max_connected_components 1
output_validator_flags: float_tolerance 1e-5
---
input_validator_flags: min_n 100 max_n 1000

and apply them correctly.

Interesting details that need to be kept in mind:

  • Input validators can (but don’t have to) be specified by validator name
  • There are inheritance rules (the closest applicable parental flags “win”)
  • The empty string are valid flags (relevant for inheritance)
  • Flags apply to included testcases at the point of their inclusion (rather than their origin)
  • Answer validators use output validator flags

@thorehusfeldt thorehusfeldt marked this pull request as draft March 8, 2024 09:56
@thorehusfeldt thorehusfeldt force-pushed the feat/testdataflags branch 4 times, most recently from 152d53e to 2e60e9e Compare March 9, 2024 09:26
@thorehusfeldt thorehusfeldt marked this pull request as ready for review March 9, 2024 17:50
Copy link
Owner

@RagnarGrootKoerkamp RagnarGrootKoerkamp left a comment

Choose a reason for hiding this comment

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

Looks great! just one comment

bin/problem.py Outdated Show resolved Hide resolved
@RagnarGrootKoerkamp RagnarGrootKoerkamp merged commit f9c23f3 into master Mar 10, 2024
4 checks passed
@RagnarGrootKoerkamp RagnarGrootKoerkamp deleted the feat/testdataflags branch March 10, 2024 10: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.

2 participants