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

accept_score expected to be number, not string #235

Open
thorehusfeldt opened this issue Aug 29, 2023 · 1 comment
Open

accept_score expected to be number, not string #235

thorehusfeldt opened this issue Aug 29, 2023 · 1 comment

Comments

@thorehusfeldt
Copy link
Contributor

thorehusfeldt commented Aug 29, 2023

I may be wrong about this, but it looks as if verifyproblem expects the value of accept_score in testdata.yaml to be a number, not a string:

res.score = self.testcasegroup.config['accept_score']

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:

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.

@austrin
Copy link
Contributor

austrin commented Oct 16, 2023

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?

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

No branches or pull requests

2 participants