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:
22
web/scripts/init_landing_seeds.py
Normal file
22
web/scripts/init_landing_seeds.py
Normal 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)
|
||||
Reference in New Issue
Block a user