Enhance CSV metadata with error tracking for mosaics and tiles
This commit is contained in:
@@ -7,6 +7,8 @@ import yaml
|
||||
|
||||
from spruce.settings import (
|
||||
MAX_SAFE_WORKERS,
|
||||
SCANS_CSV_FIELDS,
|
||||
TILES_CSV_FIELDS,
|
||||
_clamp_workers,
|
||||
load_config,
|
||||
)
|
||||
@@ -91,3 +93,24 @@ def test_load_config_missing_password_exits(tmp_path):
|
||||
path.write_text(yaml.dump({"username": "x"}))
|
||||
with pytest.raises(SystemExit):
|
||||
load_config(str(path))
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# CSV schemas (failure columns)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_scans_csv_fields_includes_mosaic_failure_columns():
|
||||
for name in (
|
||||
"mosaic_download_status",
|
||||
"mosaic_error",
|
||||
"mosaic_error_code",
|
||||
"mosaic_error_class",
|
||||
):
|
||||
assert name in SCANS_CSV_FIELDS
|
||||
|
||||
|
||||
def test_tiles_csv_fields_includes_status_and_error_columns():
|
||||
for name in ("status", "error", "error_code", "error_class"):
|
||||
assert name in TILES_CSV_FIELDS
|
||||
assert TILES_CSV_FIELDS.index("status") < TILES_CSV_FIELDS.index("downloaded_at")
|
||||
|
||||
Reference in New Issue
Block a user