Closed mpsijm closed 9 months ago
Do we want to zero-pad the samples like the secret cases or it is sufficient to have secret cases start at |samples|+1? And what is the expected behaviour if there are other folders in /data
?
The only way I can see this work with the current decisions about automatic numbering is to introduce a setting for it, maybe as part of #testgroup/#config
in the schema:
data:
secret:
numbering:
start: 3
padding: False
data:
foo: my_generator 344
We’d probably want to invent reserved values for start
like start: sibling
.
This seems to require a lot of thought to do well. (An altenative is to have a single rule that kicks in exactly if the directory structure is data/secret/list_of_cases
and data/sample/list_of_cases
and nothing else.
@thorehusfeldt Currently auto-numbering is implemented as follows:
generators.yaml
.So this already works for samples. I think all that's needed is to change the template from
samples:
data:
1: ...
2: ...
to
samples:
data:
- '': ...
- '': ...
This will left pad with zeros, but I think that's OK? (Or would that leak information to contestants who can see their filenames in the UI? I would hope those are not leaked but am not sure.)
You’re right—the default setting already provides the solicited functionality!
Maybe this is a non-issue.
I want to note a few thinks
sample.zip
contains the file names?001.in
(but that's easy to fix)generator.yaml
?We could also hardcode that samples specifically not padded? That sounds simpler.
samples.zip
probably should rename cases to be (zero-padded?) 1
to n
.generators.yaml
example and/or templates.It seems like there is not much to do here:
generators.yaml
in skel already looks good to me.generators.yaml
in doc (?)Thanks for checking :)
I'd say test problems can stay as they are, but updating doc/generators.yaml sgtm.
I think changing the generator.yaml
in doc is not that easy... it mainly explains what can be done, and right now automatic numbering is the last point but samples are the first point. Therfore, I am not sure what we want here...
ah fair enough; then nothing left here I suppose, apart from making sure we actually do this next season.
We should auto-number samples so that DOMjudge's internal numbering is the same as ours (so if there are two samples,
3.in
would be the first secret case).When fixing this, please double-check that samples with leading zeroes are correctly picked up by the PDF. We've had some instances where we a file like
001.interaction
is not picked up by the PDF.