From 4a72f20df3d37f0349b07a417f19a7ae84795d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 26 Jun 2025 11:31:36 +0200 Subject: [PATCH 1/2] fix: Allow matrix attributes by checking their vector size instead of the length --- R/attributes.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/attributes.R b/R/attributes.R index 7bac81c39fa..432b65e0229 100644 --- a/R/attributes.R +++ b/R/attributes.R @@ -576,9 +576,9 @@ i_set_vertex_attr <- function( if (single) { vattrs[[name]][[index]] <- value } else { - if (length(value) == 1) { - value_in <- rep(unname(value), length(index)) - } else if (length(value) == length(index)) { + if (vctrs::vec_size(value) == 1) { + value_in <- rep(unname(value), vctrs::vec_size(index)) + } else if (vctrs::vec_size(value) == length(index)) { value_in <- unname(value) } else { cli::cli_abort( @@ -826,9 +826,9 @@ i_set_edge_attr <- function( if (single) { eattrs[[name]][[index]] <- value } else { - if (length(value) == 1) { - value_in <- rep(unname(value), length(index)) - } else if (length(value) == length(index)) { + if (vctrs::vec_size(value) == 1) { + value_in <- rep(unname(value), vctrs::vec_size(index)) + } else if (vctrs::vec_size(value) == vctrs::vec_size(index)) { value_in <- unname(value) } else { cli::cli_abort( From db8e8c252dd88dc716cb5b30c331b30603ccb1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 26 Jun 2025 14:15:48 +0200 Subject: [PATCH 2/2] ci: No timeout for covr --- .github/workflows/test-coverage.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0ab748d6576..4c8e7efea8f 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -12,6 +12,8 @@ permissions: read-all jobs: test-coverage: runs-on: ubuntu-latest + timeout-minutes: 360 + env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -39,6 +41,7 @@ jobs: shell: Rscript {0} - uses: codecov/codecov-action@v5 + timeout-minutes: 360 with: # Fail if error if not on PR, or if on PR and token is given fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}