feat: add duplicate detection to job creation

- Skip already-completed model-day pairs in create_job()
- Return warnings for skipped simulations
- Raise error if all simulations are already completed
- Update create_job() return type from str to Dict[str, Any]
- Update all callers to handle new dict return type
- Add comprehensive test coverage for duplicate detection
- Log warnings when simulations are skipped
This commit is contained in:
2025-11-07 13:03:31 -05:00
parent 406bb281b2
commit fbe383772a
10 changed files with 1549 additions and 91 deletions

View File

@@ -405,11 +405,12 @@ class TestAsyncDownload:
db_path = api_client.db_path
job_manager = JobManager(db_path=db_path)
job_id = job_manager.create_job(
job_result = job_manager.create_job(
config_path="config.json",
date_range=["2025-10-01"],
models=["gpt-5"]
)
job_id = job_result["job_id"]
# Add warnings
warnings = ["Rate limited", "Skipped 1 date"]