Skip to content

Commit

Permalink
snakes to kebabs at the behest of quarto
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrace committed Aug 15, 2024
1 parent d06e06f commit 8624593
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions R/fileValidation.r
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,18 @@ file_separator <- function(data, meta) {
if ((grepl(",", data) == FALSE) && (grepl(",", meta) == FALSE)) {
output <- list(
"result" = "FAIL",
"message" = paste0("Neither of the data and metadata files appear to be using a comma delimited structure. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data_format' target='_blank'>guidance on how to save the files</a>", " if you are unsure.")
"message" = paste0("Neither of the data and metadata files appear to be using a comma delimited structure. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data-format' target='_blank'>guidance on data formats</a> and <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#how-to-export-data-with-utf-8-encoding' target='_blank'>guidance how to save data files in the right format</a>", " if you are unsure.")
)
} else {
if (grepl(",", meta)) {
output <- list(
"result" = "FAIL",
"message" = paste0("The data file does not appear to be using a comma delimited structure. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data_format' target='_blank'>guidance on how to save the files</a>", " if you are unsure.")
"message" = paste0("The data file does not appear to be using a comma delimited structure. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data-format' target='_blank'>guidance on how to save the files</a>", " if you are unsure.")
)
} else {
output <- list(
"result" = "FAIL",
"message" = paste0("The metadata file does not appear to be using a comma delimited structure. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data_format' target='_blank'>guidance on how to save the files</a>", " if you are unsure.")
"message" = paste0("The metadata file does not appear to be using a comma delimited structure. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data-format' target='_blank'>guidance on how to save the files</a>", " if you are unsure.")
)
}
}
Expand Down
16 changes: 8 additions & 8 deletions R/mainTests.r
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ variable_characteristic <- function(meta) {
"message" = paste(
"The fields characteristic and/or characteristic_group have been included in the data.",
"These are not recommended for use with the EES Table Tool.",
"Please refer to the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#Introduction_to_filters'>guidance pages on filters</a>."
"Please refer to the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#introduction-to-filters'>guidance pages on filters</a>."
),
"result" = "ADVISORY"
)
Expand Down Expand Up @@ -639,7 +639,7 @@ time_period <- function(data) {
if (base_identifier %in% four_digit_identifiers) {
if ((nrow(filter(time_length, digits == 4)) == nrow(time_length)) == FALSE) {
output <- list(
"message" = paste0("The time_period length for '", paste(base_identifier), "' must always be a four digit number. <br> - Please check the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list_of_allowable_time_values' target='_blank'>guidance website</a> if you are unsure."),
"message" = paste0("The time_period length for '", paste(base_identifier), "' must always be a four digit number. <br> - Please check the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list-of-allowable-time-values' target='_blank'>guidance website</a> if you are unsure."),
"result" = "FAIL"
)
} else {
Expand All @@ -653,7 +653,7 @@ time_period <- function(data) {
if (base_identifier %in% six_digit_identifiers) {
if ((nrow(filter(time_length, digits == 6)) == nrow(time_length)) == FALSE) {
output <- list(
"message" = paste0("The time_period length for '", paste(base_identifier), "' must always be a six digit number. <br> - Please check the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list_of_allowable_time_values' target='_blank'>guidance website</a> if you are unsure."),
"message" = paste0("The time_period length for '", paste(base_identifier), "' must always be a six digit number. <br> - Please check the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list-of-allowable-time-values' target='_blank'>guidance website</a> if you are unsure."),
"result" = "FAIL"
)
} else {
Expand Down Expand Up @@ -850,7 +850,7 @@ geography_level_completed <- function(data) {
output <- list(
"message" = paste0(
"The following columns should be completed for all rows of the associated level that they refer to: <br> - '", paste0(incomplete_geographies, collapse = "', '"), "' . <br> - If you are unsure of the levels that they refer to, please check the ",
"<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#allowable_geographic_levels' target='_blank'>allowable geographic values table</a>."
"<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#allowable-geographic-levels' target='_blank'>allowable geographic values table</a>."
),
"result" = "FAIL"
)
Expand Down Expand Up @@ -2645,7 +2645,7 @@ ethnicity_values <- function(data) {
"message" = paste0(
"The ethnicity filter ", value_type, " '",
paste(ethnicity_nonstandard, collapse = "', '"),
"' does not conform to the GSS standards. Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#Ethnicity'>published standards</a>."
"' does not conform to the GSS standards. Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#ethnicity'>published standards</a>."
),
"result" = "ADVISORY"
)
Expand All @@ -2654,7 +2654,7 @@ ethnicity_values <- function(data) {
"message" = paste0(
"The following ethnicity filter ", value_type, "s do not conform to the GSS standards: <br> - '",
paste(ethnicity_nonstandard, collapse = "', '"),
"'. <br> - Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#Ethnicity'>published standards</a>."
"'. <br> - Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#ethnicity'>published standards</a>."
),
"result" = "ADVISORY"
)
Expand Down Expand Up @@ -2730,7 +2730,7 @@ ethnicity_characteristic_values <- function(data) {
"message" = paste0(
"The ethnicity filter value '",
paste(ethnicity_nonstandard, collapse = "', '"),
"' does not conform to the GSS standards. Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#Ethnicity'>published standards</a>."
"' does not conform to the GSS standards. Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#ethnicity'>published standards</a>."
),
"result" = "ADVISORY"
)
Expand All @@ -2739,7 +2739,7 @@ ethnicity_characteristic_values <- function(data) {
"message" = paste0(
"The following ethnicity filter values do not conform to the GSS standards: <br> - '",
paste(ethnicity_nonstandard, collapse = "', '"),
"'. <br> - Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#Ethnicity'>published standards</a>."
"'. <br> - Please cross check against the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#ethnicity'>published standards</a>."
),
"result" = "ADVISORY"
)
Expand Down
8 changes: 4 additions & 4 deletions R/preCheck2.r
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ time_identifier_mix <- function(data) {

if (any(is.na(factor(unique(data$time_identifier), base_level))) == TRUE) {
output <- list(
"message" = paste0("The datafile is mixing incompatable time identifiers. <br> - Allowable values with '", paste(base_identifier), "' present, are: '", paste(base_level, collapse = "', '"), "'. <br> - See the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list_of_allowable_time_values' target='_blank'>guidance on time values</a> if you are unsure."),
"message" = paste0("The datafile is mixing incompatable time identifiers. <br> - Allowable values with '", paste(base_identifier), "' present, are: '", paste(base_level, collapse = "', '"), "'. <br> - See the <a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list-of-allowable-time-values' target='_blank'>guidance on time values</a> if you are unsure."),
"result" = "FAIL"
)
} else {
Expand Down Expand Up @@ -259,18 +259,18 @@ utf8 <- function(data, meta) {
} else {
if (number_data_invalid > 0 && number_meta_invalid > 0) {
output <- list(
"message" = paste0("Neither of the data and metadata files are using UTF-8 encoding. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data_format' target='_blank'>guidance on how to do this</a>", " if you are unsure."),
"message" = paste0("Neither of the data and metadata files are using UTF-8 encoding. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list-of-allowable-time-values' target='_blank'>guidance on how to do this</a>", " if you are unsure."),
"result" = "FAIL"
)
} else {
if (number_data_invalid > 0) {
output <- list(
"message" = paste0("The data file is not using UTF-8 encoding. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data_format' target='_blank'>guidance on how to do this</a>", " if you are unsure."),
"message" = paste0("The data file is not using UTF-8 encoding. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list-of-allowable-time-values' target='_blank'>guidance on how to do this</a>", " if you are unsure."),
"result" = "FAIL"
)
} else {
output <- list(
"message" = paste0("The metadata file is not using UTF-8 encoding. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#data_format' target='_blank'>guidance on how to do this</a>", " if you are unsure."),
"message" = paste0("The metadata file is not using UTF-8 encoding. <br> - See the ", "<a href='https://dfe-analytical-services.github.io/analysts-guide/statistics-production/ud.html#list-of-allowable-time-values' target='_blank'>guidance on how to do this</a>", " if you are unsure."),
"result" = "FAIL"
)
}
Expand Down
8 changes: 4 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3903,7 +3903,7 @@
"checksum": "e5b9343c9a0e43d83e02b339946591d1"
},
".Rprofile": {
"checksum": "fcf55ee906692b4450fb1b843ddf6e8c"
"checksum": "ec8bbd4624ab1b090bdb8673b41d024a"
},
"azure-pipelines-dev.yml": {
"checksum": "fc2ef843ff5024bcba25ff84eec05f4c"
Expand Down Expand Up @@ -3978,13 +3978,13 @@
"checksum": "51052a72b54c2e4bdddfb52762638274"
},
"R/fileValidation.r": {
"checksum": "2edf7f6336a1c4b86c7b586743d810d5"
"checksum": "1c3a5b538aa71e2f377b4733e7c9a580"
},
"R/knownVariables.r": {
"checksum": "7248277e0e99b5aee4e66bf9e8c69963"
},
"R/mainTests.r": {
"checksum": "c6f253cdfd25c3c1af1f2ee47bf3bd78"
"checksum": "6dda83d9475c4095792d073c57fb73a8"
},
"R/manual_scripts/debugging.R": {
"checksum": "e56763afdf3659c7c47cfe0e3262e8cf"
Expand All @@ -4002,7 +4002,7 @@
"checksum": "f0ee4cca72e9cdfcd6a11a92f6efc946"
},
"R/preCheck2.r": {
"checksum": "9a5c3b91f5d50ea329b367dcfe438df0"
"checksum": "e2d59f939910ad38e9867f7a41686f4c"
},
"R/readFile.r": {
"checksum": "23d3c726936fede5e8139667d4a4dd6a"
Expand Down

0 comments on commit 8624593

Please sign in to comment.