Skip to content

Commit bd90c82

Browse files
mpsijmniemela
authored andcommitted
Rename testdata.yaml to test_group.yaml
Fixes #376.
1 parent de30d29 commit bd90c82

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

spec/2023-07-draft.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ All constant sequences in the following files will be replaced by the value of t
396396
- input and output validators
397397
- included code
398398
- example submissions
399-
- `testdata.yaml`
399+
- `test_group.yaml`
400400
401401
Note that constants are also available in LaTeX problem statements via the dedicated command `\constant{name}`.
402402
@@ -495,7 +495,7 @@ For example, the files `secret/test.in` and `secret/test.ans` are associated wit
495495
The existence of the `.in` file declares the existence of the test case.
496496
If the test case exists, then an associated `.ans` file must exist while the others are optional.
497497
If the test case does not exist, then the other files must not exist.
498-
Note that a test case must not be named `*/testdata`, since `testdata.yaml` would then be configuration for both the test case and test group.
498+
Note that a test case must not be named `*/test_group`, since `test_group.yaml` would then be configuration for both the test case and test group.
499499
The table below summarizes the supported test data:
500500
501501
Extension | Described In | Summary
@@ -547,10 +547,10 @@ Any unknown keys should be treated as an error.
547547
548548
Key | Type | Default
549549
--------------------- | ------------------- | -------
550-
args | Sequence of strings | Inherited from [`testdata.yaml`](#test-data-groups), which defaults to empty sequence
551-
output_validator_args | Sequence of strings | Inherited from [`testdata.yaml`](#test-data-groups), which defaults to empty sequence
552-
input_validator_args | Sequence of strings or map of strings to sequences of strings | Inherited from [`testdata.yaml`](#test-data-groups), which defaults to empty sequence
553-
full_feedback | Boolean | Inherited from [`testdata.yaml`](#test-data-groups), which defaults to `false` in `secret` and `true` in `sample`
550+
args | Sequence of strings | Inherited from [`test_group.yaml`](#test-data-groups), which defaults to empty sequence
551+
output_validator_args | Sequence of strings | Inherited from [`test_group.yaml`](#test-data-groups), which defaults to empty sequence
552+
input_validator_args | Sequence of strings or map of strings to sequences of strings | Inherited from [`test_group.yaml`](#test-data-groups), which defaults to empty sequence
553+
full_feedback | Boolean | Inherited from [`test_group.yaml`](#test-data-groups), which defaults to `false` in `secret` and `true` in `sample`
554554
hint | String |
555555
description | String |
556556
@@ -586,12 +586,12 @@ If a specific order is desired, a numbered prefix such as `00`, `01`, `02`, `03`
586586
A subgroup must not have the same name as a test case in the same directory.
587587
For example, if the file `data/secret/huge.in` exists then the directory `data/secret/huge/` must not, and vice versa.
588588
589-
In each test data group, a YAML file `testdata.yaml` may be placed to specify how the result of the test data group should be computed.
590-
Some of the keys and their associated values will be inherited from the `testdata.yaml` in the closest ancestor group from the test case to the root `data` directory that has one.
591-
Others must be explicitly defined in the group's `testdata.yaml` file — otherwise they are set to the default values.
592-
If there is no `testdata.yaml` file in the root `data` group, one is implicitly added with the default values.
589+
In each test data group, a YAML file `test_group.yaml` may be placed to specify how the result of the test data group should be computed.
590+
Some of the keys and their associated values will be inherited from the `test_group.yaml` in the closest ancestor group from the test case to the root `data` directory that has one.
591+
Others must be explicitly defined in the group's `test_group.yaml` file — otherwise they are set to the default values.
592+
If there is no `test_group.yaml` file in the root `data` group, one is implicitly added with the default values.
593593
594-
The format of `testdata.yaml` is as follows:
594+
The format of `test_group.yaml` is as follows:
595595
596596
Key | Type | Default | Inheritance | Comments
597597
----------------------- | ----------------------------------- | --------------------------------------- | ----------------- | --------
@@ -627,7 +627,7 @@ In particular, for an existing feedback directory `dir`,
627627
<output_validator_program> tc.in tc.ans dir [arguments] < tc.out # MUST FAIL
628628
```
629629

630-
The directory `invalid_output` must be organized into a tree-like structure similar to `secret` and may contain arguments in `testdata.yaml` files that are passed to the validators.
630+
The directory `invalid_output` must be organized into a tree-like structure similar to `secret` and may contain arguments in `test_group.yaml` files that are passed to the validators.
631631

632632
### Valid Output
633633

@@ -644,7 +644,7 @@ In particular, for an existing feedback directory `dir`,
644644
<output_validator_program> tc.in tc.ans dir [arguments] < tc.out # MUST PASS
645645
```
646646

647-
The directory `invalid_output` must be organized into a tree-like structure similar to `secret` and may contain arguments in `testdata.yaml` files that are passed to the validators.
647+
The directory `invalid_output` must be organized into a tree-like structure similar to `secret` and may contain arguments in `test_group.yaml` files that are passed to the validators.
648648

649649
### Samples
650650

@@ -723,7 +723,7 @@ Otherwise the `.ans` is used as the `team_output`.
723723
Files in `data/sample/download` are never validated,
724724
although tooling may warn when there are inconsistencies between `download`, `statement`, and `data/sample/` itself.
725725

726-
Validation can be customized by specifying `input_validator_args` and `output_validator_args` in `data/sample/testdata.yaml`.
726+
Validation can be customized by specifying `input_validator_args` and `output_validator_args` in `data/sample/test_group.yaml`.
727727
These arguments are used when validating test cases in both `/data/sample` and `/data/sample/statement`.
728728

729729
## Generators
@@ -1181,7 +1181,7 @@ The goal of each submission is to maximize this score.
11811181
Only the `secret` group and its subgroups are scored.
11821182

11831183
Given a submission, scores are determined for test cases, test groups, and the submission itself (which is the score of the `secret` group).
1184-
The scoring behavior is configured for each test data group by the following arguments in the `scoring` dictionary of its `testdata.yaml`:
1184+
The scoring behavior is configured for each test data group by the following arguments in the `scoring` dictionary of its `test_group.yaml`:
11851185

11861186
Key | Type | Description
11871187
------------- | ----------------------------- | -----------
@@ -1274,7 +1274,7 @@ A static validator may be provided under the `static_validator` directory, simil
12741274

12751275
Each test group may define a static validation test case.
12761276
It is an error to define static validation test cases without providing a static validator.
1277-
A static validation test case is defined within a group's `testdata.yaml` file by specifying the key `static_validation`.
1277+
A static validation test case is defined within a group's `test_group.yaml` file by specifying the key `static_validation`.
12781278
If a map is specified, it may have two keys `args`, and in the case of scoring test groups, `score`.
12791279
The key `args` maps to a string which represents the additional arguments passed to the static validator in this group's static validation test case.
12801280
The key `score` maps to a float which represents both the maximum score achievable for the static validation test case and the default score assigned in case the static validator accepts the submission for that test case.

spec/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ sort: 1
3434
- Add `/submissions/rejected` directory.
3535
- Clarify working directories for submissions and validators.
3636
- Add `allow_writing_files` to `problem.yaml`.
37+
- Rename `testdata.yaml` to `test_group.yaml`.
3738

3839
## Legacy version (changes since beginning 2021)
3940

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package problem_package
22

3-
#testdata_settings: {
3+
#test_group_settings: {
44
input_validator_flags?: *"" | string | {[string]: string}
55
output_validator_flags?: *"" | string
6-
grading?: {
6+
grading?: {
77
score?: number
88
max_score?: number
99
aggregation?: "sum" | "min"
1010
}
1111
}
1212

13-
#testdata_settings
13+
#test_group_settings

0 commit comments

Comments
 (0)