Skip to content

Commit

Permalink
issue date must be 8 digits
Browse files Browse the repository at this point in the history
  • Loading branch information
aysim319 committed Jan 15, 2025
1 parent 51edb05 commit f4cc439
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nhsn/delphi_nhsn/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ def patch(params):
patch_list = filter_source_files(source_files)
for file in patch_list:
issue_date = datetime.strptime(file.name.split(".")[0], "%Y%m%d")
current_issue_ew = Week.fromdate(issue_date)
logger.info("Running issue", issue_date=issue_date.strftime("%Y-%m-%d"))
params["patch"]["issue_date"] = issue_date.strftime("%Y%m%d")
current_issue_dir = f"{params['patch']['patch_dir']}/issue_{current_issue_ew}/nhsn"
# regardless of week date type or not the directory name must be issue_date_yyyymmdd
# conversion in done in acquisition
current_issue_dir = f"{params['patch']['patch_dir']}/issue_{issue_date.strftime('%Y%m%d')}/nhsn"
makedirs(current_issue_dir, exist_ok=True)
params["common"]["export_dir"] = current_issue_dir
params["common"]["custom_run"] = True
Expand Down

0 comments on commit f4cc439

Please sign in to comment.