Skip to content

Commit f0fbfcf

Browse files
committed
Update check_game_map function: refine validation for Draw.io XML format
1 parent 6e6fd1e commit f0fbfcf

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

‎.github/ci/check_starter.py‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,18 @@ def check_storyboard(checks: StarterChecks) -> None:
107107

108108

109109
def check_game_map(checks: StarterChecks) -> None:
110-
"""Verify the Project One map starter placeholders."""
110+
"""Verify the Project One map starter is valid Draw.io XML."""
111111
path = REPO_ROOT / "design/game_map.drawio"
112112
try:
113113
root = ET.parse(path).getroot()
114114
except (OSError, ET.ParseError) as exc:
115115
checks.error(f"Game-map starter is not valid Draw.io XML: {exc}")
116116
return
117-
text = path.read_text(encoding="utf-8")
118-
required = (
119-
'name="Game Map"',
120-
"replace room labels",
121-
"Room 1",
122-
"Room 8",
123-
"Item: TODO",
124-
"TODO: Rename rooms",
125-
)
126-
for marker in required:
127-
if marker not in text:
128-
checks.error(f"Game-map starter is missing marker: {marker!r}")
117+
129118
tag = root.tag.rsplit("}", maxsplit=1)[-1]
130119
if tag != "mxfile":
131120
checks.error("Game-map starter must keep an mxfile root.")
132-
121+
133122

134123
def check_pseudocode(checks: StarterChecks) -> None:
135124
"""Verify both Project One pseudocode starter templates."""

0 commit comments

Comments
 (0)