Skip to content

Commit d481a39

Browse files
committed
more logging and lint
1 parent c1dadfc commit d481a39

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

nhsn/delphi_nhsn/pull.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ def check_last_updated(socrata_token, dataset_id, logger):
5858
def pull_data(socrata_token: str, dataset_id: str, backup_dir: str, logger):
5959
"""Pull data from Socrata API."""
6060
client = Socrata("data.cdc.gov", socrata_token)
61-
logger.info("Pulling data from Socrata API")
61+
logger.info(
62+
f"Pulling {'main' if dataset_id == MAIN_DATASET_ID else 'preliminary'} data from Socrata API",
63+
dataset_id=dataset_id,
64+
)
6265
results = []
6366
offset = 0
6467
limit = 50000 # maximum limit allowed by SODA 2.0

nhsn/delphi_nhsn/run.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def run_module(params, logger=None):
6666
signal_df_dict.update({signal: nhsn_df for signal in SIGNALS_MAP})
6767
# some of the source backups do not include for preliminary data
6868
if not preliminary_nhsn_df.empty:
69-
signal_df_dict.update(
70-
{signal: preliminary_nhsn_df for signal in PRELIM_SIGNALS_MAP}
71-
)
69+
signal_df_dict.update({signal: preliminary_nhsn_df for signal in PRELIM_SIGNALS_MAP})
7270

7371
for geo, signals_df in product(GEOS, signal_df_dict.items()):
7472
signal, df_pull = signals_df

0 commit comments

Comments
 (0)