Skip to content

Commit 99cfb34

Browse files
authored
Return the job ids for use later (#67)
## Nate's Summary Return the job ids that are generated for this backfill run. Useful for consumers to be able to easily find the configs after they've been generated. ## Copilot's Summary This pull request updates the `generate_backfill_config` function in `src/cfa_config_generator/utils/epinow2/driver_functions.py` to include a return type annotation, a detailed description of the return value in the docstring, and a return statement for the list of job IDs. ### Changes to `generate_backfill_config` function: * **Type Annotation**: Added a return type annotation `-> list[str]` to specify that the function returns a list of strings. * **Docstring Update**: Expanded the docstring to include a "Returns" section, describing that the function returns a list of job IDs for each report date in the backfill run. * **Return Statement**: Added a `return job_ids` statement at the end of the function to ensure the list of job IDs is returned.
1 parent 10a5b8a commit 99cfb34

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/cfa_config_generator/utils/epinow2/driver_functions.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def generate_backfill_config(
336336
as_of_dates: list[str],
337337
output_container: str,
338338
task_exclusions: str | None = None,
339-
):
339+
) -> list[str]:
340340
"""
341341
This function can be seen a like a loop over generate_config for a number of report
342342
dates.
@@ -388,6 +388,12 @@ def generate_backfill_config(
388388
Blob storage container to store output.
389389
task_exclusions: str | None
390390
Comma separated state:disease pair to exclude from model run.
391+
392+
Returns
393+
-------
394+
list[str]
395+
A list of job IDs for each report date in the backfill run. This is also written
396+
to the metadata file in the config storage container.
391397
"""
392398
# === Set up =======================================================================
393399
if not len(report_dates) == len(data_paths) == len(as_of_dates):
@@ -485,3 +491,5 @@ def generate_backfill_config(
485491
logger.info(
486492
f"Successfully wrote metadata file to {metadata_path} in {azure_storage['azure_container_name']}."
487493
)
494+
495+
return job_ids

0 commit comments

Comments
 (0)