You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q: The contents of a testcase’s testdata.yaml file be overwritten by the entries in #testcase/"testdata.yaml". Should this happen
for the entire file or
for the individual keys of testdata.yaml (such as grading or input_validator_flags).
This makes a difference when something else also has set some keys of testdata.yaml.
Example
A hypothetical top-level po-scoring key in generators.yaml takes a list of integers for implementing the scoring tradition of the Swedish Informatics Olympiad PO like this:
po-scoring:
- 12# score for testgroup 1, tiny inputs (brute-force should pass)
- 24# score for testgroup 2 (straightforward quadratic-time DP)
- 64# score for testgroup 3 (needs FFT)
From this, a (hypothetical) tool generates the necessary testdata.yaml entries in the rest of the testdata (this involves setting grading, grader_flags (to min, ignore_sample, sum), accept_score, and range in various ways at data, data/sample, data/secret, and data/secret/group1, …2 and …3.) All of this is simple but fragile, and the tool just takes care of it.
In addition, the generators.yaml file might include an entry like
data:
secret:
group1: # brute-force should passtestdata.yaml:
input_validator_flags: --max_n 20
Expected behaviour
I would expect the following contents of data/secret/group1/testdata.yaml:
For each key k specified by a #testdata/problem.yaml entry, its value defines the value of the testdata.yamlfile in the given testcase. If no such file yet exists, create it. It is an error(? warning?) if a file already exists that already specifies k.
Current documentation
Here’s what we say right now:
testdata.yaml: Optional yaml configuration that will be copied to testdata.yaml in this directory.
The text was updated successfully, but these errors were encountered:
In a Nutshell
Q: The contents of a testcase’s
testdata.yaml
file be overwritten by the entries in#testcase/"testdata.yaml"
. Should this happentestdata.yaml
(such asgrading
orinput_validator_flags
).This makes a difference when something else also has set some keys of
testdata.yaml
.Example
A hypothetical top-level
po-scoring
key ingenerators.yaml
takes a list of integers for implementing the scoring tradition of the Swedish Informatics Olympiad PO like this:From this, a (hypothetical) tool generates the necessary
testdata.yaml
entries in the rest of the testdata (this involves settinggrading
,grader_flags
(tomin
,ignore_sample
,sum
),accept_score
, andrange
in various ways atdata
,data/sample
,data/secret
, anddata/secret/group1
,…2
and…3
.) All of this is simple but fragile, and the tool just takes care of it.In addition, the
generators.yaml
file might include an entry likeExpected behaviour
I would expect the following contents of
data/secret/group1/testdata.yaml
:Possible semantics
For each key k specified by a
#testdata/problem.yaml
entry, its value defines the value of thetestdata.yaml
file in the given testcase. If no such file yet exists, create it. It is an error(? warning?) if a file already exists that already specifies k.Current documentation
Here’s what we say right now:
The text was updated successfully, but these errors were encountered: