diff --git a/bin/config.py b/bin/config.py index b10b0dfef..583fc852c 100644 --- a/bin/config.py +++ b/bin/config.py @@ -7,7 +7,7 @@ from collections.abc import Mapping, Sequence from typing import Any, Final, Literal, Optional -SPEC_VERSION: Final[str] = "2023-07-draft" +SPEC_VERSION: Final[str] = "2025-09" # return values RTV_AC: Final[int] = 42 diff --git a/bin/problem.py b/bin/problem.py index 60ddcbe99..2b3e8aac2 100644 --- a/bin/problem.py +++ b/bin/problem.py @@ -151,7 +151,7 @@ def __init__( assert isinstance(yaml_data, dict) # Known keys: - # (defaults from https://icpc.io/problem-package-format/spec/2023-07-draft.html#limits) + # (defaults from https://icpc.io/problem-package-format/spec/2025-09.html#limits) time_multipliers = parse_setting(yaml_data, "time_multipliers", dict[str, Any]()) parse_deprecated_setting(yaml_data, "time_multiplier", "ac_to_time_limit") @@ -229,7 +229,7 @@ def __init__( yaml_data["name"] = {"en": yaml_data["name"]} # Known keys: - # (defaults from https://icpc.io/problem-package-format/spec/2023-07-draft.html#problem-metadata) + # (defaults from https://icpc.io/problem-package-format/spec/2025-09.html#problem-metadata) self.problem_format_version: str = parse_setting( yaml_data, "problem_format_version", "legacy-icpc" ) diff --git a/bin/skel.py b/bin/skel.py index ced7cac1f..ca3c0897c 100644 --- a/bin/skel.py +++ b/bin/skel.py @@ -107,7 +107,7 @@ def new_problem() -> None: problem_type = "pass-fail" output_validator_args = f"{OutputValidator.args_key}: float_tolerance 1e-6" log("Using default float tolerance of 1e-6") - # Since version 2023-07-draft of the spec, the `custom` validation type is no longer explicit. + # Since version 2025-09 of the spec, the `custom` validation type is no longer explicit. # The mere existence of the output_validator(s)/ folder signals non-default output validation. if problem_type == "custom": custom_output = True @@ -155,7 +155,7 @@ def new_problem() -> None: if config.SPEC_VERSION not in (skeldir / "problem.yaml").read_text(): fatal( - f"new_problem only supports `skel` directories where `problem.yaml` has `version: {config.SPEC_VERSION}." + f"new_problem only supports `skel` directories where `problem.yaml` has `version: {config.SPEC_VERSION}`." ) problems_yaml = target_dir / "problems.yaml" diff --git a/bin/upgrade.py b/bin/upgrade.py index 7ef2ac1d6..360cdb1b8 100644 --- a/bin/upgrade.py +++ b/bin/upgrade.py @@ -325,7 +325,11 @@ def replace_hint_desc_in_test_cases(data: dict[str, Any], path: str) -> bool: for child_name, child_data in sorted(dictionary.items()): if not child_name: child_name = '""' - if child_data and generate.is_testcase(child_data): + if ( + child_data + and generate.is_testcase(child_data) + and isinstance(child_data, dict) + ): if "desc" in child_data: ryaml_get_or_add(child_data, "yaml")["description"] = child_data["desc"] ryaml_filter(child_data, "desc") diff --git a/doc/commands.md b/doc/commands.md index 7e0d27ad7..dfb7b1083 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -43,6 +43,7 @@ This lists all subcommands and their most important options. - [`bt solve_stats [--contest-id CONTESTID] [--post-freeze]`](#solve_stats) - [`bt sort`](#sort) - [`bt update_problems_yaml [--colors COLORS] [--sort]`](#update_problems_yaml) + - [`bt upgrade`](#upgrade) - [`bt tmp [--clean]`](#tmp) - `bt create_slack_channels --token xoxb-...` @@ -634,6 +635,11 @@ This file should contain a list of problems, with for every problem the keys `id Should be a comma-separated list of colors (hash-sign is optional), e.g.: `--colors ff0000,00ff00,0000ff`. - `--sort`: Sort the problems in `problems.yaml` and re-label them starting from `A` (or `X` if `contest.yaml` contains `test_session: True`). +## `upgrade` + +`bt upgrade` upgrades a problem from problem format version [`legacy`](https://icpc.io/problem-package-format/spec/legacy.html) +to [`2023-07-draft`](https://icpc.io/problem-package-format/spec/2023-07-draft.html). + ## `tmp` `bt tmp` prints the temporary directory that's used for all compilation output, run results, etc for the current problem or contest: diff --git a/headers/validation.h b/headers/validation.h index 25c4de183..c00232bb2 100644 --- a/headers/validation.h +++ b/headers/validation.h @@ -47,7 +47,7 @@ constexpr std::string_view generate_binary_substring = "generat"; // Only use non-capturing groups, and optimize the RegEx during initialization (improves run time at the cost of build time) constexpr auto regex_options = std::regex::nosubs | std::regex::optimize; -// Source: https://icpc.io/problem-package-format/spec/2023-07-draft.html +// Source: https://icpc.io/problem-package-format/spec/2025-09.html // Made stricter by: // - Disallowing '+' as sign (both at the start and in the exponent) // - Disallowing 'E' as exponent diff --git a/readme.md b/readme.md index a2bc083be..81b2173e4 100644 --- a/readme.md +++ b/readme.md @@ -13,10 +13,18 @@ time since I'm not aware of usage outside of BAPC yet. ## Installation -You can install the [bapctools-git AUR -package](https://aur.archlinux.org/packages/bapctools-git/), mirrored -[here](https://github.com/RagnarGrootKoerkamp/bapctools-git), or use the [Docker -image](#Docker). +> [!IMPORTANT] +> The latest version of BAPCtools is only compatible with problem format version +> [`2023-07-draft`](https://icpc.io/problem-package-format/spec/2023-07-draft.html). +> The [`bt upgrade` command](https://github.com/RagnarGrootKoerkamp/BAPCtools/blob/HEAD/doc/commands.md#upgrade) +> is a best-effort automated way to upgrade `legacy` problems to `2023-07-draft`. +> To use BAPCtools with `legacy` problems, +> you can use the [`legacy` branch](https://github.com/RagnarGrootKoerkamp/BAPCtools/tree/legacy) of this repository, +> which is no longer maintained. + +You can install the [bapctools-git AUR package](https://aur.archlinux.org/packages/bapctools-git/), +mirrored [here](https://github.com/RagnarGrootKoerkamp/bapctools-git), +or use the [Docker image](#Docker). Otherwise, clone this repository and install the required dependencies manually. (If you know how to make a Debian package, feel free to help out.) @@ -35,7 +43,7 @@ Otherwise, clone this repository and install the required dependencies manually. Optional dependencies, required for some subcommands: - The [ruamel.yaml library](https://pypi.org/project/ruamel.yaml/) via `pip install ruamel.yaml` or the `python-ruamel-yaml` Arch Linux package (`python3-ruamel.yaml` on Debian derivatives). - - This is only needed for commands that update `generators.yaml`. + - This is only needed for commands that update `generators.yaml` and `bt upgrade`. - The `latexmk` and `pdflatex` commands, provided by `texlive-bin` on Arch Linux and potentially some specific LaTeX packages (like tikz) provided by `texlive-extra`. @@ -77,7 +85,7 @@ Resource limits (memory limit/hard cpu time limit) are not supported. A docker image containing this git repo and dependencies, together with commonly used languages, is provided at -[ragnargrootkoerkamp/bacptools](https://hub.docker.com/r/ragnargrootkoerkamp/bapctools). +[ragnargrootkoerkamp/bapctools](https://hub.docker.com/r/ragnargrootkoerkamp/bapctools). This version may be somewhat outdated, but we intend to update it whenever dependencies change. Ping me if you'd like it to be updated. Alternatively, inside the Docker container, you can run `git -C /opt/BAPCtools pull` to update to the latest version of BAPCtools, diff --git a/skel/problem/problem.yaml b/skel/problem/problem.yaml index 7b1f2ca75..f3e50b4cd 100644 --- a/skel/problem/problem.yaml +++ b/skel/problem/problem.yaml @@ -1,5 +1,5 @@ -# Specification: https://icpc.io/problem-package-format/spec/2023-07-draft.html -problem_format_version: 2023-07-draft +# Specification: https://icpc.io/problem-package-format/spec/2025-09.html +problem_format_version: 2025-09 # 'pass-fail', 'interactive', 'multi-pass', or 'interactive multi-pass' type: {%type%} name: diff --git a/support/default_output_validator.cpp b/support/default_output_validator.cpp index 91b5df961..89c12f033 100644 --- a/support/default_output_validator.cpp +++ b/support/default_output_validator.cpp @@ -26,7 +26,7 @@ constexpr std::string_view WHITESPACE = " \f\n\r\t\v"; // Only use non-capturing groups, and optimize the RegEx during initialization (improves run time at the cost of build time) constexpr auto REGEX_OPTIONS = std::regex::nosubs | std::regex::optimize; -// Source: https://icpc.io/problem-package-format/spec/2023-07-draft.html +// Source: https://icpc.io/problem-package-format/spec/2025-09.html const std::regex FLOAT_REGEX("[+-]?([0-9]*\\.[0-9]+|[0-9]+\\.|[0-9]+)([Ee][+-]?[0-9]+)?", REGEX_OPTIONS); //============================================================================// diff --git a/support/schemas/generators_yaml_schema.json b/support/schemas/generators_yaml_schema.json index 7a29f5cab..9a5d2a850 100644 --- a/support/schemas/generators_yaml_schema.json +++ b/support/schemas/generators_yaml_schema.json @@ -102,12 +102,12 @@ "input_validator_flags": { "type": "string", "deprecated": true, - "description": "With 'problem_format_version: 2023-07-draft' in problem.yaml, use input_validator_args instead." + "description": "With 'problem_format_version: 2025-09' in problem.yaml, use input_validator_args instead." }, "output_validator_flags": { "type": "string", "deprecated": true, - "description": "With 'problem_format_version: 2023-07-draft' in problem.yaml, use output_validator_args instead." + "description": "With 'problem_format_version: 2025-09' in problem.yaml, use output_validator_args instead." } } }, diff --git a/test/problems/alternativeencryption/problem.yaml b/test/problems/alternativeencryption/problem.yaml index 765320dc5..6d535fb82 100644 --- a/test/problems/alternativeencryption/problem.yaml +++ b/test/problems/alternativeencryption/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: multi-pass name: en: Alternative Encryption diff --git a/test/problems/boolfind/problem.yaml b/test/problems/boolfind/problem.yaml index 400e10cd2..8ee823dc0 100644 --- a/test/problems/boolfind/problem.yaml +++ b/test/problems/boolfind/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: interactive name: boolfind credits: diff --git a/test/problems/constants/problem.yaml b/test/problems/constants/problem.yaml index 5b1678d6a..3427dfd04 100644 --- a/test/problems/constants/problem.yaml +++ b/test/problems/constants/problem.yaml @@ -1,5 +1,5 @@ -# Specification: https://icpc.io/problem-package-format/spec/2023-07-draft.html -problem_format_version: 2023-07-draft +# Specification: https://icpc.io/problem-package-format/spec/2025-09.html +problem_format_version: 2025-09 # 'pass-fail', 'interactive', 'multi-pass', or 'interactive multi-pass' type: pass-fail name: diff --git a/test/problems/different/data/secret/01.desc b/test/problems/different/data/secret/01.desc deleted file mode 100644 index 1ecb5e114..000000000 --- a/test/problems/different/data/secret/01.desc +++ /dev/null @@ -1 +0,0 @@ -A bunch of handwritten cases. diff --git a/test/problems/different/data/secret/01.yaml b/test/problems/different/data/secret/01.yaml new file mode 100644 index 000000000..eedf7f81c --- /dev/null +++ b/test/problems/different/data/secret/01.yaml @@ -0,0 +1 @@ +description: "A bunch of handwritten cases.\n" diff --git a/test/problems/different/data/secret/02_extreme_cases.desc b/test/problems/different/data/secret/02_extreme_cases.desc deleted file mode 100644 index 692c80e92..000000000 --- a/test/problems/different/data/secret/02_extreme_cases.desc +++ /dev/null @@ -1 +0,0 @@ -The four possible combinations of minimum/maximum values. diff --git a/test/problems/different/data/secret/02_extreme_cases.yaml b/test/problems/different/data/secret/02_extreme_cases.yaml new file mode 100644 index 000000000..530daec0a --- /dev/null +++ b/test/problems/different/data/secret/02_extreme_cases.yaml @@ -0,0 +1 @@ +description: "The four possible combinations of minimum/maximum values.\n" diff --git a/test/problems/different/problem.yaml b/test/problems/different/problem.yaml index dcaa03958..2798e977b 100644 --- a/test/problems/different/problem.yaml +++ b/test/problems/different/problem.yaml @@ -1,7 +1,7 @@ # problem.yaml -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: en: A Different Problem diff --git a/test/problems/divsort/problem.yaml b/test/problems/divsort/problem.yaml index 6a0c0092e..6ba617636 100644 --- a/test/problems/divsort/problem.yaml +++ b/test/problems/divsort/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 name: Division and sorting uuid: 8ee7605a-a0ba-8ce8-2a91-a6192b70141f license: unknown diff --git a/test/problems/fltcmp/problem.yaml b/test/problems/fltcmp/problem.yaml index 416dc982a..8455c410d 100644 --- a/test/problems/fltcmp/problem.yaml +++ b/test/problems/fltcmp/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: fltcmp credits: diff --git a/test/problems/generatorincludes/problem.yaml b/test/problems/generatorincludes/problem.yaml index a07282843..0624a8221 100644 --- a/test/problems/generatorincludes/problem.yaml +++ b/test/problems/generatorincludes/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: generatorincludes credits: diff --git a/test/problems/guess/problem.yaml b/test/problems/guess/problem.yaml index a176263f2..47264f3ce 100644 --- a/test/problems/guess/problem.yaml +++ b/test/problems/guess/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: interactive name: en: Guess the Number diff --git a/test/problems/guessnoeofcheck/problem.yaml b/test/problems/guessnoeofcheck/problem.yaml index 4c20d8142..efe4f345f 100644 --- a/test/problems/guessnoeofcheck/problem.yaml +++ b/test/problems/guessnoeofcheck/problem.yaml @@ -1,5 +1,5 @@ +problem_format_version: 2025-09 type: interactive -problem_format_version: 2023-07-draft source: Kattis uuid: 1bf54011-8f0f-44fb-8030-15d9c1583979 license: cc by-sa diff --git a/test/problems/hello/problem.yaml b/test/problems/hello/problem.yaml index a0c9b836c..a651e3c21 100644 --- a/test/problems/hello/problem.yaml +++ b/test/problems/hello/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: hello credits: diff --git a/test/problems/helloproblemtools/problem.yaml b/test/problems/helloproblemtools/problem.yaml index 89ccbed44..0511d5745 100644 --- a/test/problems/helloproblemtools/problem.yaml +++ b/test/problems/helloproblemtools/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 name: en: Hello World! sv: Hej Världen! diff --git a/test/problems/hellounix/problem.yaml b/test/problems/hellounix/problem.yaml index 31d0bc41c..948d7e113 100644 --- a/test/problems/hellounix/problem.yaml +++ b/test/problems/hellounix/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: hellounix credits: diff --git a/test/problems/hellowholeworld/problem.yaml b/test/problems/hellowholeworld/problem.yaml index c847c1cce..b3cdcb961 100644 --- a/test/problems/hellowholeworld/problem.yaml +++ b/test/problems/hellowholeworld/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: en: Hello, Whole World! diff --git a/test/problems/identity/problem.yaml b/test/problems/identity/problem.yaml index c1a013182..b804a0562 100644 --- a/test/problems/identity/problem.yaml +++ b/test/problems/identity/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: en: Identity diff --git a/test/problems/interactivemultipass/problem.yaml b/test/problems/interactivemultipass/problem.yaml index c71be23ed..96e6d80d4 100644 --- a/test/problems/interactivemultipass/problem.yaml +++ b/test/problems/interactivemultipass/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: - interactive - multi-pass diff --git a/test/problems/multipass/problem.yaml b/test/problems/multipass/problem.yaml index 500eb82bc..7c605bf52 100644 --- a/test/problems/multipass/problem.yaml +++ b/test/problems/multipass/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: multi-pass name: multi-pass credits: diff --git a/test/problems/testproblemconfig/problem.yaml b/test/problems/testproblemconfig/problem.yaml index e5342f032..7604c2b9e 100644 --- a/test/problems/testproblemconfig/problem.yaml +++ b/test/problems/testproblemconfig/problem.yaml @@ -1,4 +1,4 @@ -problem_format_version: 2023-07-draft +problem_format_version: 2025-09 type: pass-fail name: 'ABC XYZ' uuid: 58c89b2d-616c-4291-ab8a-710b4e6cb978 diff --git a/test/yaml/problem/invalid.yaml b/test/yaml/problem/invalid.yaml index 161b3f57a..25ca5d044 100644 --- a/test/yaml/problem/invalid.yaml +++ b/test/yaml/problem/invalid.yaml @@ -1,24 +1,24 @@ --- # Unknown keys yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 mumbo: jumbo warn: "found unknown problem.yaml key: mumbo in root" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 credits: mumbo: jumbo warn: "found unknown problem.yaml key: mumbo in `credits`" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 limits: mumbo: jumbo warn: "found unknown problem.yaml key: mumbo in `limits`" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 limits: time_multipliers: mumbo: jumbo @@ -27,13 +27,13 @@ warn: "found unknown problem.yaml key: mumbo in `limits.time_multipliers`" --- # UUID yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Invalid UUID, too short uuid: 12345678-abcd warn: "invalid uuid: 12345678-abcd" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Invalid UUID, not hexadecimal uuid: 12345678-abcd-efgh-ijkl-12345678 warn: "invalid uuid: 12345678-abcd-efgh-ijkl-12345678" @@ -41,12 +41,12 @@ warn: "invalid uuid: 12345678-abcd-efgh-ijkl-12345678" --- # Name yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: 42 warn: incompatible value for key 'name' in problem.yaml. SKIPPED. --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: en: 42 warn: incompatible value for key 'en' in problem.yaml. SKIPPED. @@ -54,33 +54,33 @@ warn: incompatible value for key 'en' in problem.yaml. SKIPPED. --- # Validation/type yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Incorrect validation validation: mumbo-jumbo warn: - "key 'validation' is deprecated, use 'type' instead. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Incorrect type type: mumbo-jumbo fatal: "problem.yaml: unrecognized value for 'type': mumbo-jumbo" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Deprecated validation validation: interactive warn: - "key 'validation' is deprecated, use 'type' instead. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Incorrect type type: mumbo jumbo fatal: "problem.yaml: unrecognized values for 'type': jumbo mumbo" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Incorrect type (list) type: - mumbo @@ -88,14 +88,14 @@ yaml: fatal: "problem.yaml: unrecognized values for 'type': jumbo mumbo" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Incorrect type (int) type: mumbo: jumbo fatal: "problem.yaml: 'type' must be a string or a sequence" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Incorrect type (dict) type: 42 fatal: "problem.yaml: 'type' must be a string or a sequence" @@ -103,14 +103,14 @@ fatal: "problem.yaml: 'type' must be a string or a sequence" --- # Limits yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Negative time limit limits: time_limit: -1 warn: "value for 'time_limit' in problem.yaml should be > 0 but is -1.0. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Time multiplier < 1 limits: time_multipliers: @@ -118,7 +118,7 @@ yaml: warn: "value for 'ac_to_time_limit' in problem.yaml should be >= 1 but is 0.9. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Only one pass for multi-pass type: multi-pass limits: @@ -126,7 +126,7 @@ yaml: warn: "value for 'validation_passes' in problem.yaml should be >= 2 but is 1. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Fractional passes for multi-pass type: multi-pass limits: @@ -134,7 +134,7 @@ yaml: warn: "incompatible value for key 'validation_passes' in problem.yaml. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: validation_passes for non-multi-pass problem limits: validation_passes: 3 @@ -143,13 +143,13 @@ warn: "limit: validation_passes is only used for multi-pass problems. SKIPPED." --- # Empty list yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: pass-fail type from empty type type: [] warn: "value for 'type' in problem.yaml should not be an empty list." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Empty list keywords: [] warn: "value for 'keywords' in problem.yaml should not be an empty list." @@ -157,7 +157,7 @@ warn: "value for 'keywords' in problem.yaml should not be an empty list." --- # Credits yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Cannot specify multiple authors in credits credits: - name: Alice @@ -166,7 +166,7 @@ yaml: warn: "incompatible value for key 'credits' in problem.yaml. SKIPPED." --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Cannot specify multiple authors in credits credits: authors: @@ -176,7 +176,7 @@ warn: "incompatible value for key 'name' in problem.yaml. SKIPPED." --- # Source yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Source must have a name source: - url: https://2024.nwerc.example/contest @@ -185,13 +185,13 @@ warn: "problem.yaml: 'name' is required in source" --- # Embargo yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Embargo is not a date embargo_until: not a date warn: "incompatible value for key 'embargo_until' in problem.yaml. SKIPPED." #--- #yaml: -# problem_format_version: 2023-07-draft +# problem_format_version: 2025-09 # name: Embargo date does not exist # embargo_until: 2025-02-29 # Note that this cannot be tested in this way, because the YAML parser already throws an error. diff --git a/test/yaml/problem/valid.yaml b/test/yaml/problem/valid.yaml index 6a773a2e9..22e100400 100644 --- a/test/yaml/problem/valid.yaml +++ b/test/yaml/problem/valid.yaml @@ -1,26 +1,26 @@ --- # Problem name tests yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Minimal eq: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: en: Minimal --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: en: Minimal --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: en: Minimal nl: Minimaal --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: en: Hello World! pt-BR: Olá mundo! @@ -31,7 +31,7 @@ yaml: --- # Problem type tests yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: pass-fail type type: pass-fail eq: @@ -40,7 +40,7 @@ eq: multi_pass: False --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: pass-fail type by default eq: custom_output: False @@ -48,7 +48,7 @@ eq: multi_pass: False --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: interactive type type: interactive eq: @@ -57,7 +57,7 @@ eq: multi_pass: False --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: multi-pass type type: multi-pass eq: @@ -66,7 +66,7 @@ eq: multi_pass: True --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: interactive multi-pass type type: interactive multi-pass eq: @@ -75,7 +75,7 @@ eq: multi_pass: True --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: multi-pass interactive type type: multi-pass interactive eq: @@ -86,7 +86,7 @@ eq: --- # Credits tests yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 credits: A. U. Thor eq: credits: @@ -95,7 +95,7 @@ eq: email: ~ --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 credits: A. U. Thor eq: credits: @@ -104,7 +104,7 @@ eq: email: author@example.com --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 credits: authors: A. U. Thor eq: @@ -114,14 +114,14 @@ eq: email: author@example.com --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 credits: authors: - name: A. U. Thor email: author@example.com --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 credits: authors: A. U. Thor translators: @@ -143,7 +143,7 @@ eq: --- # Source tests yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Source can be just a string source: NWERC 2024 eq: @@ -152,7 +152,7 @@ eq: url: ~ --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Source can be map source: name: NWERC 2024 @@ -162,7 +162,7 @@ eq: url: ~ --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Source can be map with two keys (name, url) source: name: NWERC 2024 @@ -173,7 +173,7 @@ eq: url: https://2024.nwerc.example/contest --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Many sources can be specified source: - name: NWERC 2024 @@ -192,14 +192,14 @@ eq: --- # License tests yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Default license is unknown and rights-less eq: license: unknown rights_owner: --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Rights-less license license: public domain eq: @@ -207,13 +207,13 @@ eq: rights_owner: --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Specify license and rights owner license: cc0 rights_owner: Bob --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Don't need rights_owner if credits are given license: cc0 credits: Bob @@ -222,14 +222,14 @@ eq: rights_owner: # Allowed to be empty --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Don't need rights_owner if credits.authors are given license: cc0 credits: authors: "Bob" --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Don't need rights_owner if source is given license: cc0 source: NWERC 2024 @@ -237,11 +237,11 @@ yaml: --- # Embargo tests yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Embargo date embargo_until: 2025-12-31 --- yaml: - problem_format_version: 2023-07-draft + problem_format_version: 2025-09 name: Embargo datetime embargo_until: 2025-12-31T23:59:59