adokter / bioRad

R package for analysis and visualisation of biological signals in weather radar data
http://adokter.github.io/bioRad
Other
29 stars 16 forks source link

Prepare package for rOpenSci onboarding #148

Open peterdesmet opened 6 years ago

peterdesmet commented 6 years ago

Guide: https://ropensci.github.io/dev_guide/index.html. Things I noticed that might not be covered yet:

adokter commented 6 years ago

You might want to check whether it is not a problem that our package uses an external Docker image that contains an important part of the code and functionality

peterdesmet commented 1 year ago

Below is the full template for submitting an rOpenSci package for review. @adokter I suggest we edit this comment in preparation for submission. We should tackle all TODOs


Submitting Author Name: Adriaan Dokter Submitting Author Github Handle: !--author1-->@adokter<!--end-author1-- Other Package Authors Github handles: (comma separated, delete if none) @peterdesmet, @github_handle2, TODO Repository: https://github.com/adokter/bioRad/ Version submitted: TODO Submission type: Standard Editor: TBD Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en


TODO

Scope

TODO

TODO

TODO

Not applicable

Not applicable

TODO

Technical checks

Confirm each of the following by checking the box.

TODO

This package:

TODO

Publication options

MEE Options - [ ] 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](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

PietrH commented 1 year ago

We could consider using the rOpenSci github action for pkgcheck to check on our current status: https://docs.ropensci.org/pkgcheck/

I've generated a report locally and I'll include it below:

Checks for bioRad (v0.7.0.9579)

git hash: 52616411

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

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

Package License: MIT + file LICENSE


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 | 1036| |internal |bioRad | 240| |internal |grDevices | 11| |imports |stats | 78| |imports |methods | 29| |imports |raster | 28| |imports |dplyr | 25| |imports |glue | 7| |imports |graphics | 6| |imports |lubridate | 5| |imports |utils | 4| |imports |rlang | 3| |imports |lutz | 2| |imports |maptools | 2| |imports |viridis | 2| |imports |curl | 1| |imports |readr | 1| |imports |tidyr | 1| |imports |viridisLite | 1| |imports |assertthat | NA| |imports |fields | NA| |imports |ggplot2 | NA| |imports |rgdal | NA| |imports |rhdf5 | NA| |imports |sp | NA| |suggests |vol2birdR | 7| |suggests |aws.s3 | 4| |suggests |ggmap | 2| |suggests |tidyselect | 2| |suggests |knitr | NA| |suggests |rmarkdown | NA| |suggests |testthat | NA| |suggests |vdiffr | 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 (89), data.frame (77), sapply (58), list (49), file (42), length (42), lapply (33), max (33), attributes (31), min (29), paste (23), unique (22), dim (18), do.call (18), range (18), for (17), seq (17), names (15), seq_along (14), by (12), ifelse (12), pi (12), scan (12), is.null (11), as.numeric (10), as.POSIXct (10), colSums (10), row (10), which (10), format (9), nrow (9), F (8), t (8), col (7), if (7), rep (7), as.Date (6), date (6), dir (6), getOption (6), pmin (6), T (6), as.data.frame (5), attr (5), basename (5), cbind (5), gsub (5), ncol (5), source (5), suppressWarnings (5), tryCatch (5), units (5), apply (4), cos (4), cumsum (4), eval (4), matrix (4), sin (4), sum (4), tempfile (4), abs (3), all (3), atan2 (3), difftime (3), expand.grid (3), labels (3), mapply (3), paste0 (3), rbind (3), rowSums (3), substring (3), unlist (3), url (3), withCallingHandlers (3), as.integer (2), as.list (2), findInterval (2), floor (2), is.na (2), levels (2), mean (2), pmax (2), row.names (2), setdiff (2), sort (2), sprintf (2), stopifnot (2), strsplit (2), substitute (2), substr (2), vapply (2), which.min (2), all.equal (1), args (1), as.character (1), as.difftime (1), as.double (1), as.vector (1), ceiling (1), character (1), colnames (1), diff (1), dirname (1), drop (1), file.path (1), integer (1), is.finite (1), is.nan (1), load (1), match (1), months (1), nchar (1), normalizePath (1), order (1), q (1), seq_len (1), sqrt (1), startsWith (1), suppressMessages (1), Sys.info (1), table (1), UseMethod (1), warning (1)

bioRad

get_quantity (26), add_expected_eta_to_scan (7), rcs (7), scan_to_raster (6), sunrise (6), sunset (6), map (5), sd_vvp_threshold (5), check_night (4), error (4), errorf (4), polar_to_index (4), beam_profile_overlap_help (3), cartesian_to_polar (3), color_scale_fill (3), combined_heights (3), earth_radius (3), get_odim_object_type (3), add_color_transparency (2), beam_distance (2), beam_height (2), beam_profile (2), beam_profile_overlap (2), beam_range (2), calculate_vp (2), extract_string (2), get_elevation_angles (2), integrate_profile.vp (2), is.vp (2), is.vpts (2), match_filenames (2), proj_to_wgs (2), sample_polar (2), scan_to_spatial (2), add_heights_vp (1), add_heights_vpts (1), apply_mistnet (1), apply_mistnet_body (1), as.data.frame.vp (1), as.data.frame.vpts (1), beam_height_internal (1), beam_width (1), beam_width_internal (1), bind_into_vpts (1), bind_into_vpts.list (1), bind_into_vpts.vp (1), bind_into_vpts.vpts (1), c.vp (1), calculate_param (1), calculate_param.ppi (1), calculate_param.pvol (1), calculate_param.scan (1), check_date_format (1), check_docker (1), check_night.default (1), check_night.list (1), check_night.pvol (1), check_night.vp (1), check_night.vpi (1), check_night.vpts (1), check_radar_codes (1), col_func (1), color_palette (1), color_palette_to_scale_colour (1), color_scale (1), convert_legacy (1), convert_legacy.vp (1), convert_legacy.vpts (1), dbz_to_eta (1), dim.ppi (1), dim.pvol (1), dim.scan (1), dim.vp (1), dim.vpts (1), download_basemap (1), download_pvolfiles (1), download_vpfiles (1), doy (1), doy.default (1), doy.pvol (1), doy.vp (1), doy.vpi (1), doy.vpts (1), eta_expected (1), eta_to_dbz (1), filter_vpts (1), format_reason_vol2bird (1), gaussian_beam_profile (1), gaussian_beam_profile_internal (1), get_elevation_angles.param (1), get_elevation_angles.pvol (1), get_elevation_angles.scan (1), get_iris_raw_task (1), get_param (1), get_quantity.list (1), get_quantity.vp (1), get_quantity.vpts (1), get_scan (1), get_zlim (1), integrate_profile (1), integrate_profile.list (1), integrate_profile.vpts (1), integrate_to_ppi (1), is.na2 (1), is.nan.data.frame (1), is.odimfile (1), is.param (1), is.ppi (1), is.pvol (1), is.pvolfile (1), is.scan (1), is.vpfile (1), is.vpi (1), list_vpts_aloft (1), map.ppi (1), nexrad_to_odim (1), noy (1), noy.default (1), noy.pvol (1), noy.vp (1), noy.vpi (1), noy.vpts (1), nyquist_velocity (1), plot_wind_barbs (1), plot.ppi (1), plot.scan (1), plot.vp (1), plot.vpi (1), plot.vpts (1), print.param (1), print.ppi (1), print.pvol (1), print.scan (1), print.vp (1), print.vpts (1), project_as_ppi (1), read_pvolfile (1), read_vp (1), read_vpfiles (1), wgs_to_proj (1)

stats

rt (26), offset (18), ts (12), dt (6), profile (4), weighted.mean (4), df (3), median (2), approx (1), cov (1), step (1)

methods

is (18), as (11)

raster

raster (9), brick (5), extent (4), as.data.frame (3), flip (2), crs (1), projection (1), rasterToPoints (1), setValues (1), weighted.mean (1)

dplyr

join (9), left_join (9), bind_rows (4), distinct (1), if_else (1), pull (1)

grDevices

colors (4), palette (3), colours (2), col2rgb (1), rgb (1)

glue

glue (3), glue_collapse (3), backtick (1)

vol2birdR

vol2bird_config (4), rsl2odim (3)

graphics

grid (5), par (1)

lubridate

ym (2), ceiling_date (1), floor_date (1), make_difftime (1)

aws.s3

get_bucket_df (3), bucket_exists (1)

utils

read.table (2), read.csv (1), txtProgressBar (1)

rlang

check_installed (2), expr (1)

ggmap

calc_zoom (1), get_map (1)

lutz

tz_lookup_coords (2)

maptools

crepuscule (2)

tidyselect

eval_select (2)

viridis

scale_colour_viridis (1), scale_fill_viridis (1)

curl

curl_fetch_disk (1)

readr

read_lines (1)

tidyr

fill (1)

viridisLite

viridis (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 61 files) and - 3 authors - 3 vignettes - 3 internal data files - 22 imported packages - 151 exported functions (median 7 lines of code) - 254 non-exported functions in R (median 9 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 | 61| 97.3| | |files_vignettes | 3| 92.4| | |files_tests | 58| 99.4| | |loc_R | 4970| 95.3|TRUE | |loc_vignettes | 438| 74.8| | |loc_tests | 1937| 93.9| | |num_vignettes | 3| 94.2| | |data_size_total | 1451194| 96.5|TRUE | |data_size_median | 544736| 97.2|TRUE | |n_fns_r | 405| 96.2|TRUE | |n_fns_r_exported | 151| 97.6|TRUE | |n_fns_r_not_exported | 254| 95.2|TRUE | |n_fns_per_file_r | 4| 58.9| | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 8| 20.0| | |loc_per_fn_r_exp | 7| 13.5| | |loc_per_fn_r_not_exp | 9| 27.1| | |rel_whitespace_R | 10| 88.5| | |rel_whitespace_vignettes | 48| 85.6| | |rel_whitespace_tests | 15| 89.8| | |doclines_per_fn_exp | 52| 65.3| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 228| 89.9| | ---

2a. Network visualisation

Github doesn't allow uploading html files!


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 error: 1. checking PDF version of manual without index ... ERROR Re-running with no redirection of stdout/stderr. Hmm ... looks like a package Converting parsed Rd's to LaTeX ........ Creating pdf output from LaTeX ... Warning in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : texi2dvi script/program not available, using emulation Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : pdflatex is not available Warning in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : texi2dvi script/program not available, using emulation Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : pdflatex is not available Error in running tools::texi2pdf() You may want to clean up by 'rm -Rf /tmp/RtmpD2FFw2/Rd2pdf829f681852ef' R CMD check generated the following warning: 1. checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. R CMD check generated the following check_fails: 1. cyclocomp 2. no_import_package_as_a_whole 3. rcmdcheck_can_convert_rd_to_pdf_2 #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 68.28 The following files are not completely covered by tests: file | coverage --- | --- R/apply_mistnet.R | 0% R/bioRad-deprecated.R | 0% R/color_scale.R | 29.31% R/composite_ppi.R | 0% R/download_basemap.R | 0% R/download_vpfiles.R | 43.1% R/filter_vpts.R | 66.67% R/iris.R | 0% R/map.R | 0% R/nexrad_odim.R | 0% R/nyquist_velocity.R | 0% R/plot.vpi.R | 61.33% R/plot.vpts.R | 69.01% R/read_cajun.R | 0% R/read_vpts.R | 0% R/select_vpfiles.R | 0% #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- composite_ppi | 54 read_pvolfile_body | 46 integrate_to_ppi | 45 plot.vpts | 45 scan_to_raster | 44 plot_wind_barbs | 43 read_vpts | 41 plot.vpi | 37 get_zlim | 31 calculate_vp | 24 filter_vpts | 22 map.ppi | 21 scan_to_spdf | 20 add_expected_eta_to_scan | 19 download_basemap | 17 beam_profile_overlap | 16 regularize_vpts | 16 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 714 potential issues: message | number of times --- | --- Avoid 1:length(...) expressions, use seq_len. | 9 Avoid 1:nrow(...) expressions, use seq_len. | 1 Avoid changing the working directory, or restore it in on.exit | 1 Avoid library() and require() calls in packages | 4 Avoid trailing semicolons, they are not needed. | 1 Avoid using sapply, consider vapply instead, that's type safe | 50 Lines should not be more than 80 characters. | 612 Use <-, not ->, for assignment. | 2 Use <-, not =, for assignment. | 34


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: Package contains the following (potentially) obsolete packages: - sp - maptools - rgdal See our [Recommended Scaffolding](https://devguide.ropensci.org/building.html?q=scaffol#recommended-scaffolding) for alternatives. :heavy_multiplication_x: The following 5 function names are duplicated in other packages: - - `doy` from solaR - - `get_param` from EpiModel, gplite, ldamatch, mapbayr, phenofit - - `map` from aphid, arakno, BGData, BGGM, bgmm, bReeze, gapmap, html5, jqr, kohonen, listenv, mapfit, maps, mclust, missSOM, mlr3misc, modchart, narray, neuroim, onemap, OpenRepGrid, pomp, purrr, Qtools, SpatialExtremes, spidR, tipsae, Z10 - - `rcs` from dplR, rms - - `sunrise` from reactablefmtr


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.1 | |pkgcheck |0.1.1.20 |