From 1984555fb93c0d5b284c5177db474115b5e304da Mon Sep 17 00:00:00 2001 From: Ken O'Neill Date: Fri, 10 Oct 2025 09:48:25 +0100 Subject: [PATCH 1/5] Increment version number to 0.2.0 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 71012bf..6a743e7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sssstats Title: Functions for Social Security Scotland Statisticians -Version: 0.1.0 +Version: 0.2.0 Authors@R: person("Izaak", "Jephson", , "izaak.jephson@socialsecurity.gov.scot", role = c("aut", "cre")) Description: Useful helper functions designed for use in Social Security From b816a5038b115b5afdd242e870c06965c4454ae4 Mon Sep 17 00:00:00 2001 From: Ken O'Neill Date: Fri, 10 Oct 2025 09:51:31 +0100 Subject: [PATCH 2/5] Add opendatascot as dev repo rather than CRAN --- DESCRIPTION | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6a743e7..924bf99 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,7 +15,7 @@ Imports: jsonlite, lubridate, magrittr, - opendatascot, + opendatascot (>= 0.0.0.9000), openxlsx, purrr, readr, @@ -37,3 +37,5 @@ Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 +Remotes: + github::ScotGovAnalysis/opendatascot From 8972d22a9c17db33dab6c073da37330aa8b64217 Mon Sep 17 00:00:00 2001 From: Ken O'Neill Date: Fri, 10 Oct 2025 10:07:23 +0100 Subject: [PATCH 3/5] Allow two tests to skip GitHub Actions CI for R --- tests/testthat/test-get_datazone_lookup.R | 5 +++++ tests/testthat/test-get_simd_lookup.R | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/testthat/test-get_datazone_lookup.R b/tests/testthat/test-get_datazone_lookup.R index fc65abe..55b01fa 100644 --- a/tests/testthat/test-get_datazone_lookup.R +++ b/tests/testthat/test-get_datazone_lookup.R @@ -1,4 +1,9 @@ test_that("data zone lookup works", { + # `get_datazone_lookup()` relies on a live SPARQL endpoint and then downloads + # the file from its URL -- this would fail some GitHub Actions for R. So, + # skipping CI if it comes to this. + testthat::skip_on_ci() + dz_2011_lookup <- get_datazone_lookup("2011") dz_2022_lookup <- get_datazone_lookup("2022") diff --git a/tests/testthat/test-get_simd_lookup.R b/tests/testthat/test-get_simd_lookup.R index e09c339..69cc5ba 100644 --- a/tests/testthat/test-get_simd_lookup.R +++ b/tests/testthat/test-get_simd_lookup.R @@ -1,4 +1,9 @@ test_that("lookup table for simd made", { + # `get_simd_lookup()` relies on a live SPARQL endpoint and then downloads + # the file from its URL -- this would fail some GitHub Actions for R. So, + # skipping CI if it comes to this. + testthat::skip_on_ci() + simd_data <- get_simd_lookup() # check if result is a dataframe From 5252d4c11562e3c72fce8cee94384cf090c0d2e4 Mon Sep 17 00:00:00 2001 From: Ken O'Neill Date: Fri, 10 Oct 2025 10:37:41 +0100 Subject: [PATCH 4/5] Add NEWS.md for the first time --- NEWS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 NEWS.md diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..670e20b --- /dev/null +++ b/NEWS.md @@ -0,0 +1,12 @@ +# sssstats 0.2.0 + +* The following new functions have been introduced: + + * `get_datazone_lookup()` for creating the data zone lookup from statistics.gov.scot + * `get_simd_lookup()` for creating the Scottish Index of Multiple Deprivation lookup (2011 data zone based) from statistics.gov.scot + * `get_sspl_lookup()` for reading in (a local CSV file of) the Scottish Statistics Postcode Lookup published by National Records of Scotland + * `add_geography()` for adding geography fields into data extracts used for all Social Security Scotland's official statistics publications. + + See function documentation for further information. + +* Removes a dependency on the `config` R package From 401644acdb4678837322e7503047ce668b493aae Mon Sep 17 00:00:00 2001 From: Ken O'Neill Date: Fri, 10 Oct 2025 11:11:08 +0100 Subject: [PATCH 5/5] Allow another test to skip CI --- tests/testthat/test-add_geography.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testthat/test-add_geography.R b/tests/testthat/test-add_geography.R index 03d1c11..5e24a9c 100644 --- a/tests/testthat/test-add_geography.R +++ b/tests/testthat/test-add_geography.R @@ -1,4 +1,9 @@ test_that("add_geography works", { + # `get_datazone_lookup()` relies on a live SPARQL endpoint and then downloads + # the file from its URL -- this would fail some GitHub Actions for R. So, + # skipping CI if it comes to this. + testthat::skip_on_ci() + # first collect all the lookups file_path <- testthat::test_path("sspl_data", "singlerecord_mock.csv")