* using log directory ‘/srv/hornik/tmp/CRAN_pretest/GitStats.Rcheck’ * using R Under development (unstable) (2024-10-17 r87242) * using platform: x86_64-pc-linux-gnu * R was compiled by Debian clang version 18.1.8 (9) Debian flang-new version 18.1.8 (9) * running under: Debian GNU/Linux trixie/sid * using session charset: UTF-8 * checking for file ‘GitStats/DESCRIPTION’ ... OK * this is package ‘GitStats’ version ‘2.1.1’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... [4s/5s] NOTE Maintainer: ‘Maciej Banas ’ New submission Possibly misspelled words in DESCRIPTION: GitLab (2:39, 10:93) Found the following (possibly) invalid URLs: URL: (https://github.com/r-world-devs/GitStats/issues/345) From: NEWS.md Message: Invalid URI scheme * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking serialization versions ... OK * checking whether package ‘GitStats’ can be installed ... [8s/8s] OK * checking package directory ... OK * checking for future file timestamps ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [1s/1s] OK * checking whether the package can be loaded with stated dependencies ... [1s/1s] OK * checking whether the package can be unloaded cleanly ... [1s/1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK * checking whether the namespace can be unloaded cleanly ... [1s/1s] OK * checking loading without being on the library search path ... [1s/1s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [4s/4s] OK * checking Rd files ... [0s/0s] OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [1s/1s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [6s/14s] ERROR Running ‘spelling.R’ [0s/0s] Running ‘testthat.R’ [6s/14s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(GitStats) > > test_check("GitStats") ... [ FAIL 35 | WARN 0 | SKIP 51 | PASS 463 ] ══ Skipped tests (51) ══════════════════════════════════════════════════════════ • On CRAN (51): 'test-01-get_repos-GitHub.R:4:3', 'test-01-get_repos-GitHub.R:229:3', 'test-01-get_repos-GitHub.R:241:3', 'test-01-get_repos-GitHub.R:402:3', 'test-01-get_repos-GitHub.R:472:3', 'test-01-get_repos-GitLab.R:4:3', 'test-01-get_repos-GitLab.R:192:3', 'test-01-get_repos-GitStats.R:75:3', 'test-get_commits-GitHub.R:9:3', 'test-get_commits-GitLab.R:64:3', 'test-get_files_content-GitHub.R:4:3', 'test-get_files_content-GitLab.R:4:3', 'test-get_files_content-GitLab.R:114:3', 'test-get_files_structure-GitHub.R:4:3', 'test-get_files_structure-GitHub.R:204:3', 'test-get_files_structure-GitHub.R:256:3', 'test-get_files_structure-GitLab.R:4:3', 'test-get_files_structure-GitLab.R:177:3', 'test-get_files_structure-GitLab.R:238:3', 'test-get_files_structure-GitStats.R:25:3', 'test-get_files_structure-GitStats.R:40:3', 'test-get_release-GitHub.R:4:3', 'test-get_release-GitLab.R:4:3', 'test-get_usage_R_package.R:98:3', 'test-get_user-GitHub.R:4:3', 'test-get_user-GitLab.R:4:3', 'test-helpers.R:2:3', 'test-helpers.R:38:3', 'test-helpers.R:46:3', 'test-helpers.R:52:3', 'test-helpers.R:70:3', 'test-helpers.R:90:3', 'test-helpers.R:114:3', 'test-helpers.R:145:3', 'test-helpers.R:155:3', 'test-helpers.R:173:3', 'test-set_host.R:4:3', 'test-set_host.R:21:3', 'test-set_host.R:31:3', 'test-set_host.R:43:3', 'test-set_host.R:59:3', 'test-set_host.R:75:3', 'test-set_host.R:92:3', 'test-set_host.R:107:3', 'test-set_host.R:128:3', 'test-set_host.R:145:3', 'test-z-GitStats.R:8:3', 'test-z-GitStats.R:13:3', 'test-z-GitStats.R:34:3', 'test-z-GitStats.R:40:3', 'test-z-GitStats.R:88:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-01-get_repos-GitHub.R:261:3'): `get_repos_issues()` adds issues to repos table ── Error in `if (nrow(repos_table) > 0) { repos_iterator <- paste0(repos_table$organization, "/", repos_table$repo_name) issues <- purrr::map_dfr(repos_iterator, function(repo_path) { issues_endpoint <- paste0(private$endpoints[["repositories"]], repo_path, "/issues") issues <- self$response(endpoint = issues_endpoint) data.frame(open = length(purrr::keep(issues, ~.$state == "open")), closed = length(purrr::keep(issues, ~.$state == "closed"))) }, .progress = if (progress) { "Pulling repositories issues..." } else { FALSE }) repos_table$issues_open <- issues$open repos_table$issues_closed <- issues$closed }`: argument is of length zero Backtrace: ▆ 1. ├─base::suppressMessages(...) at test-01-get_repos-GitHub.R:261:3 2. │ └─base::withCallingHandlers(...) 3. └─test_rest_github$get_repos_issues(gh_repos_by_code_table, progress = FALSE) ── Failure ('test-01-get_repos-GitHub.R:294:3'): `get_repos_with_code_from_orgs()` works ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'stars', 'forks', 'created_at', 'last_activity_at', 'languages', 'issues_open', 'issues_closed', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(repos_with_code_from_orgs_full) at test-01-get_repos-GitHub.R:294:3 2. └─testthat::expect_named(repos_object, repo_cols) at tests/testthat/helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:294:3'): `get_repos_with_code_from_orgs()` works ── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(repos_with_code_from_orgs_full) at test-01-get_repos-GitHub.R:294:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at tests/testthat/helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:314:3'): `get_repos_with_code_from_orgs()` pulls minimum version of table ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:314:3 2. └─testthat::expect_named(repos_object, repo_cols) at tests/testthat/helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:314:3'): `get_repos_with_code_from_orgs()` pulls minimum version of table ── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:314:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at tests/testthat/helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:362:3'): get_repos_with_code() works ─── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'stars', 'forks', 'created_at', 'last_activity_at', 'languages', 'issues_open', 'issues_closed', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code) at test-01-get_repos-GitHub.R:362:3 2. └─testthat::expect_named(repos_object, repo_cols) at tests/testthat/helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:362:3'): get_repos_with_code() works ─── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code) at test-01-get_repos-GitHub.R:362:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at tests/testthat/helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:379:3'): get_repos_with_code() works ─── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code_min, repo_cols = repo_min_colnames) at test-01-get_repos-GitHub.R:379:3 2. └─testthat::expect_named(repos_object, repo_cols) at tests/testthat/helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitHub.R:379:3'): get_repos_with_code() works ─── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(github_repos_with_code_min, repo_cols = repo_min_colnames) at test-01-get_repos-GitHub.R:379:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at tests/testthat/helper-expect-tables.R:36:3 ── Failure ('test-01-get_repos-GitHub.R:541:3'): `get_repos()` pulls table in minimalist version ── `repos_object` is not an S3 object Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:541:3 2. └─testthat::expect_s3_class(repos_object, "data.frame") at tests/testthat/helper-expect-tables.R:34:3 ── Failure ('test-01-get_repos-GitHub.R:541:3'): `get_repos()` pulls table in minimalist version ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:541:3 2. └─testthat::expect_named(repos_object, repo_cols) at tests/testthat/helper-expect-tables.R:35:3 ── Error ('test-01-get_repos-GitHub.R:541:3'): `get_repos()` pulls table in minimalist version ── Error in `expect_compare(">", act, exp)`: Result of comparison must be a single logical value Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitHub.R:541:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at tests/testthat/helper-expect-tables.R:36:3 3. └─testthat:::expect_compare(">", act, exp) 4. └─rlang::abort("Result of comparison must be a single logical value") ── Error ('test-01-get_repos-GitLab.R:211:3'): `get_repos_issues()` adds issues to repos table ── Error in `if (nrow(repos_table) > 0) { issues <- purrr::map(repos_table$repo_id, function(repos_id) { id <- gsub("gid://gitlab/Project/", "", repos_id) issues_endpoint <- paste0(self$rest_api_url, "/projects/", id, "/issues_statistics") self$response(endpoint = issues_endpoint)[["statistics"]][["counts"]] }, .progress = if (progress) { "Pulling repositories issues..." } else { FALSE }) repos_table$issues_open <- purrr::map_dbl(issues, ~.$opened) repos_table$issues_closed <- purrr::map_dbl(issues, ~.$closed) }`: argument is of length zero Backtrace: ▆ 1. └─test_rest_gitlab$get_repos_issues(gl_repos_by_code_table, progress = FALSE) at test-01-get_repos-GitLab.R:211:3 ── Failure ('test-01-get_repos-GitStats.R:41:3'): get_repos_from_hosts pulls table in minimalist version ── Names of `repos_object` ('') don't match 'repo_id', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitStats.R:41:3 2. └─testthat::expect_named(repos_object, repo_cols) at tests/testthat/helper-expect-tables.R:35:3 ── Failure ('test-01-get_repos-GitStats.R:41:3'): get_repos_from_hosts pulls table in minimalist version ── nrow(repos_object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_repos_table(...) at test-01-get_repos-GitStats.R:41:3 2. └─testthat::expect_gt(nrow(repos_object), 0) at tests/testthat/helper-expect-tables.R:36:3 ── Failure ('test-get_commits-GitLab.R:91:3'): get_commits_from_orgs works ───── Names of `get_commits_object` ('id', 'committed_date', 'author', 'additions', 'deletions', 'repository', 'organization', 'api_url') don't match 'id', 'committed_date', 'author', 'author_login', 'author_name', 'additions', 'deletions', 'repository', 'organization', 'api_url' Backtrace: ▆ 1. └─GitStats:::expect_commits_table(gl_commits_table) at test-get_commits-GitLab.R:91:3 2. └─testthat::expect_named(get_commits_object, commit_cols) at tests/testthat/helper-expect-tables.R:52:3 ── Failure ('test-get_commits-GitLab.R:108:3'): get_commits for GitLab works with repos implied ── Names of `get_commits_object` ('id', 'committed_date', 'author', 'additions', 'deletions', 'repository', 'organization', 'api_url') don't match 'id', 'committed_date', 'author', 'author_login', 'author_name', 'additions', 'deletions', 'repository', 'organization', 'api_url' Backtrace: ▆ 1. └─GitStats:::expect_commits_table(gl_commits_table) at test-get_commits-GitLab.R:108:3 2. └─testthat::expect_named(get_commits_object, commit_cols) at tests/testthat/helper-expect-tables.R:52:3 ── Failure ('test-get_files_content-GitLab.R:139:3'): checker properly identifies gitlab files responses ── test_graphql_gitlab_priv$response_prepared_by_iteration(files_response = test_mocker$use("gitlab_files_response_by_repos")) is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── `files_object` is not an S3 object Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_s3_class(files_object, "data.frame") at tests/testthat/helper-expect-tables.R:76:3 ── Failure ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── Names of `files_object` ('') don't match 'repo_name', 'repo_id', 'organization', 'file_path', 'file_content', 'file_size', 'repo_url' Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_named(...) at tests/testthat/helper-expect-tables.R:77:3 ── Failure ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── files_object$file_size has type 'NULL', not 'integer'. Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_type(files_object$file_size, "integer") at tests/testthat/helper-expect-tables.R:83:3 ── Error ('test-get_files_content-GitLab.R:162:3'): GitLab prepares table from files response prepared in alternative way ── Error in `expect_compare(">", act, exp)`: Result of comparison must be a single logical value Backtrace: ▆ 1. └─GitStats:::expect_files_table(gl_files_table) at test-get_files_content-GitLab.R:162:3 2. └─testthat::expect_gt(nrow(files_object), 0) at tests/testthat/helper-expect-tables.R:84:3 3. └─testthat:::expect_compare(">", act, exp) 4. └─rlang::abort("Result of comparison must be a single logical value") ── Failure ('test-get_files_structure-GitLab.R:206:3'): get_path_from_files_structure gets file path from files structure ── typeof(file_path) (`actual`) not equal to "character" (`expected`). `actual`: "NULL" `expected`: "character" ── Failure ('test-get_files_structure-GitLab.R:207:3'): get_path_from_files_structure gets file path from files structure ── length(file_path) > 0 is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-get_files_structure-GitLab.R:222:3'): get_files_structure pulls files structure for repositories in orgs ── names(gl_files_structure_from_orgs) (`actual`) not equal to c("mbtests") (`expected`). `actual` is NULL `expected` is a character vector ('mbtests') ── Failure ('test-get_usage_R_package.R:15:3'): get_R_package_as_dependency work correctly ── nrow(R_package_as_dependency) is not strictly more than 0. Difference: 0 ── Failure ('test-get_usage_R_package.R:36:3'): get_R_package_loading work correctly ── nrow(R_package_loading) is not strictly more than 0. Difference: 0 ── Failure ('test-get_usage_R_package.R:60:3'): get_R_package_usage_from_hosts works as expected ── Names of `object` ('') don't match 'package', 'package_usage', 'repo_id', 'repo_fullname', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:60:3 2. └─testthat::expect_named(...) at tests/testthat/helper-expect-tables.R:16:3 ── Failure ('test-get_usage_R_package.R:60:3'): get_R_package_usage_from_hosts works as expected ── nrow(object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:60:3 2. └─testthat::expect_gt(nrow(object), 0) at tests/testthat/helper-expect-tables.R:19:3 ── Error ('test-get_usage_R_package.R:83:3'): get_R_package_usage_from_hosts with split_output works ── Error in `map(.x, .f, ..., .progress = .progress)`: i In index: 1. i With name: shiny. Caused by error: ! Names of `object` ('') don't match 'package', 'package_usage', 'repo_id', 'repo_fullname', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' ── Failure ('test-get_usage_R_package.R:117:3'): get_R_package_usage works ───── Names of `object` ('') don't match 'package', 'package_usage', 'repo_id', 'repo_fullname', 'repo_name', 'default_branch', 'created_at', 'organization', 'repo_url', 'api_url', 'platform' Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:117:3 2. └─testthat::expect_named(...) at tests/testthat/helper-expect-tables.R:16:3 ── Failure ('test-get_usage_R_package.R:117:3'): get_R_package_usage works ───── nrow(object) is not strictly more than 0. Difference: 0 Backtrace: ▆ 1. └─GitStats:::expect_package_usage_table(R_package_usage_table) at test-get_usage_R_package.R:117:3 2. └─testthat::expect_gt(nrow(object), 0) at tests/testthat/helper-expect-tables.R:19:3 ── Failure ('test-get_usage_R_package.R:118:3'): get_R_package_usage works ───── `R_package_usage_table` inherits from 'tbl_df'/'tbl'/'data.frame' not 'R_package_usage'. ── Error ('test-z-GitStats.R:17:3'): GitStats prints the proper info when repos are passed instead of orgs. ── Error: x Token exists but does not grant access. i Check if you use correct token. ! Scope that is needed: [public_repo, read:org, read:user]. Backtrace: ▆ 1. ├─base::suppressMessages(...) at test-z-GitStats.R:17:3 2. │ └─base::withCallingHandlers(...) 3. ├─... %>% ... 4. ├─GitStats::set_gitlab_host(...) 5. └─GitStats::set_github_host(...) 6. └─gitstats_object$set_github_host(...) 7. └─GitHostGitHub$new(...) 8. └─GitStats (local) initialize(...) 9. └─super$initialize(...) 10. └─private$set_token(token = token, verbose = verbose) 11. └─private$check_token(token) 12. └─cli::cli_abort(...) 13. └─rlang::abort(...) ── Error ('test-z-GitStats.R:110:1'): (code run outside of `test_that()`) ────── Error in `private$check_token(token)`: ℹ No token provided. Backtrace: ▆ 1. ├─base::suppressMessages(...) at test-z-GitStats.R:110:1 2. │ └─base::withCallingHandlers(...) 3. ├─create_gitstats() %>% ... 4. └─GitStats::set_gitlab_host(...) 5. └─gitstats_object$set_gitlab_host(...) 6. └─GitHostGitLab$new(...) 7. └─GitStats (local) initialize(...) 8. └─super$initialize(...) 9. └─private$set_token(token = token, verbose = verbose) 10. └─private$check_token(token) 11. └─cli::cli_abort(c(i = "No token provided.")) 12. └─rlang::abort(...) [ FAIL 35 | WARN 0 | SKIP 51 | PASS 463 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [2s/2s] OK * checking PDF version of manual ... [3s/3s] OK * checking HTML version of manual ... [0s/0s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 1 NOTE