fix(makefile): extract inline Python to script to fix parse error

The multi-line python3 -c heredoc in the Makefile caused
"missing separator" errors since Make runs each recipe line
in a separate shell. Moved to web/scripts/init_landing_seeds.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-23 23:40:58 +01:00
parent 13adbb06ef
commit c795ccfa48
2 changed files with 23 additions and 13 deletions

View File

@@ -0,0 +1,22 @@
"""Create minimal seed files for SQLMesh staging models that require landing data."""
import gzip
import json
from pathlib import Path
seed = {
"date": "1970-01-01",
"captured_at_utc": "1970-01-01T00:00:00Z",
"venue_count": 0,
"venues_errored": 0,
"venues": [],
}
morning = Path("data/landing/playtomic/1970/01/availability_1970-01-01.json.gz")
recheck = Path("data/landing/playtomic/1970/01/availability_1970-01-01_recheck_00.json.gz")
morning.parent.mkdir(parents=True, exist_ok=True)
for p in [morning, recheck]:
if not p.exists():
with gzip.open(p, "wt") as f:
json.dump(seed, f)
print("created", p)
else:
print("exists ", p)