Skip to content

Commit 95db0d4

Browse files
committed
Remove all references to the no-longer-existing 2023-07-draft
1 parent 503f26d commit 95db0d4

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

bin/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Mapping, Sequence
88
from typing import Any, Final, Literal, Optional
99

10-
SPEC_VERSION: Final[Sequence[str]] = ["2025-09", "2023-07-draft"]
10+
SPEC_VERSION: Final[str] = "2025-09"
1111

1212
# return values
1313
RTV_AC: Final[int] = 42

bin/problem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def __init__(
236236

237237
if self.problem_format_version.startswith("legacy"):
238238
fatal("legacy is no longer supported, try running 'bt upgrade'")
239-
elif self.problem_format_version not in config.SPEC_VERSION:
239+
elif self.problem_format_version != config.SPEC_VERSION:
240240
fatal(f"unrecognized problem_format_version: {self.problem_format_version}")
241241

242242
parse_deprecated_setting(yaml_data, "validation", "type")

bin/skel.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,9 @@ def new_problem() -> None:
153153
skeldir, preserve_symlinks = get_skel_dir(target_dir)
154154
log(f"Copying {skeldir} to {target_dir / dirname}.")
155155

156-
skel_yaml = (skeldir / "problem.yaml").read_text()
157-
if not any(version in skel_yaml for version in config.SPEC_VERSION):
156+
if config.SPEC_VERSION not in (skeldir / "problem.yaml").read_text():
158157
fatal(
159-
f"new_problem only supports `skel` directories where `problem.yaml` has version: {config.SPEC_VERSION[0]}."
158+
f"new_problem only supports `skel` directories where `problem.yaml` has `version: {config.SPEC_VERSION}`."
160159
)
161160

162161
problems_yaml = target_dir / "problems.yaml"

bin/upgrade.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ def upgrade_test_group_yaml(problem_path: Path, bar: ProgressBar) -> None:
199199

200200

201201
def upgrade_generators_yaml(problem_path: Path, bar: ProgressBar) -> None:
202-
print(problem_path)
203202
generators_yaml = problem_path / "generators" / "generators.yaml"
204203
if not generators_yaml.is_file():
205204
return
@@ -428,10 +427,10 @@ def upgrade_problem_yaml(problem_path: Path, bar: ProgressBar) -> None:
428427

429428
if (
430429
"problem_format_version" not in data
431-
or data["problem_format_version"] != config.SPEC_VERSION[0]
430+
or data["problem_format_version"] != config.SPEC_VERSION
432431
):
433432
bar.log("set 'problem_format_version' in problem.yaml")
434-
data.insert(0, "problem_format_version", config.SPEC_VERSION[0])
433+
data.insert(0, "problem_format_version", config.SPEC_VERSION)
435434

436435
if "validation" in data:
437436
if "type" in data:

test/problems/constants/problem.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Specification: https://icpc.io/problem-package-format/spec/2023-07-draft.html
1+
# Specification: https://icpc.io/problem-package-format/spec/2025-09.html
22
problem_format_version: 2025-09
33
# 'pass-fail', 'interactive', 'multi-pass', or 'interactive multi-pass'
44
type: pass-fail

0 commit comments

Comments
 (0)