Last updated on 2021-01-06 07:50:49 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.8.2 | 7.74 | 91.21 | 98.95 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 0.8.2 | 5.77 | 70.38 | 76.15 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 0.8.2 | 126.48 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 0.8.2 | 115.07 | ERROR | |||
r-devel-windows-ix86+x86_64 | 0.8.2 | 18.00 | 137.00 | 155.00 | ERROR | |
r-patched-linux-x86_64 | 0.8.2 | 7.25 | 88.32 | 95.57 | ERROR | |
r-patched-solaris-x86 | 0.8.2 | 151.30 | ERROR | |||
r-release-linux-x86_64 | 0.8.2 | 6.70 | 87.93 | 94.63 | ERROR | |
r-release-macos-x86_64 | 0.8.2 | NOTE | ||||
r-release-windows-ix86+x86_64 | 0.8.2 | 20.00 | 451.00 | 471.00 | ERROR | |
r-oldrel-macos-x86_64 | 0.8.2 | NOTE | ||||
r-oldrel-windows-ix86+x86_64 | 0.8.2 | 12.00 | 135.00 | 147.00 | ERROR |
Version: 0.8.2
Check: tests
Result: ERROR
Running 'spelling.R' [0s/1s]
Running 'testthat.R' [33s/58s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201221.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 157368 bytes (153 KB)
==================================================
downloaded 153 KB
== Skipped tests ===============================================================
* On CRAN (46)
== Warnings ====================================================================
-- Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release --
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
== Failed tests ================================================================
-- Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release --
Error: Can't rename columns that don't exist.
x Column `newAdmissions` doesn't exist.
Backtrace:
x
1. +-covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. | \-`%>%`(...)
3. +-dplyr::mutate(...)
4. +-dplyr::select(., -level_2_region_code.y)
5. +-dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. +-dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. +-dplyr::rename(...)
8. \-dplyr:::rename.data.frame(...)
9. \-tidyselect::eval_rename(expr(c(...)), .data)
10. \-tidyselect:::rename_impl(...)
11. \-tidyselect:::eval_select_impl(...)
12. +-tidyselect:::with_subscript_errors(...)
13. | +-base::tryCatch(...)
14. | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
15. | | \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. | | \-base:::doTryCatch(return(expr), name, parentenv, handler)
17. | \-tidyselect:::instrument_base_errors(expr)
18. | \-base::withCallingHandlers(...)
19. \-tidyselect:::vars_select_eval(...)
20. \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. \-tidyselect:::eval_c(expr, data_mask, context_mask)
22. \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. \-tidyselect:::as_indices_sel_impl(...)
25. \-tidyselect:::as_indices_impl(x, vars, strict = strict)
26. \-tidyselect:::chr_as_locations(x, vars)
27. \-vctrs::vec_as_location(x, n = length(vars), names = vars)
28. \-(function () ...
29. \-vctrs:::stop_subscript_oob(...)
30. \-vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 0.8.2
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/1s]
Running ‘testthat.R’ [27s/70s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201223.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 158909 bytes (155 KB)
==================================================
downloaded 155 KB
══ Skipped tests ═══════════════════════════════════════════════════════════════
● On CRAN (46)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
Error: Can't rename columns that don't exist.
✖ Column `newAdmissions` doesn't exist.
Backtrace:
█
1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. │ └─`%>%`(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr::select(., -level_2_region_code.y)
5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. ├─dplyr::rename(...)
8. └─dplyr:::rename.data.frame(...)
9. └─tidyselect::eval_rename(expr(c(...)), .data)
10. └─tidyselect:::rename_impl(...)
11. └─tidyselect:::eval_select_impl(...)
12. ├─tidyselect:::with_subscript_errors(...)
13. │ ├─base::tryCatch(...)
14. │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
15. │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
17. │ └─tidyselect:::instrument_base_errors(expr)
18. │ └─base::withCallingHandlers(...)
19. └─tidyselect:::vars_select_eval(...)
20. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. └─tidyselect:::eval_c(expr, data_mask, context_mask)
22. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. └─tidyselect:::as_indices_sel_impl(...)
25. └─tidyselect:::as_indices_impl(x, vars, strict = strict)
26. └─tidyselect:::chr_as_locations(x, vars)
27. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
28. └─(function () ...
29. └─vctrs:::stop_subscript_oob(...)
30. └─vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.8.2
Check: dependencies in R code
Result: NOTE
Namespaces in Imports field not imported from:
‘magrittr’ ‘yaml’
All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-macos-x86_64, r-oldrel-macos-x86_64
Version: 0.8.2
Check: tests
Result: ERROR
Running ‘spelling.R’
Running ‘testthat.R’ [39s/57s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201221.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 157368 bytes (153 KB)
==================================================
downloaded 153 KB
══ Skipped tests ═══════════════════════════════════════════════════════════════
● On CRAN (46)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
Error: Can't rename columns that don't exist.
✖ Column `newAdmissions` doesn't exist.
Backtrace:
█
1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. │ └─`%>%`(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr::select(., -level_2_region_code.y)
5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. ├─dplyr::rename(...)
8. └─dplyr:::rename.data.frame(...)
9. └─tidyselect::eval_rename(expr(c(...)), .data)
10. └─tidyselect:::rename_impl(...)
11. └─tidyselect:::eval_select_impl(...)
12. ├─tidyselect:::with_subscript_errors(...)
13. │ ├─base::tryCatch(...)
14. │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
15. │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
17. │ └─tidyselect:::instrument_base_errors(expr)
18. │ └─base::withCallingHandlers(...)
19. └─tidyselect:::vars_select_eval(...)
20. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. └─tidyselect:::eval_c(expr, data_mask, context_mask)
22. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. └─tidyselect:::as_indices_sel_impl(...)
25. └─tidyselect:::as_indices_impl(x, vars, strict = strict)
26. └─tidyselect:::chr_as_locations(x, vars)
27. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
28. └─(function () ...
29. └─vctrs:::stop_subscript_oob(...)
30. └─vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.8.2
Check: tests
Result: ERROR
Running ‘spelling.R’
Running ‘testthat.R’ [38s/69s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201221.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 157368 bytes (153 KB)
==================================================
downloaded 153 KB
══ Skipped tests ═══════════════════════════════════════════════════════════════
● On CRAN (46)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
Error: Can't rename columns that don't exist.
✖ Column `newAdmissions` doesn't exist.
Backtrace:
█
1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. │ └─`%>%`(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr::select(., -level_2_region_code.y)
5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. ├─dplyr::rename(...)
8. └─dplyr:::rename.data.frame(...)
9. └─tidyselect::eval_rename(expr(c(...)), .data)
10. └─tidyselect:::rename_impl(...)
11. └─tidyselect:::eval_select_impl(...)
12. ├─tidyselect:::with_subscript_errors(...)
13. │ ├─base::tryCatch(...)
14. │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
15. │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
17. │ └─tidyselect:::instrument_base_errors(expr)
18. │ └─base::withCallingHandlers(...)
19. └─tidyselect:::vars_select_eval(...)
20. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. └─tidyselect:::eval_c(expr, data_mask, context_mask)
22. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. └─tidyselect:::as_indices_sel_impl(...)
25. └─tidyselect:::as_indices_impl(x, vars, strict = strict)
26. └─tidyselect:::chr_as_locations(x, vars)
27. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
28. └─(function () ...
29. └─vctrs:::stop_subscript_oob(...)
30. └─vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 0.8.2
Check: tests
Result: ERROR
Running 'spelling.R' [0s]
Running 'testthat.R' [70s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201222.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 156524 bytes (152 KB)
==================================================
downloaded 152 KB
== Skipped tests ===============================================================
* On CRAN (46)
== Warnings ====================================================================
-- Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release --
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
== Failed tests ================================================================
-- Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release --
Error: Can't rename columns that don't exist.
x Column `newAdmissions` doesn't exist.
Backtrace:
x
1. +-covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. | \-`%>%`(...)
3. +-dplyr::mutate(...)
4. +-dplyr::select(., -level_2_region_code.y)
5. +-dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. +-dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. +-dplyr::rename(...)
8. \-dplyr:::rename.data.frame(...)
9. \-tidyselect::eval_rename(expr(c(...)), .data)
10. \-tidyselect:::rename_impl(...)
11. \-tidyselect:::eval_select_impl(...)
12. +-tidyselect:::with_subscript_errors(...)
13. | +-base::tryCatch(...)
14. | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
15. | | \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. | | \-base:::doTryCatch(return(expr), name, parentenv, handler)
17. | \-tidyselect:::instrument_base_errors(expr)
18. | \-base::withCallingHandlers(...)
19. \-tidyselect:::vars_select_eval(...)
20. \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. \-tidyselect:::eval_c(expr, data_mask, context_mask)
22. \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. \-tidyselect:::as_indices_sel_impl(...)
25. \-tidyselect:::as_indices_impl(x, vars, strict = strict)
26. \-tidyselect:::chr_as_locations(x, vars)
27. \-vctrs::vec_as_location(x, n = length(vars), names = vars)
28. \-(function () ...
29. \-vctrs:::stop_subscript_oob(...)
30. \-vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-devel-windows-ix86+x86_64
Version: 0.8.2
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/1s]
Running ‘testthat.R’ [33s/69s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201223.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 158909 bytes (155 KB)
==================================================
downloaded 155 KB
══ Skipped tests ═══════════════════════════════════════════════════════════════
● On CRAN (46)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
Error: Can't rename columns that don't exist.
✖ Column `newAdmissions` doesn't exist.
Backtrace:
█
1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. │ └─`%>%`(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr::select(., -level_2_region_code.y)
5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. ├─dplyr::rename(...)
8. └─dplyr:::rename.data.frame(...)
9. └─tidyselect::eval_rename(expr(c(...)), .data)
10. └─tidyselect:::rename_impl(...)
11. └─tidyselect:::eval_select_impl(...)
12. ├─tidyselect:::with_subscript_errors(...)
13. │ ├─base::tryCatch(...)
14. │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
15. │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
17. │ └─tidyselect:::instrument_base_errors(expr)
18. │ └─base::withCallingHandlers(...)
19. └─tidyselect:::vars_select_eval(...)
20. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. └─tidyselect:::eval_c(expr, data_mask, context_mask)
22. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. └─tidyselect:::as_indices_sel_impl(...)
25. └─tidyselect:::as_indices_impl(x, vars, strict = strict)
26. └─tidyselect:::chr_as_locations(x, vars)
27. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
28. └─(function () ...
29. └─vctrs:::stop_subscript_oob(...)
30. └─vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-patched-linux-x86_64
Version: 0.8.2
Check: tests
Result: ERROR
Running ‘spelling.R’
Running ‘testthat.R’ [51s/208s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201220.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 157107 bytes (153 KB)
==================================================
downloaded 153 KB
══ Skipped tests ═══════════════════════════════════════════════════════════════
● On CRAN (46)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
── Warning (test-get_uk_regional_cases.R:56:3): get_uk_regional_cases returns data by date of release ──
2730 parsing failures.
row col expected actual file
1388 age 1/0/T/F/TRUE/FALSE 18_to_64 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
1388 rate 1/0/T/F/TRUE/FALSE 199.5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
1389 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
1389 rate 1/0/T/F/TRUE/FALSE 17.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
1390 age 1/0/T/F/TRUE/FALSE 85+ 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-20'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(...) test-get_uk_regional_cases.R:56:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
Error: Can't rename columns that don't exist.
✖ Column `newAdmissions` doesn't exist.
Backtrace:
█
1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. │ └─`%>%`(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr::select(., -level_2_region_code.y)
5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. ├─dplyr::rename(...)
8. └─dplyr:::rename.data.frame(...)
9. └─tidyselect::eval_rename(expr(c(...)), .data)
10. └─tidyselect:::rename_impl(...)
11. └─tidyselect:::eval_select_impl(...)
12. ├─tidyselect:::with_subscript_errors(...)
13. │ ├─base::tryCatch(...)
14. │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
15. │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
17. │ └─tidyselect:::instrument_base_errors(expr)
18. │ └─base::withCallingHandlers(...)
19. └─tidyselect:::vars_select_eval(...)
20. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. └─tidyselect:::eval_c(expr, data_mask, context_mask)
22. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. └─tidyselect:::as_indices_sel_impl(...)
25. └─tidyselect:::as_indices_impl(x, vars, strict = strict)
26. └─tidyselect:::chr_as_locations(x, vars)
27. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
28. └─(function () ...
29. └─vctrs:::stop_subscript_oob(...)
30. └─vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 2 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-patched-solaris-x86
Version: 0.8.2
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/1s]
Running ‘testthat.R’ [33s/63s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201222.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 156524 bytes (152 KB)
==================================================
downloaded 152 KB
══ Skipped tests ═══════════════════════════════════════════════════════════════
● On CRAN (46)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release ──
Error: Can't rename columns that don't exist.
✖ Column `newAdmissions` doesn't exist.
Backtrace:
█
1. ├─covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. │ └─`%>%`(...)
3. ├─dplyr::mutate(...)
4. ├─dplyr::select(., -level_2_region_code.y)
5. ├─dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. ├─dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. ├─dplyr::rename(...)
8. └─dplyr:::rename.data.frame(...)
9. └─tidyselect::eval_rename(expr(c(...)), .data)
10. └─tidyselect:::rename_impl(...)
11. └─tidyselect:::eval_select_impl(...)
12. ├─tidyselect:::with_subscript_errors(...)
13. │ ├─base::tryCatch(...)
14. │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
15. │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
17. │ └─tidyselect:::instrument_base_errors(expr)
18. │ └─base::withCallingHandlers(...)
19. └─tidyselect:::vars_select_eval(...)
20. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. └─tidyselect:::eval_c(expr, data_mask, context_mask)
22. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. └─tidyselect:::as_indices_sel_impl(...)
25. └─tidyselect:::as_indices_impl(x, vars, strict = strict)
26. └─tidyselect:::chr_as_locations(x, vars)
27. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
28. └─(function () ...
29. └─vctrs:::stop_subscript_oob(...)
30. └─vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-release-linux-x86_64
Version: 0.8.2
Check: tests
Result: ERROR
Running 'spelling.R' [0s]
Running 'testthat.R' [373s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201218.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 156445 bytes (152 KB)
==================================================
downloaded 152 KB
== Skipped tests ===============================================================
* On CRAN (46)
== Warnings ====================================================================
-- Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release --
3298 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
== Failed tests ================================================================
-- Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release --
Error: Can't rename columns that don't exist.
x Column `newAdmissions` doesn't exist.
Backtrace:
x
1. +-covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. | \-`%>%`(...)
3. +-dplyr::mutate(...)
4. +-dplyr::select(., -level_2_region_code.y)
5. +-dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. +-dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. +-dplyr::rename(...)
8. \-dplyr:::rename.data.frame(...)
9. \-tidyselect::eval_rename(expr(c(...)), .data)
10. \-tidyselect:::rename_impl(...)
11. \-tidyselect:::eval_select_impl(...)
12. +-tidyselect:::with_subscript_errors(...)
13. | +-base::tryCatch(...)
14. | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
15. | | \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. | | \-base:::doTryCatch(return(expr), name, parentenv, handler)
17. | \-tidyselect:::instrument_base_errors(expr)
18. | \-base::withCallingHandlers(...)
19. \-tidyselect:::vars_select_eval(...)
20. \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. \-tidyselect:::eval_c(expr, data_mask, context_mask)
22. \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. \-tidyselect:::as_indices_sel_impl(...)
25. \-tidyselect:::as_indices_impl(x, vars, strict = strict)
26. \-tidyselect:::chr_as_locations(x, vars)
27. \-vctrs::vec_as_location(x, n = length(vars), names = vars)
28. \-(function () ...
29. \-vctrs:::stop_subscript_oob(...)
30. \-vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-release-windows-ix86+x86_64
Version: 0.8.2
Check: tests
Result: ERROR
Running 'spelling.R' [0s]
Running 'testthat.R' [71s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(covidregionaldata)
> source("testthat/custom_tests/mock_data.R")
>
> test_check("covidregionaldata")
trying URL 'https://www.england.nhs.uk/statistics/wp-content/uploads/sites/2/2020/12/COVID-19-daily-admissions-and-beds-20201221.xlsx'
Content type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' length 157368 bytes (153 KB)
==================================================
downloaded 153 KB
== Skipped tests ===============================================================
* On CRAN (46)
== Warnings ====================================================================
-- Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release --
1649 parsing failures.
row col expected actual file
2028 age 1/0/T/F/TRUE/FALSE 0_to_5 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2028 rate 1/0/T/F/TRUE/FALSE 17.3 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 age 1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2029 rate 1/0/T/F/TRUE/FALSE 538.7 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
2030 age 1/0/T/F/TRUE/FALSE 6_to_17 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
.... .... .................. ........ .........................................................................................................................................................................................................
See problems(...) for more details.
Backtrace:
1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
2. purrr::map(query_filters, get_uk_data, release_date = release_date)
3. covidregionaldata:::.f(.x[[i]], ...)
4. purrr::map(csv_links, ~safe_reader(.)[[1]])
5. covidregionaldata:::.f(.x[[i]], ...)
6. purrr:::safe_reader(.)
15. covidregionaldata:::.f(...)
16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
17. readr:::read_delimited(...)
18. readr:::warn_problems(out)
== Failed tests ================================================================
-- Error (test-get_uk_regional_cases.R:58:3): get_uk_regional_cases returns data by date of release --
Error: Can't rename columns that don't exist.
x Column `newAdmissions` doesn't exist.
Backtrace:
x
1. +-covidregionaldata:::get_uk_regional_cases_with_level_2(release_date = "2020-09-01") test-get_uk_regional_cases.R:58:2
2. | \-`%>%`(...)
3. +-dplyr::mutate(...)
4. +-dplyr::select(., -level_2_region_code.y)
5. +-dplyr::rename(., level_2_region_code = level_2_region_code.x)
6. +-dplyr::left_join(., authority_lookup_table, by = "region_level_2")
7. +-dplyr::rename(...)
8. \-dplyr:::rename.data.frame(...)
9. \-tidyselect::eval_rename(expr(c(...)), .data)
10. \-tidyselect:::rename_impl(...)
11. \-tidyselect:::eval_select_impl(...)
12. +-tidyselect:::with_subscript_errors(...)
13. | +-base::tryCatch(...)
14. | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
15. | | \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
16. | | \-base:::doTryCatch(return(expr), name, parentenv, handler)
17. | \-tidyselect:::instrument_base_errors(expr)
18. | \-base::withCallingHandlers(...)
19. \-tidyselect:::vars_select_eval(...)
20. \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. \-tidyselect:::eval_c(expr, data_mask, context_mask)
22. \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. \-tidyselect:::as_indices_sel_impl(...)
25. \-tidyselect:::as_indices_impl(x, vars, strict = strict)
26. \-tidyselect:::chr_as_locations(x, vars)
27. \-vctrs::vec_as_location(x, n = length(vars), names = vars)
28. \-(function () ...
29. \-vctrs:::stop_subscript_oob(...)
30. \-vctrs:::stop_subscript(...)
[ FAIL 1 | WARN 1 | SKIP 46 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-oldrel-windows-ix86+x86_64