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 = c("bcdata", "fwa", "aws"),
path_csv = 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
c("bcdata", "fwa", "aws").- path_csv
Character. Optional path to write results as CSV. If
NULL(default), results are returned but not written.
Value
A data.frame with columns: source_type, source_layer, group,
status ("OK" or "FAIL"), error_message.
Details
Only tests layers with source_type in "bcdata", "fwa", "aws".
Skips "local" and "wms" source types.
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")
} # }
