Skip to content

Commit

Permalink
Change File Naming convention to avoid naming collisions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bolny committed Jan 16, 2025
1 parent c3e569a commit 55d3b22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ def test_generate_forecast_text_file():
END/
"""
assert content == expected_content
assert filename == "FLCN39_CWVR_191400.txt"
assert filename == "FLCN39_CWVR_2024-11-19.txt"
2 changes: 1 addition & 1 deletion utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _generate_report_text(forecast_data: dict[str, dict[str, float]]) -> tuple[s
full_date = now.strftime("%A %-d %B %Y").upper()
short_date = now.strftime("%-d-%B-%Y").upper()
report_data = _get_report_data(forecast_data)
filename = f"FLCN39_CWVR_{day_of_month}{time_of_issue_utc}.txt"
filename = f"FLCN39_CWVR_{now.strftime('%Y-%m-%d')}.txt"

output = f"""FLCN39 CWVR {day_of_month}{time_of_issue_utc}
SMOKE CONTROL FORECAST FOR THE BC AND YUKON ISSUED BY ENVIRONMENT CANADA AT 7:00 AM {dst}
Expand Down

0 comments on commit 55d3b22

Please sign in to comment.