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

Testcase format specifiers #262

Closed
Xyene opened this issue May 24, 2017 · 1 comment
Closed

Testcase format specifiers #262

Xyene opened this issue May 24, 2017 · 1 comment

Comments

@Xyene
Copy link
Member

Xyene commented May 24, 2017

We need an efficient way to specify testcases in a common format for a contest, where dynamic keys are not an optimal solution. For example, the regex \w+\.(?<batch>[0-9]+)-(?<case>[0-9]+)\.in matches most, if not all, COCI data.

That's a lot of data.

That's a lot of lines of init.yml saved.

There are probably more broad ways to approach this, but for the general case a simple regex would save a lot of work, even if it loses flexibility for more complex cases (dynamic keys are there for those!)

The following should be valid, after this ticket:

test_format_in: \w+\.(?<batch>[0-9]+)-(?<case>[0-9]+)\.in
test_format_out: \w+\.(?<batch>[0-9]+)-(?<case>[0-9]+)\.out
point_values: [10, 10, 20, 60]

Someday this may be generalized to support setting a format specifier for a specific test_cases node, but that is beyond the scope of this ticket. For this ticket, if test_format_(in|out) exists, then the test_cases node should be ignored.

@quantum5
Copy link
Member

Hmm, you mean \w+\.(?P<batch>[0-9]+)-(?P<case>[0-9]+)\.in? I mean, we aren't going to support perl syntax for something so trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants