Skip to content

Commit

Permalink
adding logging to calls
Browse files Browse the repository at this point in the history
  • Loading branch information
aysim319 committed Sep 9, 2024
1 parent ed4ff19 commit 4954f9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _delphi_utils_python/delphi_utils/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ def create_export_csv(
export_df = export_df.sort_values(by="geo_id")
export_df.to_csv(export_file, index=False, na_rep="NA")

logger.debug("Wrote rows", num_rows=df.size, geo_type=geo_level, num_geo_ids=export_df["geo_id"].unique().size)
logger.debug("Wrote rows", num_rows=df.size, geo_type=geo_res, num_geo_ids=export_df["geo_id"].unique().size)
return dates
1 change: 1 addition & 0 deletions claims_hosp/delphi_claims_hosp/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def run_module(params):
start_date=startdate,
geo_res=geo,
sensor=signal_name,
logger=logger
)

max_dates.append(updater.output_dates[-1])
Expand Down
6 changes: 4 additions & 2 deletions claims_hosp/tests/test_update_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def test_write_to_csv_results(self):
start_date=self.start_date,
end_date=self.end_date,
geo_res=res0["geo_level"],
sensor=Config.signal_name)
sensor=Config.signal_name,
logger=TEST_LOGGER)
# check outputs
expected_name = f"20200501_geography_{Config.signal_name}.csv"
assert exists(join(td.name, expected_name))
Expand Down Expand Up @@ -255,7 +256,8 @@ def test_write_to_csv_with_se_results(self):
start_date=self.start_date,
end_date=self.end_date,
geo_res=res0["geo_level"],
sensor=signal_name)
sensor=signal_name,
logger=TEST_LOGGER)

# check outputs
expected_name = f"20200501_geography_{signal_name}.csv"
Expand Down

0 comments on commit 4954f9a

Please sign in to comment.