Cache data sources

This commit is contained in:
Andras Schmelczer 2026-01-25 21:08:01 +00:00
parent 77c9a40dbf
commit 8c74f0a0bc
3 changed files with 11 additions and 3 deletions

View file

@ -20,10 +20,10 @@ def main() -> None:
if not OPENAPI_SPEC.exists():
raise FileNotFoundError(f"OpenAPI spec not found: {OPENAPI_SPEC}")
# Remove existing client if present
# Skip if client already exists
if OUTPUT_PATH.exists():
print(f"Removing existing client at {OUTPUT_PATH}")
shutil.rmtree(OUTPUT_PATH)
print(f"TfL client already exists at {OUTPUT_PATH}, skipping")
return
# Generate the client
print(f"Generating client from {OPENAPI_SPEC}")