Skip to content

Commit 02c6ec6

Browse files
committed
minor logging updates
1 parent 2967bf3 commit 02c6ec6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/pipelines/floodscan_pipeline.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _get_90_days_filenames_for_dates(self, dates, max_days=90):
139139
)
140140
continue
141141

142-
# Check next 5 days
142+
# Check next 90 days
143143
found = False
144144
for days in range(1, max_days + 1):
145145
future_date = target + timedelta(days=days)
@@ -154,7 +154,7 @@ def _get_90_days_filenames_for_dates(self, dates, max_days=90):
154154
break
155155

156156
if not found:
157-
self.logger.warning(
157+
self.logger.error(
158158
f"No available data within {max_days} days of {target}"
159159
)
160160

@@ -249,10 +249,11 @@ def process_historical_zipped_data(self, zipped_filepaths, dates):
249249

250250
for file in unzipped_files:
251251
date = get_datetime_from_filename(file[0])
252-
self.logger.info(f"Processing historical {SFED} data from {date}")
252+
date_pretty = date.strftime("%Y-%m-%d")
253+
self.logger.info(f"Processing historical {SFED} data from {date_pretty}")
253254
sfed_da = self.process_data(file[0], band_type=SFED)
254255

255-
self.logger.info(f"Processing historical {MFED} data from {date}")
256+
self.logger.info(f"Processing historical {MFED} data from {date_pretty}")
256257
mfed_da = self.process_data(file[1], band_type=MFED)
257258
self._combine_bands(sfed_da, mfed_da, date=date)
258259

@@ -329,7 +330,8 @@ def query_api(self, date):
329330
return sfed_unzipped, mfed_unzipped, latest_date
330331

331332
def process_historical_data(self, filepath, date, band_type):
332-
self.logger.info(f"Processing historical {band_type} data from {date}")
333+
date_pretty = date.strftime("%Y-%m-%d")
334+
self.logger.info(f"Processing historical {band_type} data from {date_pretty}")
333335

334336
with xr.open_dataset(filepath) as ds:
335337
ds = ds.transpose("time", "lat", "lon")

src/pipelines/pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def print_coverage_report(
246246
self.logger.info(f"Overall coverage: {coverage_pct:.1f}%")
247247

248248
if missing_dates:
249-
self.logger.info("Missing Dates after 2024:")
249+
self.logger.info(f"Missing dates after 2024 ({len(missing_dates)} total):")
250250
for date in missing_dates:
251251
self.logger.info(f" - {date.strftime('%Y-%m-%d')}")
252252
else:

0 commit comments

Comments
 (0)