Publish curated MobilityOps source snapshot

This commit is contained in:
Jens committed 2026-09-29 22:03:33 +02:00
commit 7adc072f5e
317 files changed
+48851

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
from __future__ import annotations
import argparse
from app.core.db import SessionLocal
from app.seed_loader import reset_and_seed
def main() -> None:
parser = argparse.ArgumentParser(prog="app.cli")
subparsers = parser.add_subparsers(dest="command", required=True)
seed_parser = subparsers.add_parser("seed", help="Load the deterministic demo dataset")
seed_parser.add_argument(
"--reset", action="store_true", help="Clear existing data before loading"
)
args = parser.parse_args()
if args.command == "seed":
if not args.reset:
raise SystemExit(
"Only 'seed --reset' is supported: seeding always rebuilds the demo dataset."
)
db = SessionLocal()
try:
result = reset_and_seed(db)
for name, count in result.counts.items():
print(f"{name}: {count}")
finally:
db.close()
if __name__ == "__main__":
main()