software-review icon indicating copy to clipboard operation
software-review copied to clipboard

suwo: Access Nature Media Repositories

Open maRce10 opened this issue 2 months ago • 50 comments

Submitting Author Name: Marcelo Araya Salas Submitting Author Github Handle: @maRce10 Other Package Authors Github handles: (comma separated, delete if none) @Jorge-Elizondo-C Repository: https://github.com/maRce10/suwo Version submitted: Submission type: Standard Editor: @adamhsparks Reviewers: @Aariq

Due date for @Aariq: 2025-12-31

Archive: TBD Version accepted: TBD Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Package: suwo
Type: Package
Title: Access Nature Media Repositories Through R
Version: 0.1.0
Maintainer: Marcelo Araya-Salas <[email protected]>
Description: Streamline searching/downloading of nature media files (e.g. audios, photos) from online repositories. The package offers functions for,obtaining media metadata from online repositories, downloading associated media files ad updating data sets with new records.
URL: https://marce10.github.io/suwo/, https://github.com/maRce10/suwo
BugReports: https://github.com/maRce10/suwo/issues/
License: GPL (>= 2)
Encoding: UTF-8
Imports:
    checkmate,
    cli,
    methods,
    pbapply,
    utils,
    viridis,
    rlang,
    httr,
    jsonlite,
    kableExtra,
    lubridate,
    tools,
    RecordLinkage,
    jpeg,
    fs
Suggests: 
    covr,
    testthat,
    leaflet,
    knitr,
    rmarkdown,
    graphics
Depends:
    R (>= 3.5)
Config/testthat/edition: 3
RoxygenNote: 7.3.2
Authors@R: 
    c(person("Marcelo", "Araya-Salas", 
      role = c("aut", "cre"), 
      email = "[email protected]", 
      comment = c(ORCID = "0000-0003-3594-619X")),
      person("Jorge", "Elizondo-Calvo", 
      role = c("aut")),
      person("Alejandro", "Rico-Guevara", 
      role = c("aut"), 
      email = "[email protected]", 
      comment = c(ORCID = "0000-0003-4067-5312")))
VignetteBuilder: knitr

Scope

  • Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):

    • [x] data retrieval
    • [ ] data extraction
    • [ ] data munging
    • [ ] data deposition
    • [ ] data validation and testing
    • [ ] workflow automation
    • [ ] version control
    • [ ] citation management and bibliometrics
    • [ ] scientific software wrappers
    • [ ] field and lab reproducibility tools
    • [ ] database software bindings
    • [ ] geospatial data
    • [ ] translation
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences):

It downloads metadata and media files from nature media repositories

  • Who is the target audience and what are scientific applications of this package?

Nature media files are increasingly used in diverse fields ranging from ecology and evolutionary biology (e.g. trait evolution) to wildlife monitoring and conservation (training species detection models).

The package warbleR (which I maintain) offers a tool to download media files from a single repository. The package wikiaves (https://github.com/athospd/wikiaves) does a similar thing (but does not seem to be working). suwo includes functions for 5 repositories (including those from the other packages) and also offers a single framework to combine and curate data from different sources.

Yes.

  • If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.

  • Explain reasons for any pkgcheck items which your package is unable to pass.

Code coverage is already 80% (https://app.codecov.io/gh/maRce10/suwo/tree/main) for branch main (pkgcheck seems to be picking up the (deleted) "master" branch results)

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

  • [x] Do you intend for this package to go on CRAN?

  • [ ] Do you intend for this package to go on Bioconductor?

  • [x] Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:

Yes, but not right now.

MEE Options
  • [x] The package is novel and will be of interest to the broad readership of the journal.
  • [ ] The manuscript describing the package is no longer than 3000 words.
  • [ ] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see MEE's Policy on Publishing Code)
  • (Scope: Do consider MEE's Aims and Scope for your manuscript. We make no guarantee that your manuscript will be within MEE scope.)
  • (Although not required, we strongly recommend having a full manuscript prepared when you submit here.)
  • (Please do not submit your package separately to Methods in Ecology and Evolution)

Code of conduct

  • [x] I agree to abide by rOpenSci's Code of Conduct during the review process and in maintaining my package should it be accepted.

maRce10 avatar Nov 11 '25 22:11 maRce10

@ropensci-review-bot check package

jhollist avatar Nov 17 '25 13:11 jhollist

Thanks, about to send the query.

ropensci-review-bot avatar Nov 17 '25 13:11 ropensci-review-bot

:rocket:

The following problem was found in your submission template:

  • submission type must be one of [Standard, Estandar, Stats, Pre-submission, pre-envio] Editors: Please ensure these problems with the submission template are rectified. Package checks have been started regardless.

:wave:

ropensci-review-bot avatar Nov 17 '25 13:11 ropensci-review-bot

@maRce10 please see the note above regarding the submission type and set it to the appropriate one for this submission. Thanks!

jhollist avatar Nov 17 '25 13:11 jhollist

Checks for suwo (v0.1.0)

git hash: 8e230a5e

  • :heavy_check_mark: Package name is available
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_check_mark: Package has continuous integration checks, but no badges on README
  • :heavy_multiplication_x: Package coverage failed
  • :heavy_multiplication_x: R CMD check found 1 error.
  • :heavy_check_mark: R CMD check found no warnings.
  • :eyes: Some goodpractice linters failed.
  • :eyes: Function names are duplicated in other packages

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with :eyes: may be optionally addressed.)

Package License: GPL (>= 2)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 330
internal parallel 9
internal suwo 9
internal stats 7
internal grDevices 1
imports methods 10
imports httr 10
imports utils 9
imports jsonlite 7
imports cli 5
imports rlang 4
imports pbapply 3
imports checkmate 1
imports lubridate 1
imports tools 1
imports RecordLinkage 1
imports viridis NA
imports kableExtra NA
imports jpeg NA
imports fs NA
suggests leaflet 5
suggests graphics 4
suggests covr NA
suggests testthat NA
suggests knitr NA
suggests rmarkdown NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

c (22), names (20), paste0 (15), for (14), lapply (13), args (11), as.list (11), vapply (11), as.numeric (10), length (10), try (10), data.frame (9), match.call (9), seq_len (9), character (8), list (8), rbind (8), do.call (7), format (7), getOption (7), nrow (7), url (6), as.data.frame (4), floor (4), if (4), is.na (4), seq_along (4), switch (4), unique (4), unlist (4), ifelse (3), logical (3), Sys.Date (3), tolower (3), any (2), as.integer (2), call (2), grepl (2), max (2), min (2), options (2), setdiff (2), strsplit (2), sub (2), t (2), trimws (2), as.factor (1), by (1), cbind (1), ceiling (1), drop (1), environment (1), eval (1), expand.grid (1), file.exists (1), file.path (1), get (1), gsub (1), is.factor (1), labels (1), library (1), message (1), normalizePath (1), parent.env (1), parse (1), paste (1), regexpr (1), regmatches (1), return (1), seq (1), sort (1), stop (1), sum (1), table (1), vector (1), which (1)

httr

content (7), GET (3)

methods

as (7), new (3)

parallel

makePSOCKcluster (6), mclapply (2), detectCores (1)

suwo

pblapply_sw_int (5), find_duplicates (1), map_locations (1), merge_metadata (1), query_gbif (1)

utils

page (3), fileSnapshot (2), changedFiles (1), data (1), download.file (1), URLencode (1)

jsonlite

fromJSON (7)

stats

end (2), offset (2), start (2), complete.cases (1)

cli

pluralize (4), cli_bullets (1)

leaflet

JS (2), awesomeIcons (1), leaflet (1), markerClusterOptions (1)

graphics

text (2), title (2)

rlang

arg_match (4)

pbapply

splitpb (2), startpb (1)

checkmate

makeAssertCollection (1)

grDevices

palette (1)

lubridate

parse_date_time (1)

RecordLinkage

compare.dedup (1)

tools

file_ext (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 15 files) and
  • 3 authors
  • 1 vignette
  • no internal data file
  • 15 imported packages
  • 11 exported functions (median 99 lines of code)
  • 63 non-exported functions in R (median 27 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 15 71.0
files_vignettes 1 61.2
files_tests 13 90.0
loc_R 2078 82.2
loc_vignettes 518 77.2
loc_tests 748 77.4
num_vignettes 1 58.2
n_fns_r 74 66.7
n_fns_r_exported 11 48.6
n_fns_r_not_exported 63 71.5
n_fns_per_file_r 3 47.9
num_params_per_fn 7 84.0
loc_per_fn_r 33 79.4
loc_per_fn_r_exp 99 91.8
loc_per_fn_r_not_exp 27 74.6
rel_whitespace_R 23 85.8
rel_whitespace_vignettes 48 86.9
rel_whitespace_tests 54 91.4
doclines_per_fn_exp 80 84.4
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 107 78.8

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

(There do not appear to be any)

GitHub Workflow Results

id name conclusion sha run_number date
19345191019 pages build and deployment success bb2926 160 2025-11-13
19345069344 pkgcheck success 8e230a 4 2025-11-13
19345069378 pkgdown success 8e230a 272 2025-11-13
19345069332 R-CMD-check success 8e230a 30 2025-11-13
19429497573 Render README success 8e230a 94 2025-11-17
19345069351 test-coverage.yaml success 8e230a 55 2025-11-13
19336749686 Update CITATION.cff success 3dbc9f 4 2025-11-13

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output:

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(suwo)

Please cite 'suwo' as:

Araya-Salas, M., J. Elizondo-Calvo & A. Rico-Guevara. 2025. suwo: access nature media repositories. R package version 0.1.0.

test_check("suwo") Killed

R CMD check generated the following test_fail:

  1. 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(suwo)

Please cite 'suwo' as:

Araya-Salas, M., J. Elizondo-Calvo & A. Rico-Guevara. 2025. suwo: access nature media repositories. R package version 0.1.0.

test_check("suwo") Killed

R CMD check generated the following check_fail:

  1. rcmdcheck_tests_pass

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
query_wikiaves 32
pblapply_sw_int 28
query_inaturalist 24
query_macaulay 24
query_gbif 23
query_xenocanto 22
download_media 20
update_metadata 19

Static code analyses with lintr

lintr found no issues with this package!


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 3 function names are duplicated in other packages:

    • find_duplicates from revtools, synthesisr, hablar, kim, manydata, cleanepi
    • remove_duplicates from basecamb, gatoRs, gtfstools, spatialEco, cleanepi
    • update_metadata from projects, git2rdata, rjdworkspace

Package Versions

package version
pkgstats 0.2.0.75
pkgcheck 0.1.2.240

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Nov 17 '25 14:11 ropensci-review-bot

Thanks! the error from R CMD is unexpected as I have an R CMD github workflow (as suggested in the submission guidelines) which finds no errors: https://github.com/maRce10/suwo/actions/workflows/R-CMD-check.yaml

maRce10 avatar Nov 17 '25 14:11 maRce10

and this is the summary of the pkgcheck workflow results: https://github.com/maRce10/suwo/issues/33#issuecomment-3542763701

maRce10 avatar Nov 17 '25 16:11 maRce10

@mpadge Any thoughts on the failures? I can confirm it passes locally for me and the actions on https://github.com/maRce10/suwo/issues/33#issuecomment-3542763701 look good as well.

jhollist avatar Nov 17 '25 19:11 jhollist

@jhollist @maRce10 If you click in the "goodpractice and other checks" section of the checks above, you'll see these lines buried within the output there:

test_check("suwo") Killed

I can also reproduce that within the docker container we use for our checks. Unfortunately, the only output is that statement, "killed", with no extra information. I'll find time asap to investigate further, but this kind of issue generally suggests a problem with the package being checked, so @maRce10 if you can, I'd advise spinning up a local version of the Docker container with your package and all dependencies installed, and then running testthat::test_check("sumo") to see whether you can uncover anything.

mpadge avatar Nov 18 '25 04:11 mpadge

I was able to spot the issue using the docker container (an issue with a dependency). I fixed that and updated the package. So it should work now

maRce10 avatar Nov 18 '25 17:11 maRce10

@ropensci-review-bot check package

jhollist avatar Nov 18 '25 18:11 jhollist

Thanks, about to send the query.

ropensci-review-bot avatar Nov 18 '25 18:11 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Nov 18 '25 18:11 ropensci-review-bot

Checks for suwo (v0.1.0)

git hash: a3fc1032

  • :heavy_check_mark: Package name is available
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_check_mark: Package has continuous integration checks.
  • :heavy_multiplication_x: Package coverage failed
  • :heavy_multiplication_x: R CMD check found 1 error.
  • :heavy_check_mark: R CMD check found no warnings.
  • :eyes: Some goodpractice linters failed.
  • :eyes: Function names are duplicated in other packages
  • :eyes: Package has unusually large number of 16 Imports (> 95% of all packages)

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with :eyes: may be optionally addressed.)

Package License: GPL (>= 2)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 330
internal parallel 9
internal suwo 9
internal stats 7
internal grDevices 1
imports methods 10
imports httr 10
imports utils 9
imports jsonlite 7
imports cli 5
imports leaflet 5
imports rlang 4
imports pbapply 3
imports checkmate 1
imports lubridate 1
imports tools 1
imports RecordLinkage 1
imports viridis NA
imports kableExtra NA
imports jpeg NA
imports fs NA
suggests graphics 4
suggests covr NA
suggests testthat NA
suggests knitr NA
suggests rmarkdown NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

c (22), names (20), paste0 (15), for (14), lapply (13), args (11), as.list (11), vapply (11), as.numeric (10), length (10), try (10), data.frame (9), match.call (9), seq_len (9), character (8), list (8), rbind (8), do.call (7), format (7), getOption (7), nrow (7), url (6), as.data.frame (4), floor (4), if (4), is.na (4), seq_along (4), switch (4), unique (4), unlist (4), ifelse (3), logical (3), Sys.Date (3), tolower (3), any (2), as.integer (2), call (2), grepl (2), max (2), min (2), options (2), setdiff (2), strsplit (2), sub (2), t (2), trimws (2), as.factor (1), by (1), cbind (1), ceiling (1), drop (1), environment (1), eval (1), expand.grid (1), file.exists (1), file.path (1), get (1), gsub (1), is.factor (1), labels (1), library (1), message (1), normalizePath (1), parent.env (1), parse (1), paste (1), regexpr (1), regmatches (1), return (1), seq (1), sort (1), stop (1), sum (1), table (1), vector (1), which (1)

httr

content (7), GET (3)

methods

as (7), new (3)

parallel

makePSOCKcluster (6), mclapply (2), detectCores (1)

suwo

pblapply_sw_int (5), find_duplicates (1), map_locations (1), merge_metadata (1), query_gbif (1)

utils

page (3), fileSnapshot (2), changedFiles (1), data (1), download.file (1), URLencode (1)

jsonlite

fromJSON (7)

stats

end (2), offset (2), start (2), complete.cases (1)

cli

pluralize (4), cli_bullets (1)

leaflet

JS (2), awesomeIcons (1), leaflet (1), markerClusterOptions (1)

graphics

text (2), title (2)

rlang

arg_match (4)

pbapply

splitpb (2), startpb (1)

checkmate

makeAssertCollection (1)

grDevices

palette (1)

lubridate

parse_date_time (1)

RecordLinkage

compare.dedup (1)

tools

file_ext (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 15 files) and
  • 3 authors
  • 1 vignette
  • no internal data file
  • 16 imported packages
  • 11 exported functions (median 99 lines of code)
  • 63 non-exported functions in R (median 27 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 15 70.9
files_vignettes 1 61.2
files_tests 13 90.0
loc_R 2074 82.2
loc_vignettes 518 77.2
loc_tests 743 77.2
num_vignettes 1 58.2
n_fns_r 74 66.7
n_fns_r_exported 11 48.6
n_fns_r_not_exported 63 71.5
n_fns_per_file_r 3 47.9
num_params_per_fn 7 84.0
loc_per_fn_r 33 79.3
loc_per_fn_r_exp 99 91.8
loc_per_fn_r_not_exp 27 74.5
rel_whitespace_R 23 85.7
rel_whitespace_vignettes 48 86.9
rel_whitespace_tests 54 91.3
doclines_per_fn_exp 80 84.4
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 106 78.6

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

pkgcheck R-CMD-check.yaml

GitHub Workflow Results

id name conclusion sha run_number date
19474654644 pages build and deployment success c19f57 162 2025-11-18
19474507827 pkgcheck success 1c3fad 6 2025-11-18
19474507812 pkgdown success 1c3fad 274 2025-11-18
19474507790 R-CMD-check success 1c3fad 32 2025-11-18
19466062010 Render README success 53b614 95 2025-11-18
19474507787 test-coverage.yaml success 1c3fad 57 2025-11-18
19474507801 Update CITATION.cff success 1c3fad 5 2025-11-18

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output:

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(suwo)

Please cite 'suwo' as:

Araya-Salas, M., J. Elizondo-Calvo & A. Rico-Guevara. 2025. suwo: access nature media repositories. R package version 0.1.0.

test_check("suwo") Killed

R CMD check generated the following test_fail:

  1. 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(suwo)

Please cite 'suwo' as:

Araya-Salas, M., J. Elizondo-Calvo & A. Rico-Guevara. 2025. suwo: access nature media repositories. R package version 0.1.0.

test_check("suwo") Killed

R CMD check generated the following check_fail:

  1. rcmdcheck_tests_pass

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
query_wikiaves 32
pblapply_sw_int 28
query_inaturalist 24
query_macaulay 24
query_gbif 23
query_xenocanto 22
download_media 20
update_metadata 19

Static code analyses with lintr

lintr found no issues with this package!


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 3 function names are duplicated in other packages:

    • find_duplicates from revtools, synthesisr, hablar, kim, manydata, cleanepi
    • remove_duplicates from basecamb, gatoRs, gtfstools, spatialEco, cleanepi
    • update_metadata from projects, git2rdata, rjdworkspace

Package Versions

package version
pkgstats 0.2.0.75
pkgcheck 0.1.2.240

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Nov 18 '25 18:11 ropensci-review-bot

@maRce10 and @mpadge looks like we are still failing at the same way. Unfortunately I don't have ready access to docker to test myself.

jhollist avatar Nov 18 '25 18:11 jhollist

Hmm my local docker does not find any error. Not sure what to do now?

maRce10 avatar Nov 18 '25 23:11 maRce10

@maRce10 I'll be able to check further today, and will report back

mpadge avatar Nov 18 '25 23:11 mpadge

@maRce10 I suspect the "kill" message is due to a timeout. I ran testthat::test_local() in our Docker container with your latest version, and it was still running half a day later. When I killed it, it was still running https://github.com/maRce10/suwo/blob/main/tests/testthat/test_download_media.R. I also note that a lot of your tests have skip conditions like these:

  skip_on_cran()
  skip_if_offline()
  skip_if(!nzchar(Sys.getenv("XENO_CANTO_API_KEY")),
          "Xeno-Canto API key not set")

You should be able to use test mocking facilities to mock API results used in most tests, rather than resort to these kind of conditions, which will effectively only be able to be run by you (and maybe a CI system with your key). We've got lots of detail in our book https://books.ropensci.org/http-testing. I also note that you're using httr for your requests. I'd suggest upgrading from that to httr2, among other reasons because it will make mocking results easier.

Next steps for you

Mandatory:

  • Please ensure that you can run testthat::test_local() on your package within any clean Docker container (like ours or the tidyverse one) and get everything to finish within a reasonable amount of time (like the 10-15 minutes or so you're currently getting on most of your GitHub actions runs).

Optional:

These should be considered issues that are likely to arise during review, and so please interpret "optional" as a reasonably serious recommendation which is likely to greatly aid the review process.

  • Upgrade from httr to httr2.
  • Mock test results to extend coverage without use of API key.

mpadge avatar Nov 19 '25 05:11 mpadge

Not sure if this is the issue, but when I ran tests locally I was not keeping an eye on things. I everntually checked and saw that the tests were waiting for a download to be initiated by the user. Looks like it may be in test_query_macaulay.R? Mocking that should solve it?!?!

jhollist avatar Nov 19 '25 12:11 jhollist

Thank you for your help! I upgraded httr to httr2 and ran a clean docker container (on 3 different computers, 2 OS) that didn't find any error. This is the code I used to run the docker container:

sudo docker run --rm ghcr.io/ropensci-review-tools/pkgcheck bash -c "git clone https://github.com/maRce10/suwo.git /suwo && cd /suwo && Rscript -e 'devtools::install(); testthat::test_local()'"

maRce10 avatar Nov 20 '25 23:11 maRce10

@ropensci-review-bot check package

maRce10 avatar Nov 21 '25 00:11 maRce10

Thanks, about to send the query.

ropensci-review-bot avatar Nov 21 '25 00:11 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Nov 21 '25 00:11 ropensci-review-bot

Checks for suwo (v0.1.0)

git hash: 8bca1995

  • :heavy_check_mark: Package name is available
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_check_mark: Package has continuous integration checks.
  • :heavy_multiplication_x: Package coverage is 70.7% (should be at least 75%).
  • :heavy_check_mark: All goodpractice linters passed.
  • :heavy_check_mark: R CMD check found no errors.
  • :heavy_check_mark: R CMD check found no warnings.
  • :eyes: Function names are duplicated in other packages
  • :eyes: Package has unusually large number of 16 Imports (> 95% of all packages)

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with :eyes: may be optionally addressed.)

Package License: GPL (>= 2)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 320
internal suwo 12
internal parallel 9
internal stats 7
internal grDevices 1
imports httr2 11
imports utils 9
imports jsonlite 8
imports cli 5
imports leaflet 5
imports rlang 4
imports methods 3
imports pbapply 3
imports checkmate 1
imports lubridate 1
imports tools 1
imports RecordLinkage 1
imports viridis NA
imports kableExtra NA
imports jpeg NA
imports fs NA
suggests graphics 4
suggests covr NA
suggests testthat NA
suggests knitr NA
suggests rmarkdown NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

c (22), names (20), for (14), lapply (13), paste0 (13), args (11), as.list (11), length (10), try (10), vapply (10), as.numeric (9), data.frame (9), match.call (9), seq_len (9), character (8), list (8), rbind (8), do.call (7), format (7), getOption (7), nrow (7), as.data.frame (4), floor (4), is.na (4), seq_along (4), switch (4), unique (4), unlist (4), url (4), if (3), ifelse (3), Sys.Date (3), tolower (3), as.integer (2), call (2), grepl (2), max (2), min (2), options (2), setdiff (2), strsplit (2), sub (2), t (2), trimws (2), any (1), as.factor (1), by (1), cbind (1), ceiling (1), drop (1), environment (1), eval (1), expand.grid (1), file.exists (1), file.path (1), get (1), gsub (1), is.factor (1), labels (1), library (1), logical (1), message (1), normalizePath (1), parent.env (1), parse (1), paste (1), regexpr (1), regmatches (1), return (1), seq (1), sort (1), stop (1), sum (1), table (1), vector (1), which (1)

suwo

pblapply_sw_int (5), is_error (3), find_duplicates (1), map_locations (1), merge_metadata (1), query_gbif (1)

httr2

req_perform (3), request (3), resp_body_string (3), req_error (1), resp_body_json (1)

parallel

makePSOCKcluster (6), mclapply (2), detectCores (1)

utils

page (3), fileSnapshot (2), changedFiles (1), data (1), download.file (1), URLencode (1)

jsonlite

fromJSON (8)

stats

end (2), offset (2), start (2), complete.cases (1)

cli

pluralize (4), cli_bullets (1)

leaflet

JS (2), awesomeIcons (1), leaflet (1), markerClusterOptions (1)

graphics

text (2), title (2)

rlang

arg_match (4)

methods

new (3)

pbapply

splitpb (2), startpb (1)

checkmate

makeAssertCollection (1)

grDevices

palette (1)

lubridate

parse_date_time (1)

RecordLinkage

compare.dedup (1)

tools

file_ext (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 15 files) and
  • 3 authors
  • 1 vignette
  • no internal data file
  • 16 imported packages
  • 11 exported functions (median 99 lines of code)
  • 65 non-exported functions in R (median 27 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 15 70.9
files_vignettes 1 61.2
files_tests 13 90.0
loc_R 2084 82.3
loc_vignettes 518 77.2
loc_tests 717 76.4
num_vignettes 1 58.2
n_fns_r 76 67.3
n_fns_r_exported 11 48.6
n_fns_r_not_exported 65 72.2
n_fns_per_file_r 3 48.7
num_params_per_fn 7 84.0
loc_per_fn_r 32 79.2
loc_per_fn_r_exp 99 91.8
loc_per_fn_r_not_exp 27 74.5
rel_whitespace_R 23 85.8
rel_whitespace_vignettes 48 86.9
rel_whitespace_tests 55 91.0
doclines_per_fn_exp 80 84.4
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 106 78.6

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

pkgcheck R-CMD-check.yaml

GitHub Workflow Results

id name conclusion sha run_number date
19554611577 pages build and deployment success 52f33e 165 2025-11-20
19554516090 pkgcheck success 8bca19 9 2025-11-20
19554516096 pkgdown success 8bca19 277 2025-11-20
19554516107 R-CMD-check success 8bca19 35 2025-11-20
19536751124 Render README success a3fc10 97 2025-11-20
19554516133 test-coverage.yaml success 8bca19 60 2025-11-20
19547029597 Update CITATION.cff success 868c1f 6 2025-11-20

3b. goodpractice results

Test coverage with covr

Package coverage: 70.67

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
query_wikiaves 32
pblapply_sw_int 28
query_inaturalist 24
query_macaulay 24
query_gbif 23
query_xenocanto 22
download_media 20
update_metadata 19

Static code analyses with lintr

lintr found no issues with this package!


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 3 function names are duplicated in other packages:

    • find_duplicates from revtools, synthesisr, hablar, kim, manydata, cleanepi
    • remove_duplicates from basecamb, gatoRs, gtfstools, spatialEco, cleanepi
    • update_metadata from projects, git2rdata, rjdworkspace

Package Versions

package version
pkgstats 0.2.0.75
pkgcheck 0.1.2.240

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Nov 21 '25 01:11 ropensci-review-bot

Great work @maRce10 ! The single failing check there is now pretty clear. Can you please let us know your thoughts about mocking some test results to avoid tests only running with API key? That will like also be a great way to extend test coverage. Other than that, I'll hand over to current Editor-in-Chief @jhollist from here on.

mpadge avatar Nov 21 '25 03:11 mpadge

Thanks @mpadge. @maRce10, while you are working on expanding the test coverage, I'll dig into the package a bit so that we will be ready to pass onto a handling editor.

jhollist avatar Nov 21 '25 15:11 jhollist

thanks!

about API mocking: the API key is only needed for 1 function. I would rather avoid API mocking as some API accessing functions send multiple requests to the API server in a single function call, wich is tricky to mock. It's also better to have the function accessing the actual API in order to detect changes in the responses.

I increased the code coverage to 85% including the API key as a secret, but should be around 76% without the key . The docker container found no errors and ran for about 8 minutes. Both RCMD check and pkgcheck workflows passed successfully.

maRce10 avatar Nov 21 '25 20:11 maRce10

@ropensci-review-bot check package

maRce10 avatar Nov 21 '25 20:11 maRce10

Thanks, about to send the query.

ropensci-review-bot avatar Nov 21 '25 20:11 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Nov 21 '25 20:11 ropensci-review-bot