Skip to content

runs air format .#89

Closed
tomjemmett wants to merge 2 commits intomainfrom
run_air_format
Closed

runs air format .#89
tomjemmett wants to merge 2 commits intomainfrom
run_air_format

Conversation

@tomjemmett
Copy link
Copy Markdown
Member

reformatted code base with air format .

Copilot AI review requested due to automatic review settings March 13, 2026 15:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies automated formatting across the {azkit} R package (R source + testthat suite) by running air format ., resulting primarily in whitespace/indentation and minor layout changes.

Changes:

  • Re-indents and reflows R source files under R/.
  • Re-indents and reflows testthat files under tests/testthat/.
  • Removes/adjusts some blank lines as part of formatter output.

Reviewed changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
R/get_auth_token.R Formatting-only changes; includes a user-facing message string layout.
R/get_container.R Formatting-only changes.
R/helpers.R Formatting-only changes in helper utilities.
R/list_files.R Formatting-only changes for blob listing helper.
R/read_azure_files.R Formatting-only changes for Azure file readers + blob existence helper.
R/read_azure_table.R Formatting-only changes for Azure table reader.
tests/testthat/test-azkit_helpers.R Formatting-only changes in helper tests.
tests/testthat/test-get_auth_token.R Formatting-only changes in auth token tests.
tests/testthat/test-get_container.R Formatting-only changes in container tests.
tests/testthat/test-list_files.R Formatting-only changes in list_files tests.
tests/testthat/test-read_azure_files.R Formatting-only changes in read_azure_* tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +3 to +4
withr::with_envvar(c(AZ_CONTAINER = ""), get_container()) |>
expect_error("`AZ_CONTAINER` is not set", class = "rlang_error")
Comment on lines +6 to +8
c(AZ_CONTAINER = "results", AZ_STORAGE_EP = "") |>
withr::with_envvar(get_container()) |>
expect_error("`AZ_STORAGE_EP` is not set", class = "rlang_error")
Comment on lines +8 to +9
generate_resource(version = 3) |>
expect_error()
R/helpers.R Outdated
Comment on lines +123 to +129
check_nzchar <- function(x, message, pf = parent.frame()) {
if (is.null(x)) {
NULL
}
cnz <- "check_nzchar" # nolint
check_scalar_type(x, "string", "{.fn {cnz}}: {.var x} is not a string")
if (nzchar(x)) {
x
} else {
message <- paste0("{.fn {cnz}}: ", message)
cli::cli_abort(message, call = rlang::caller_call(), .envir = pf)
}
if (is.null(x)) {
NULL
}
cnz <- "check_nzchar" # nolint
check_scalar_type(x, "string", "{.fn {cnz}}: {.var x} is not a string")
if (nzchar(x)) {
R/list_files.R Outdated
Comment on lines +31 to +35
list_files <- function(container, path = "", ext = "", recursive = TRUE) {
stopifnot(rlang::is_character(c(path, ext), 2))
stopifnot(rlang::is_bool(recursive))
pnf_msg <- ct_error_msg("Path {.val {path}} not found")
check_that(path, \(x) AzureStor::blob_dir_exists(container, x), pnf_msg)
stopifnot(rlang::is_character(c(path, ext), 2))
stopifnot(rlang::is_bool(recursive))
pnf_msg <- ct_error_msg("Path {.val {path}} not found")
check_that(path, \(x) AzureStor::blob_dir_exists(container, x), pnf_msg)
Comment on lines 129 to 130
"Alternatively, running {.fn AzureRMR::get_azure_login} or
{.fn AzureRMR::list_azure_tokens} may shed some light on the problem."
Comment on lines +64 to +70
resource = generate_resource(),
tenant = "common",
client_id = NULL,
auth_method = "authorization_code",
aad_version = 1,
force_refresh = FALSE,
...
Comment on lines +19 to +22
container_name = NULL,
token = NULL,
endpoint_url = NULL,
...
Comment on lines +29 to +33
read_azure_parquet <- function(container, file, path = "/", info = NULL, ...) {
check_blob_exists(container, file, "parquet", info, path) |>
# using `dest = NULL` means pass the data through as a raw vector
AzureStor::download_blob(container, src = _, dest = NULL) |>
arrow::read_parquet(...)
check_blob_exists(container, file, "parquet", info, path) |>
# using `dest = NULL` means pass the data through as a raw vector
AzureStor::download_blob(container, src = _, dest = NULL) |>
arrow::read_parquet(...)
Comment on lines +13 to +17
read_azure_table <- function(
table_name = NULL,
table_endpoint = NULL,
token = NULL,
...
table_name = NULL,
table_endpoint = NULL,
token = NULL,
...
@tomjemmett
Copy link
Copy Markdown
Member Author

I'm going to recreate this after #90

@tomjemmett tomjemmett closed this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants