ropensci / software-review

rOpenSci Software Peer Review.
286 stars 104 forks source link

baRulho #609

Closed maRce10 closed 3 months ago

maRce10 commented 9 months ago

Date accepted: 2024-03-28 Submitting Author Name: Marcelo Araya-Salas Submitting Author Github Handle: !--author1-->@maRce10<!--end-author1-- Repository: https://github.com/maRce10/baRulho/ Version submitted: 2.1.0 Submission type: Standard Editor: !--editor-->@jhollist<!--end-editor-- Reviewers: @mikemahoney218, @DenaJGibbon

Archive: TBD Version accepted: TBD Language: en


Package: baRulho
Type: Package
Title: Quantifying (Animal) Sound Degradation  
Version: 2.1.0
Author: Marcelo Araya-Salas [aut, cre]
Maintainer: Marcelo Araya-Salas <marcelo.araya@ucr.ac.cr>
Description: Intended to facilitate acoustic analysis of (animal) sound transmission experiments, which typically aim to quantify changes in signal structure when transmitted in a given habitat by broadcasting and re-recording animal sounds at increasing distances. The package offers a workflow with functions to prepare the data set for analysis as well as to calculate and visualize several degradation metrics, including blur ratio, signal-to-noise ratio, excess attenuation and envelope correlation among others (Dabelsteen et al 1993 <doi:10.1121/1.406682>).
License: GPL (>= 2)
Imports: utils, stats, seewave, tuneR, fftw, methods, viridis, Sim.DiffProc, png, checkmate, cli
Depends: R (>= 3.2.1), warbleR (>= 1.1.29), ohun (>= 1.0.0)
LazyData: TRUE
URL: https://github.com/maRce10/baRulho
BugReports: https://github.com/maRce10/baRulho/issues
Suggests:
    rmarkdown,
    ggplot2,
    knitr,
    kableExtra,
    testthat (>= 3.0.0),
    covr,
    formatR,
    Rraven
VignetteBuilder: knitr
RoxygenNote: 7.2.3
Repository: CRANs
Language: en-US
Authors@R: person("Marcelo", "Araya-Salas", role = c("aut", "cre"), email = "marcelo.araya@ucr.ac.cr")
Config/testthat/edition: 3

Scope

It estimates degradation measures from sounds that have been re-recorded in standard playback experiments. It also helps to prepare acoustic data for playback experiments.

Scientific community working with bioacoustic data. Useful to automate analysis of animal acoustic signals for a variety of research questions (e.g. behavior, ecology, evolution, conservation)

Somehow continuous integration is not detected when running pkgcheck::pkgcheck(), but it is fully implemented https://app.codecov.io/gh/maRce10/baRulho?branch=master

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

MEE Options - [x] The package is novel and will be of interest to the broad readership of the journal. - [x] The manuscript describing the package is no longer than 3000 words. - [x] 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](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/journal-resources/policy-on-publishing-code.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) 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

ropensci-review-bot commented 9 months ago

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot commented 9 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 9 months ago

Checks for baRulho (v2.1.0)

git hash: 128b6ca3

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 | 702| |internal |baRulho | 46| |internal |graphics | 45| |internal |parallel | 15| |internal |grDevices | 10| |internal |ohun | 1| |internal |tools | 1| |depends |warbleR | 76| |imports |seewave | 26| |imports |stats | 19| |imports |methods | 16| |imports |tuneR | 7| |imports |checkmate | 6| |imports |cli | 2| |imports |utils | 1| |imports |fftw | NA| |imports |viridis | NA| |imports |Sim.DiffProc | NA| |imports |png | NA| |suggests |rmarkdown | NA| |suggests |ggplot2 | NA| |suggests |knitr | NA| |suggests |kableExtra | NA| |suggests |testthat | NA| |suggests |covr | NA| |suggests |formatR | NA| |suggests |Rraven | 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()', and examining the 'external_calls' table.

base

c (80), names (36), nrow (30), for (26), if (25), unique (25), vapply (25), seq_len (24), length (22), args (21), match.call (21), as.list (20), which (19), lapply (18), getOption (15), is.na (14), list (13), options (13), plot (13), paste (12), rep (12), seq (12), as.character (10), ncol (9), numeric (9), sum (9), do.call (8), rbind (8), data.frame (7), on.exit (7), paste0 (7), seq_along (7), abs (6), min (6), nchar (6), pretty (6), return (5), t (5), as.data.frame (4), cbind (4), character (4), drop (4), labels (4), log10 (4), matrix (4), sort (4), unlist (4), any (3), diff (3), exp (3), file.path (3), max (3), sub (3), units (3), which.min (3), expand.grid (2), rev (2), sqrt (2), suppressWarnings (2), tempdir (2), all (1), call (1), factor (1), file (1), grepl (1), levels (1), list.files (1), match.arg (1), mean (1), range (1), rank (1), setdiff (1), split (1), sprintf (1), strwrap (1), Sys.info (1), tapply (1), tempfile (1), try (1), vector (1), which.max (1)

warbleR

pblapply_wrblr_int (27), read_sound_file (26), envelope (5), cross_correlation (3), freq_range_detec (3), read_wave (3), image_to_wave (2), lessdB (2), check_sels (1), info_sound_files (1), rename_est_waves (1), selection_table (1), simulate_songs (1)

baRulho

check_arguments (21), FUN (12), check_unique_sels (3), check_unique_sound.id (3), check_deprecated (2), check_several_distances (2), attenuation (1), find_peaks_bRlh_int (1), rbind2 (1)

graphics

par (23), grconvertX (9), lines (5), grid (3), grconvertY (2), split.screen (2), close.screen (1)

seewave

env (7), rms (7), pastew (5), duration (3), fpeaks (2), cutw (1), spec (1)

stats

frequency (8), dist (5), approx (1), ave (1), end (1), spectrum (1), start (1), time (1)

methods

new (16)

parallel

makePSOCKcluster (15)

grDevices

palette (4), colors (3), dev.off (1), recordPlot (1), X11 (1)

tuneR

silence (5), normalize (1), writeWave (1)

checkmate

makeAssertionFunction (5), makeAssertCollection (1)

cli

make_ansi_style (1), num_ansi_colors (1)

ohun

template_correlator (1)

tools

find_gs_cmd (1)

utils

str (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 25 files) and - 1 authors - 2 vignettes - 2 internal data files - 11 imported packages - 24 exported functions (median 73 lines of code) - 92 non-exported functions in R (median 22 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](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) 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 | 25| 86.3| | |files_vignettes | 2| 85.7| | |files_tests | 20| 96.3| | |loc_R | 5188| 95.6|TRUE | |loc_vignettes | 791| 87.2| | |loc_tests | 582| 77.8| | |num_vignettes | 2| 89.2| | |data_size_total | 1092464| 95.5|TRUE | |data_size_median | 546232| 97.2|TRUE | |n_fns_r | 116| 79.9| | |n_fns_r_exported | 24| 72.5| | |n_fns_r_not_exported | 92| 82.2| | |n_fns_per_file_r | 3| 45.6| | |num_params_per_fn | 12| 96.6|TRUE | |loc_per_fn_r | 34| 81.2| | |loc_per_fn_r_exp | 73| 87.7| | |loc_per_fn_r_not_exp | 22| 66.9| | |rel_whitespace_R | 20| 95.9|TRUE | |rel_whitespace_vignettes | 60| 96.8|TRUE | |rel_whitespace_tests | 60| 92.1| | |doclines_per_fn_exp | 110| 92.7| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 94| 78.3| | ---

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)

--- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following note: 1. checking installed package size ... NOTE installed size is 10.8Mb sub-directories of 1Mb or more: data 1.6Mb doc 8.7Mb R CMD check generated the following check_fails: 1. cyclocomp 2. no_description_depends 3. no_import_package_as_a_whole 4. rcmdcheck_reasonable_installed_size #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 75.21 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- check_arguments | 74 manual_realign | 64 plot_degradation | 48 plot_blur_FUN | 26 signal_to_noise_ratio | 26 synth_sounds | 23 noise_profile | 22 master_sound_file | 18 set_reference_sounds | 17 detection_distance | 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 664 potential issues: message | number of times --- | --- Avoid 1:nrow(...) expressions, use seq_len. | 2 Avoid library() and require() calls in packages | 12 Avoid using sapply, consider vapply instead, that's type safe | 1 Lines should not be more than 80 characters. | 649


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 2 function names are duplicated in other packages: - - `attenuation` from seewave - - `find_markers` from dtangle


Package Versions

|package |version | |:--------|:-------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.3 |


Editor-in-Chief Instructions:

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

noamross commented 9 months ago

Thank you for this submission @maRce10! Two quick notes before I start the process:

noamross commented 9 months ago

@ropensci-review-bot assign @jhollist as editor

ropensci-review-bot commented 9 months ago

Assigned! @jhollist is now the editor

maRce10 commented 9 months ago

Thank you for this submission @maRce10! Two quick notes before I start the process:

* Some things in our checks are being triggered by some extraneous files committed in your repository: `.Rproj.user`, `.Rhistory`, etc. Some of these are in .gitignore, but probably were committed before that was created.  You can get git of these with the [`git rm --cached <file>`](https://stackoverflow.com/a/1274447/1757441).

* @mpadge, it appears our package checks are not picking up the continuous integration tests in this package, which are set up using {tic}. Is this a bug of ours or due to something in the package setup?

Hi @noamross!

I just removed those weird files maRce10/baRulho@e6f1b4dd5592b290fe1875fe6aee88b683d1f14a

jhollist commented 9 months ago

Hey @maRce10. Long time no see (ha!)

I will get started on this early next week.

Just wanted to let you know that the impending US Gov shutdown may impact my ability to work on this. I am good to work all next week, but if we do shutdown and it is not resolved, I will have to stop all work activities (my serving as an editor counts as one) after the 7th and I can't resume until the shutdown has been lifted. Hopefully this all for naught and I am able to keep on working on this. But I will do what I can to make progress next week.

mpadge commented 9 months ago

@noamross @maRce10 The failing "no continuous integration" check is because it actually just checks for an R CMD check badge in the readme, which this package does not have. It has a lot of badges, but not that critical one. Obviously not a big issue here, and we can clearly accept regardless, but @maRce10 if you want that test to pass, just put a badge linking to your r cmd check status on the README.

maRce10 commented 9 months ago

@noamross @maRce10 The failing "no continuous integration" check is because it actually just checks for an R CMD check badge in the readme, which this package does not have. It has a lot of badges, but not that critical one. Obviously not a big issue here, and we can clearly accept regardless, but @maRce10 if you want that test to pass, just put a badge linking to your r cmd check status on the README.

Thanks! I added the R CMD check badge.

Hey @maRce10. Long time no see (ha!)

I will get started on this early next week.

Just wanted to let you know that the impending US Gov shutdown may impact my ability to work on this. I am good to work all next week, but if we do shutdown and it is not resolved, I will have to stop all work activities (my serving as an editor counts as one) after the 7th and I can't resume until the shutdown has been lifted. Hopefully this all for naught and I am able to keep on working on this. But I will do what I can to make progress next week.

Thanks for letting me know!

jhollist commented 9 months ago

@ropensci-review-bot check baRulho

ropensci-review-bot commented 9 months ago

I'm sorry human, I don't understand that. You can see what commands I support by typing:

@ropensci-review-bot help

jhollist commented 9 months ago

@ropensci-review-bot check package

ropensci-review-bot commented 9 months ago

Thanks, about to send the query.

ropensci-review-bot commented 9 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 9 months ago

Checks for baRulho (v2.1.0)

git hash: 46763a23

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 | 731| |internal |baRulho | 48| |internal |graphics | 45| |internal |parallel | 16| |internal |grDevices | 10| |internal |ohun | 1| |internal |tools | 1| |depends |warbleR | 83| |imports |seewave | 23| |imports |stats | 20| |imports |methods | 17| |imports |tuneR | 7| |imports |checkmate | 7| |imports |cli | 2| |imports |utils | 1| |imports |fftw | NA| |imports |viridis | NA| |imports |Sim.DiffProc | NA| |imports |png | NA| |suggests |rmarkdown | NA| |suggests |ggplot2 | NA| |suggests |knitr | NA| |suggests |kableExtra | NA| |suggests |testthat | NA| |suggests |covr | NA| |suggests |formatR | NA| |suggests |Rraven | 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()', and examining the 'external_calls' table.

base

c (83), names (36), nrow (33), seq_len (28), for (27), if (27), unique (25), vapply (25), length (23), match.call (22), args (21), as.list (21), lapply (19), which (19), getOption (18), is.na (14), list (13), options (13), paste (12), rep (12), seq (12), plot (11), as.character (10), ncol (9), numeric (9), sum (9), do.call (8), rbind (8), attributes (7), data.frame (7), on.exit (7), paste0 (7), seq_along (7), abs (6), min (6), nchar (6), pretty (6), return (5), t (5), as.data.frame (4), cbind (4), character (4), drop (4), labels (4), log10 (4), matrix (4), sort (4), unlist (4), any (3), diff (3), exp (3), file.path (3), max (3), sub (3), units (3), which.min (3), expand.grid (2), is.null (2), mean (2), rev (2), sqrt (2), suppressWarnings (2), tempdir (2), all (1), call (1), factor (1), file (1), grepl (1), levels (1), list.files (1), match.arg (1), q (1), range (1), rank (1), setdiff (1), split (1), sprintf (1), strwrap (1), Sys.info (1), tapply (1), tempfile (1), try (1), vector (1), which.max (1)

warbleR

pblapply_wrblr_int (30), read_sound_file (27), envelope (8), cross_correlation (3), freq_range_detec (3), read_wave (3), image_to_wave (2), lessdB (2), check_sels (1), info_sound_files (1), rename_est_waves (1), selection_table (1), simulate_songs (1)

baRulho

check_arguments (21), FUN (12), check_unique_sels (3), by_element_est (2), check_deprecated (2), check_extended_selection_table (2), check_several_distances (2), attenuation (1), check_unique_sound.id (1), find_peaks_bRlh_int (1), rbind2 (1)

graphics

par (23), grconvertX (9), lines (5), grid (3), grconvertY (2), split.screen (2), close.screen (1)

seewave

rms (6), env (5), pastew (5), duration (3), fpeaks (2), cutw (1), spec (1)

stats

frequency (8), dist (5), approx (2), ave (1), end (1), spectrum (1), start (1), time (1)

methods

new (16), formalArgs (1)

parallel

makePSOCKcluster (16)

grDevices

palette (4), colors (3), dev.off (1), recordPlot (1), X11 (1)

checkmate

makeAssertionFunction (6), makeAssertCollection (1)

tuneR

silence (5), normalize (1), writeWave (1)

cli

make_ansi_style (1), num_ansi_colors (1)

ohun

template_correlator (1)

tools

find_gs_cmd (1)

utils

str (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 25 files) and - 1 authors - 2 vignettes - 2 internal data files - 11 imported packages - 24 exported functions (median 74 lines of code) - 98 non-exported functions in R (median 21 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](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) 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 | 25| 86.3| | |files_vignettes | 2| 85.7| | |files_tests | 21| 96.6| | |loc_R | 5307| 95.8|TRUE | |loc_vignettes | 791| 87.2| | |loc_tests | 685| 80.8| | |num_vignettes | 2| 89.2| | |data_size_total | 1092464| 95.5|TRUE | |data_size_median | 546232| 97.2|TRUE | |n_fns_r | 122| 81.1| | |n_fns_r_exported | 24| 72.5| | |n_fns_r_not_exported | 98| 83.4| | |n_fns_per_file_r | 3| 47.2| | |num_params_per_fn | 12| 96.6|TRUE | |loc_per_fn_r | 38| 83.7| | |loc_per_fn_r_exp | 74| 87.9| | |loc_per_fn_r_not_exp | 22| 66.5| | |rel_whitespace_R | 20| 96.2|TRUE | |rel_whitespace_vignettes | 60| 96.8|TRUE | |rel_whitespace_tests | 54| 92.7| | |doclines_per_fn_exp | 110| 92.7| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 98| 78.9| | ---

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 [![R-CMD-check.yaml](https://github.com/maRce10/baRulho/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/maRce10/baRulho/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:-------------------------------------|:----------|:------|----------:|:----------| | 6384082445|.github/workflows/deploy_ghpages.yaml |failure |d5364f | 4|2023-10-02 | | 6385163073|Continuous Deployment |failure |1b0f43 | 6|2023-10-02 | | 6385275826|pages build and deployment |success |995476 | 75|2023-10-02 | | 6396499245|R-CMD-check |failure |c488df | 16|2023-10-03 | | 6393038656|Render README |success |833ca7 | 17|2023-10-03 | | 6397662241|tic |failure |46763a | 100|2023-10-03 | | 6396505549|Update CITATION.cff |success |0925c7 | 1|2023-10-03 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following error: 1. Error in proc$get_built_file() : Build process failed R CMD check generated the following check_fails: 1. no_description_depends 2. no_import_package_as_a_whole #### Test coverage with [covr](https://covr.r-lib.org/) ERROR: Test Coverage Failed #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) Error : Build failed, unknown error, standard output: * checking for file ‘baRulho/DESCRIPTION’ ... OK * preparing ‘baRulho’: * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes ----------------------------------- * installing *source* package ‘baRulho’ ... ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices *** copying figures ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘baRulho’ in namespaceExport(ns, exports): undefined exports: add_noise Error: loading failed Execution halted ERROR: loading failed * removing ‘/tmp/RtmpaoozZw/Rinst16cd73656348/baRulho’ ----------------------------------- ERROR: package installation failed #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 680 potential issues: message | number of times --- | --- Avoid 1:nrow(...) expressions, use seq_len. | 2 Avoid library() and require() calls in packages | 12 Avoid using sapply, consider vapply instead, that's type safe | 1 Lines should not be more than 80 characters. | 665


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 3 function names are duplicated in other packages: - - `add_noise` from errorlocate, pauwels2014, spant, tdaunif, TestFunctions, vpc - - `attenuation` from seewave - - `find_markers` from dtangle


Package Versions

|package |version | |:--------|:-------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.9 |


Editor-in-Chief Instructions:

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

jhollist commented 9 months ago

Editor checks:

@maRce10 See checks in previous comment. R CMD Check is now failing. I did see that you recently merged some new work and that is triggering this failure. I assume you are still doing a bit of work on this. Let me know when you have that completed and your checks pass. I will check again and then move forward with finding reviewers.

I also noted a few others things. Data is a bit large, not sure if you can reduce that.

❯ checking installed package size ... NOTE
    installed size is 10.8Mb
    sub-directories of 1Mb or more:
      data   1.6Mb
      doc    7.5Mb
      help   1.5Mb
maRce10 commented 9 months ago

OK I solved and closed the issues and now R CMD check is working again. The size of data is probably due to having sounds as examples. I shrank it as much as I could.

jhollist commented 8 months ago

@ropensci-review-bot check package

ropensci-review-bot commented 8 months ago

Thanks, about to send the query.

ropensci-review-bot commented 8 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 8 months ago

Checks for baRulho (v2.1.0)

git hash: 36f90248

(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 | 750| |internal |baRulho | 54| |internal |graphics | 45| |internal |parallel | 16| |internal |grDevices | 10| |internal |ohun | 1| |internal |tools | 1| |depends |warbleR | 81| |imports |seewave | 23| |imports |stats | 19| |imports |methods | 17| |imports |checkmate | 8| |imports |tuneR | 7| |imports |cli | 2| |imports |utils | 1| |imports |fftw | NA| |imports |viridis | NA| |imports |Sim.DiffProc | NA| |imports |png | NA| |suggests |rmarkdown | NA| |suggests |ggplot2 | NA| |suggests |knitr | NA| |suggests |kableExtra | NA| |suggests |testthat | NA| |suggests |covr | NA| |suggests |formatR | NA| |suggests |Rraven | 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()', and examining the 'external_calls' table.

base

c (83), names (38), nrow (34), seq_len (29), for (28), if (26), unique (26), vapply (25), match.call (24), args (23), as.list (23), length (23), which (20), lapply (19), getOption (18), is.na (14), list (14), options (13), paste (12), plot (12), rep (12), seq (12), as.character (10), sum (10), ncol (9), numeric (9), attributes (8), do.call (8), rbind (8), on.exit (7), paste0 (7), seq_along (7), abs (6), data.frame (6), min (6), nchar (6), pretty (6), return (6), t (5), as.data.frame (4), cbind (4), character (4), drop (4), file.path (4), labels (4), log10 (4), matrix (4), sort (4), unlist (4), any (3), diff (3), exp (3), max (3), sub (3), units (3), vector (3), which.min (3), expand.grid (2), is.null (2), mean (2), rev (2), sqrt (2), suppressWarnings (2), tempdir (2), all (1), call (1), factor (1), file (1), grepl (1), levels (1), list.files (1), match.arg (1), q (1), range (1), sapply (1), setdiff (1), split (1), sprintf (1), strwrap (1), Sys.info (1), tapply (1), tempfile (1), try (1), which.max (1)

warbleR

pblapply_wrblr_int (31), read_sound_file (27), envelope (6), cross_correlation (3), freq_range_detec (3), read_wave (3), image_to_wave (2), lessdB (2), check_sels (1), info_sound_files (1), rename_est_waves (1), simulate_songs (1)

baRulho

check_arguments (23), FUN (13), by_element_est (2), check_deprecated (2), check_extended_selection_table (2), check_several_distances (2), check_sound_files_found (2), check_unique_sels (2), attenuation (1), check_unique_sound.id (1), colortext (1), find_peaks_bRlh_int (1), rbind2 (1), signal_to_noise_ratio (1)

graphics

par (23), grconvertX (9), lines (5), grid (3), grconvertY (2), split.screen (2), close.screen (1)

seewave

rms (6), env (5), pastew (5), duration (3), fpeaks (2), cutw (1), spec (1)

stats

frequency (8), dist (5), approx (2), end (1), runif (1), start (1), time (1)

methods

new (16), formalArgs (1)

parallel

makePSOCKcluster (16)

grDevices

palette (4), colors (3), dev.off (1), recordPlot (1), X11 (1)

checkmate

makeAssertionFunction (7), makeAssertCollection (1)

tuneR

silence (5), normalize (1), writeWave (1)

cli

make_ansi_style (1), num_ansi_colors (1)

ohun

template_correlator (1)

tools

find_gs_cmd (1)

utils

str (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 26 files) and - 1 authors - 2 vignettes - 2 internal data files - 11 imported packages - 25 exported functions (median 74 lines of code) - 103 non-exported functions in R (median 23 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](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) 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 | 26| 87.0| | |files_vignettes | 2| 85.7| | |files_tests | 21| 96.6| | |loc_R | 5626| 96.1|TRUE | |loc_vignettes | 795| 87.3| | |loc_tests | 687| 80.9| | |num_vignettes | 2| 89.2| | |data_size_total | 1092464| 95.5|TRUE | |data_size_median | 546232| 97.2|TRUE | |n_fns_r | 128| 82.1| | |n_fns_r_exported | 25| 73.6| | |n_fns_r_not_exported | 103| 84.4| | |n_fns_per_file_r | 3| 47.3| | |num_params_per_fn | 12| 96.6|TRUE | |loc_per_fn_r | 38| 83.4| | |loc_per_fn_r_exp | 74| 87.9| | |loc_per_fn_r_not_exp | 23| 68.7| | |rel_whitespace_R | 20| 96.4|TRUE | |rel_whitespace_vignettes | 60| 96.8|TRUE | |rel_whitespace_tests | 54| 92.7| | |doclines_per_fn_exp | 110| 92.7| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 105| 80.1| | ---

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 [![R-CMD-check.yaml](https://github.com/maRce10/baRulho/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/maRce10/baRulho/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:--------------------------|:----------|:------|----------:|:----------| | 6414603275|pages build and deployment |success |09b477 | 80|2023-10-05 | | 6411731627|R-CMD-check |success |36f902 | 20|2023-10-04 | | 6419119914|Render README |success |36f902 | 20|2023-10-05 | | 6414533822|tic |success |36f902 | 111|2023-10-05 | | 6396505549|Update CITATION.cff |success |0925c7 | 1|2023-10-03 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following note: 1. checking installed package size ... NOTE installed size is 12.2Mb sub-directories of 1Mb or more: data 1.6Mb doc 8.8Mb help 1.5Mb R CMD check generated the following check_fails: 1. cyclocomp 2. no_description_depends 3. no_import_package_as_a_whole 4. rcmdcheck_reasonable_installed_size #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 79.91 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- check_arguments | 84 manual_realign | 64 plot_degradation | 48 signal_to_noise_ratio | 29 plot_blur_FUN | 26 synth_sounds | 25 noise_profile | 22 master_sound_file | 18 set_reference_sounds | 17 detection_distance | 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 703 potential issues: message | number of times --- | --- Avoid 1:nrow(...) expressions, use seq_len. | 2 Avoid library() and require() calls in packages | 12 Avoid using sapply, consider vapply instead, that's type safe | 3 Lines should not be more than 80 characters. | 686


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 3 function names are duplicated in other packages: - - `add_noise` from errorlocate, pauwels2014, spant, tdaunif, TestFunctions, vpc - - `attenuation` from seewave - - `find_markers` from dtangle


Package Versions

|package |version | |:--------|:-------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.9 |


Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

jhollist commented 8 months ago

@maRce10 I think we are good to move on to review.

Couple of things to think about in the lintr results, in particular the 1:nrow and sapply ones. The library calls you can ignore since those are in Rmd and tests.

Look through those results for other ideas as well. For instance, your lines of code are on the high side, but so is cyclomatic complexity. If you can simplify some of these functions you could probably reduce both and make future maintenance a little easier.

That being said, we are good to go for reviewers. I'll start pinging on a few folks today.

jhollist commented 8 months ago

@ropensci-review-bot seeking reviewers

ropensci-review-bot commented 8 months ago

Please add this badge to the README of your package repository:

[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/609_status.svg)](https://github.com/ropensci/software-review/issues/609)

Furthermore, if your package does not have a NEWS.md file yet, please create one to capture the changes made during the review process. See https://devguide.ropensci.org/releasing.html#news

jhollist commented 8 months ago

@ropensci-review-bot assign @mikemahoney218 as reviewer

ropensci-review-bot commented 8 months ago

@mikemahoney218 added to the reviewers list. Review due date is 2023-10-26. Thanks @mikemahoney218 for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

ropensci-review-bot commented 8 months ago

@mikemahoney218: If you haven't done so, please fill this form for us to update our reviewers records.

jhollist commented 8 months ago

@ropensci-review-bot set due date for @mikemahoney218 to 2023-11-03

ropensci-review-bot commented 8 months ago

Review due date for @mikemahoney218 is now 03-November-2023

maRce10 commented 8 months ago

Please add this badge to the README of your package repository:

[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/609_status.svg)](https://github.com/ropensci/software-review/issues/609)

Furthermore, if your package does not have a NEWS.md file yet, please create one to capture the changes made during the review process. See https://devguide.ropensci.org/releasing.html#news

done!

mikemahoney218 commented 8 months ago

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

Functionality

Estimated hours spent reviewing: 6


Review Comments

The baRulho package is a useful extension to what appears to be a developing universe of packages for acoustic experiments, building on top of the ohun and warbleR packages by the same author. The package is very interesting and, while this is not my area of practice, it seems to me that this package will be very useful for people working in this space. I also want to specifically call out manual_realign() as being incredibly cool.

My main general comment about the package is, as Jeff and the automatic checks both identified, many functions in this package have a pretty high cyclomatic complexity. As an outside reviewer, this made it hard to trace any given function. I'd encourage the developers to break their functions down into more modular pieces, in order to possibly be able to reuse elements across functions but also to make the package easier to scan and maintain in the long run.

Below I've got more specific comments, mostly focused on vignettes and other documentation. Overall, I think most of these comments are fiddly details and none are fundamental problems with the package. I will say that this package is not within my area of study -- Jeff asked me to review "for R package fundamentals and general ecology applicability" and that's where my comments are focused. That means that I am not capable of assessing if any of the functions or equations used are correct, and so I just assumed that the approaches used were appropriate.

Check problems

Running R CMD check, I see:

❯ checking installed package size ... NOTE
    installed size is 12.2Mb
    sub-directories of 1Mb or more:
      data   1.6Mb
      doc    8.8Mb
      help   1.5Mb

I saw the earlier conversation between you and Jeff on this, but I think the size isn't due to using sound examples -- I think it's due to the size of images you're using in your help files and vignettes. It seems like the PNGs in the package are saved at 300 PPI resolution; saving them at 72 or 96 PPI instead will save a ton of space (for instance, it shrinks the package sticker from 1.4 MB to 162.5 kB on my machine) while leaving them high-res enough for computer displays.

You might also consider moving the quantify_degradation vignette to be an "article" instead, saving some of the space that gets used for those images.

Vignettes

align_test_sounds.Rmd

In general, I'd encourage you to evaluate all chunks in a vignette unless they're expected to error, on purpose, and this is highlighted to the reader. I get into specifics below, but reading the rendered vignette I am confused by what some functions are meant to output, and I believe there are some code errors hidden in unevaluated chunks.

This vignette defines td in a setup chunk that's not included in the vignette, then uses it in user-visible code throughout the vignette. As a user, I'd expect to be able to run the code displayed in the vignette. I'd suggest either defining td in the user-visible part of the vignette, or using tempdir() as an argument to these functions, rather than using the variable.

The calls to spectrograms() and check_sels() using synth_master_annotations error ("NAs found in bottom.freq and/or top.freq"). Those chunks are marked as eval = FALSE, so maybe this is known, but there's nothing in the vignette implying that these chunks will error -- in fact, there are spectrograms included below the chunk, which mean I expect that running the code in that chunk will produce the resulting graph.

Is there any reason you switch from using arguments to set file paths to using options right before find_markers()? The inconsistency confused me.

You have a hidden call to print(TRUE) after calling is_extended_selection_table(). I think it would probably be better to return the actual output from is_extended_selection_table() instead. On my machine, this returned FALSE, making the vignette incorrect (the actual class is data.frame).

The command \code{\link{align_test_files}} in the manually fixing alignment section produces a blank space in the HTML output. I think this should probably be align_test_files().

In auto_realign() I'm seeing:

Warning messages:
1: In attr(X, "check.results")$start[paste(X$sound.files, X$selec,  :
  number of items to replace is not a multiple of replacement length
2: In attr(X, "check.results")$end[paste(X$sound.files, X$selec, sep = "-") %in%  :
  number of items to replace is not a multiple of replacement length

Is that expected?

quantify_degradation.Rmd

Examples

If you're going to use \dontrun around examples that should work, which don't highlight to users that they're expected to fail, I recommend using devtools::run_examples(run_donttest = TRUE, run_dontrun = TRUE) to confirm that the code actually will run successfully.

I see the following errors:

Running examples, I also see:

Warning messages:
1: In attenuation(f = 2000, dist = 50, dist0 = 1) :
  partial argument match of 'f' to 'frequency'
2: In match.call(definition, call, expand.dots, envir) :
  partial argument match of 'f' to 'frequency'
3: In attr(X, "check.results")$start[paste(X$sound.files, X$selec,  :
  number of items to replace is not a multiple of replacement length
4: In attr(X, "check.results")$end[paste(X$sound.files, X$selec, sep = "-") %in%  :
  number of items to replace is not a multiple of replacement length
5: In eg$dur : partial match of 'dur' to 'duration'
6: In eg$harm : partial match of 'harm' to 'harmonics'
7: In eg$harm : partial match of 'harm' to 'harmonics'

Package functions

Is there a reason you're using the @usage tag? Normally this section is auto-generated by rOxygen2, ensuring it stays up-to-date and properly formatted.

I love the standardization of arguments across functions; I think that's a clear strength of the package. You might consider using rOxygen2 templates (see the relevant section of the packaging guide) to centralize these arguments' documentation, in order to reduce the amount of places you need to touch to update any documentation.

Misc

The contributing guide seems to be missing an email:

You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <>.

I'd either provide an email or drop this part of the guide.

jhollist commented 8 months ago

@mikemahoney218 thank you for the review!

@maRce10 I am still working on finding a second reviewer. If you prefer you can wait until we get the two reviews in and then address them with a single round of edits.

jhollist commented 7 months ago

@ropensci-review-bot assign @DenaJGibbon as reviewer

ropensci-review-bot commented 7 months ago

@DenaJGibbon added to the reviewers list. Review due date is 2023-12-13. Thanks @DenaJGibbon for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

ropensci-review-bot commented 7 months ago

@DenaJGibbon: If you haven't done so, please fill this form for us to update our reviewers records.

jhollist commented 7 months ago

@ropensci-review-bot set due date for @DenaJGibbon to 2023-12-31

ropensci-review-bot commented 7 months ago

Review due date for @DenaJGibbon is now 31-December-2023

jhollist commented 6 months ago

@ropensci-review-bot set due date for @DenaJGibbon to 2024-01-05

ropensci-review-bot commented 6 months ago

Review due date for @DenaJGibbon is now 05-January-2024

DenaJGibbon commented 5 months ago

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

I would like to see a bit more information about the target audience for this.

Installation was smooth.

Most of my comments for this round focused on the vignette and I include specific comments below.

I plan to look this over during the next round of revisions, once the authors have provided more detail on the methods.

Functionality

Will check this next round.

Estimated hours spent reviewing: 4 hours


Review Comments

Overall

README

Synthesize and align test sounds

Quantify degradation

DenaJGibbon commented 5 months ago

And just a follow-up, I agree with @mikemahoney218 that breaking the functions down into smaller chunks that will facilitate review, assist folks in understanding what is being done, and for easier future maintenance.

jhollist commented 5 months ago

@mikemahoney218 and @DenaJGibbon thank you so much for your reviews!

@maRce10 wanted to make sure you knew that these reviews are in. I will change the stats of the repo and look forward to your response to the reviews. Any questions or concerns, just let me know here.

jhollist commented 5 months ago

@mikemahoney218 and @DenaJGibbon could your provide an estimate for number of hours you spent on your reviews? Thanks!

mikemahoney218 commented 5 months ago

@jhollist about 6 hours for me!

jhollist commented 5 months ago

@ropensci-review-bot submit review https://github.com/ropensci/software-review/issues/609#issuecomment-1785830265 time 6

ropensci-review-bot commented 5 months ago

Logged review for mikemahoney218 (hours: 6)

DenaJGibbon commented 5 months ago

It was 4-5 for me. Thanks!

On Tue, Jan 9, 2024 at 7:40 AM ropensci-review-bot @.***> wrote:

Logged review for mikemahoney218 (hours: 6)

— Reply to this email directly, view it on GitHub https://github.com/ropensci/software-review/issues/609#issuecomment-1882070718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIMMOEBMXHXEFMB5OEOTD3YNSGXJAVCNFSM6AAAAAA5LYGJPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSGA3TANZRHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Dena J. Clink, Ph.D.

K. Lisa Yang Center for Conservation Bioacoustics

Cornell Lab of Ornithology

Cornell University

Personal Website http://www.denaclink.com

jhollist commented 5 months ago

@ropensci-review-bot submit review https://github.com/ropensci/software-review/issues/609#issuecomment-1879632688 time 4.5

ropensci-review-bot commented 5 months ago

Logged review for DenaJGibbon (hours: 4.5)