Most testdata.yaml files encountered in the wild look like this:
accept_score: 10
range: 0 10
but this actually violates the specification and should be
accept_score: "10"
range: 0 10
which proper, schema-aware editing tool would actually flag (mine does). Note that 0 10 is correctly turned into a string, but 10 looks like a number to YAML so it remains a number.
This may only be a temporary problem and not worth fixing; the proper type for accept_score should be numerical anyway and the proplem package format is moving in that direction.
I'm inclined to agree that this is a wontfix due to problemtools just being ahead of the times - accept_score should clearly be a numerical field, right?
I may be wrong about this, but it looks as if
verifyproblem
expects the value ofaccept_score
intestdata.yaml
to be a number, not a string:https://github.com/Kattis/problemtools/blob/307d417056e8dc8581db96572e945868e0559454/problemtools/verifyproblem.py#L289
The specification, however, has
accept_score
to be a string, see https://www.kattis.com/problem-package-format/spec/legacy.html#test-data-groups .Most
testdata.yaml
files encountered in the wild look like this:but this actually violates the specification and should be
which proper, schema-aware editing tool would actually flag (mine does). Note that
0 10
is correctly turned into a string, but10
looks like a number to YAML so it remains a number.This may only be a temporary problem and not worth fixing; the proper type for
accept_score
should be numerical anyway and the proplem package format is moving in that direction.