From 6438cf76692c635ca0dd8b6f83ba7c4438fe5885 Mon Sep 17 00:00:00 2001 From: Tom Jemmett Date: Fri, 15 May 2026 13:21:25 +0100 Subject: [PATCH 1/3] switch to use read_azure_table_single_entity --- DESCRIPTION | 2 +- R/fct_get_data.R | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 614239a..7dc8756 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,7 +15,7 @@ BugReports: https://github.com/The-Strategy-Unit/nhp_outputs/issues Depends: R (>= 4.1.0) Imports: - azkit, + azkit (>= 0.3.0), AzureStor, bs4Dash, cachem, diff --git a/R/fct_get_data.R b/R/fct_get_data.R index 988e3b5..56b0a6b 100644 --- a/R/fct_get_data.R +++ b/R/fct_get_data.R @@ -28,22 +28,12 @@ get_params <- function(r) { } get_model_run_from_ats <- function(dataset, model_run_id) { - token <- azkit::get_auth_token() - - table_endpoint <- Sys.getenv("AZ_TABLE_EP") - table_name <- glue::glue( - "{Sys.getenv('AZ_TABLE_NAME')}(PartitionKey='{dataset}',RowKey='{model_run_id}')" + azkit::read_azure_table_single_entity( + Sys.getenv("AZ_TABLE_NAME"), + dataset, + model_run_id, + Sys.getenv("AZ_TABLE_EP"), ) - - httr2::request(table_endpoint) |> - httr2::req_url_path(table_name) |> - httr2::req_auth_bearer_token(token$credentials$access_token) |> - httr2::req_headers( - Accept = "application/json;odata=nometadata", - `x-ms-version` = "2019-02-02" - ) |> - httr2::req_perform() |> - httr2::resp_body_json() } get_results_from_azure <- function(filename) { From a24265df55207f6adc257f7d9542af7d53716941 Mon Sep 17 00:00:00 2001 From: Tom Jemmett Date: Fri, 15 May 2026 13:41:50 +0100 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- R/fct_get_data.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/fct_get_data.R b/R/fct_get_data.R index 56b0a6b..41979bb 100644 --- a/R/fct_get_data.R +++ b/R/fct_get_data.R @@ -32,7 +32,7 @@ get_model_run_from_ats <- function(dataset, model_run_id) { Sys.getenv("AZ_TABLE_NAME"), dataset, model_run_id, - Sys.getenv("AZ_TABLE_EP"), + Sys.getenv("AZ_TABLE_EP") ) } From c8e1a2b18f422d4ae1c5bcb945dff243cf032f66 Mon Sep 17 00:00:00 2001 From: Tom Jemmett Date: Fri, 15 May 2026 14:14:33 +0100 Subject: [PATCH 3/3] updates manifest --- manifest.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index ab40722..654821e 100644 --- a/manifest.json +++ b/manifest.json @@ -385,33 +385,33 @@ "description": { "Package": "azkit", "Title": "Azure storage authentication toolkit", - "Version": "0.2.6", + "Version": "0.3.0", "Authors@R": "\n c(person(\n \"Fran\", \"Barton\",\n email = \"francis.barton@nhs.net\",\n role = c(\"aut\", \"cre\"),\n comment = c(ORCID = \"0000-0002-5650-1176\")\n ),\n person(\n \"Tom\", \"Jemmett\",\n email = \"thomas.jemmett@nhs.net\",\n role = \"ctb\"\n ))", "Description": "Handles authentication and basic tasks with Azure blob storage.", "License": "MIT + file LICENSE", "Config/testthat/edition": "3", "Encoding": "UTF-8", "Roxygen": "list(markdown = TRUE)", - "RoxygenNote": "7.3.3", "Depends": "R (>= 4.5.0)", "Imports": "arrow, AzureAuth, AzureRMR, AzureStor, cli, dplyr, glue,\nhttr2, purrr, rlang, tibble, withr, yyjsonr", "Suggests": "httpuv, readr, testthat (>= 3.0.0)", + "Config/roxygen2/version": "8.0.0", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteRepo": "azkit", "RemoteUsername": "the-strategy-unit", "RemotePkgRef": "github::the-strategy-unit/azkit", "RemoteRef": "HEAD", - "RemoteSha": "41ed4da60571cf7e3f4296613fc409857e7b060c", + "RemoteSha": "5bc96225ba3787aaf1a0e8ce21a6683fab0eb086", "GithubRepo": "azkit", "GithubUsername": "the-strategy-unit", "GithubRef": "HEAD", - "GithubSHA1": "41ed4da60571cf7e3f4296613fc409857e7b060c", + "GithubSHA1": "5bc96225ba3787aaf1a0e8ce21a6683fab0eb086", "NeedsCompilation": "no", - "Packaged": "2026-05-15 11:40:13 UTC; tom", + "Packaged": "2026-05-15 13:12:33 UTC; tom", "Author": "Fran Barton [aut, cre] (ORCID: ),\n Tom Jemmett [ctb]", "Maintainer": "Fran Barton ", - "Built": "R 4.6.0; ; 2026-05-15 11:40:13 UTC; unix" + "Built": "R 4.6.0; ; 2026-05-15 13:12:33 UTC; unix" } }, "base64enc": {