Kattis / problem-package-format

Kattis problem package format specification
https://www.kattis.com/problem-package-format
9 stars 14 forks source link

Move more information to `<testcase>.yaml` #300

Closed niemela closed 2 weeks ago

niemela commented 1 month ago

<testcase>.args would definitely be better in <testcase>.yaml. <testcase>.hint and <testcase>.description would possibly be better. Input and output validator flags are also worth considering.

Tagl commented 1 month ago

Related issue is should args be a string or a sequence of strings? Sequence seems more flexible without worrying about whitespace. Then each element of the sequence is quoted properly and sent as its own argument. Could also allow both.

niemela commented 1 month ago

Related issue is should args be a string or a sequence of strings?

I was definitely thinking "string".

Sequence seems more flexible without worrying about whitespace. Then each element of the sequence is quoted properly and sent as its own argument.

That is very true.

Could also allow both.

Also true.

eldering commented 1 month ago

Related issue is should args be a string or a sequence of strings?

I was definitely thinking "string".

Sequence seems more flexible without worrying about whitespace. Then each element of the sequence is quoted properly and sent as its own argument.

That is very true.

Could also allow both.

Also true.

My first thinking was: go for both to make it easy to specify arguments briefly and support arguments with spaces using a sequence. But then there's a different semantic how to interpret a single string versus a string in a sequence. So on second thought I'd lean towards only allowing a sequence of strings, where each string is passed as a literal single argument, including any whitespace in it.

Tagl commented 1 month ago

I am writing a PR for this