Tests each downloadable layer from the gq registry individually against a real watershed group. Reports pass/fail per layer with error messages. Use this to audit the gq registry and verify that all layers in a template can actually be downloaded.
Usage
rfp_source_test(
template = "bcfishpass_mobile",
watershed_groups = "ADMS",
source_types = setdiff(rfp_manifest_types(), "frozen"),
path_csv = NULL,
lookups = NULL
)Arguments
- template
Character. Template name (e.g.,
"bcfishpass_mobile").- watershed_groups
Character vector of watershed group codes to test against. Use a small watershed for fast results (e.g.,
"ADMS").- source_types
Character vector. Which source types to test. Default is every refreshable type in
rfp_manifest_types(), so a tier added there is covered here without a second edit.- path_csv
Character. Optional path to write results as CSV. If
NULL(default), results are returned but not written.- lookups
Named list of override CSVs for the
osm,urlandstactiers, asrfp_source()takes them. Without this the audit would verify the SHIPPED parameters while a caller runs overrides - it would report on a configuration nobody uses, which is the opposite of what it is for.
Value
A data.frame with columns: source_type, source_layer, group,
status ("OK" or "FAIL"), error_message.
Details
Tests every refreshable type in rfp_manifest_types() - the list is derived,
not repeated here, so a tier added there is picked up. Skips "frozen", and
any "local" or "wms" rows a template carries.
Examples
if (FALSE) { # \dontrun{
# Test all layers for bcfishpass_mobile against ADMS
results <- rfp_source_test("bcfishpass_mobile", "ADMS")
# Show failures
results[results$status == "FAIL", ]
# Write results to CSV for review
rfp_source_test("bcfishpass_mobile", "ADMS", path_csv = "layer_test.csv")
} # }
