Shared Catalog
ci / checks (push) Failing after 1h5m14s

This commit is contained in:
khodowany
2026-09-17 01:25:26 -05:00
parent 5941a4cd49
commit fa385205e2
23 changed files with 742 additions and 242 deletions
+5
View File
@@ -67,6 +67,7 @@ def generate_practice_scores(source_dir: Path, output_dir: Path) -> int:
return 0
sources = sorted(source_dir.rglob('*.xml'))
destinations: dict[Path, Path] = {}
identities: dict[str, Path] = {}
for path in sources:
parts = path.relative_to(source_dir).parts
if len(parts) != 3 or parts[0] not in ('chord', 'melody'):
@@ -74,6 +75,10 @@ def generate_practice_scores(source_dir: Path, output_dir: Path) -> int:
destination = Path(parts[0]) / parts[1] / slugify(path.stem)
if destination in destinations:
raise ValueError(f'{path}: practice output path collides with {destinations[destination]}: {destination}')
identity = '-'.join(destination.parts)
if identity in identities:
raise ValueError(f'{path}: practice exercise ID collision with {identities[identity]}: {identity}')
identities[identity] = path
destinations[destination] = path
count = 0
for destination, path in destinations.items():