software-review
software-review copied to clipboard
trud: Query the 'NHS TRUD API' (full submission)
Submitting Author Name: Alasdair Warwick Submitting Author Github Handle: @rmgpanw Other Package Authors Github handles: (comma separated, delete if none) @abolvera, @cyu12, @rnluben Repository: https://github.com/rmgpanw/trud/ Submission type: Standard Editor: @emilyriederer Reviewers: @AleKoure, @jonclayden
Due date for @AleKoure: 2025-06-18Due date for @jonclayden: 2025-06-18 Archive: TBD Version accepted: TBD Language: en
- Paste the full DESCRIPTION file inside a code block below:
Package: trud
Title: Query the 'NHS TRUD API'
Version: 0.1.0.9000
Authors@R: c(
person(given = "Alasdair",
family = "Warwick",
role = c("aut", "cre", "cph"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-0800-2890")),
person("Robert", "Luben", role = "aut",
comment = c(ORCID = "0000-0002-5088-6343")),
person("Abraham", "Olvera-Barrios", role = "aut",
comment = c(ORCID = "0000-0002-3305-4465")),
person("Chuin Ying", "Ung", role = "aut",
comment = c(ORCID = "0000-0001-8487-4589"))
)
Description: Provides a convenient R interface to the 'National Health Service
NHS Technology Reference Update Distribution (TRUD) API', allowing users
to list available releases for their subscribed items, retrieve metadata,
and download release files. For more information on the API, see
<https://isd.digital.nhs.uk/trud/users/guest/filters/0/api>.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Depends: R (>= 4.2.0)
Imports:
cli,
dplyr,
httr2,
purrr,
rlang,
rvest,
stringr,
tibble
URL: https://rmgpanw.github.io/trud/,
https://github.com/rmgpanw/trud
BugReports: https://github.com/rmgpanw/trud/issues
Suggests:
knitr,
rmarkdown,
spelling,
testthat (>= 3.0.0),
withr
Config/testthat/edition: 3
Language: en-US
VignetteBuilder: knitr
Scope
-
Please indicate which category or categories from our package fit policies or statistical package categories this package falls under. (Please check one or more appropriate boxes below):
Data Lifecycle Packages
- [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
- [ ] text analysis
-
Explain how and why the package falls under these categories (briefly, 1-2 sentences). Please note any areas you are unsure of:
trud wraps the NHS TRUD API, which enables account holders to automate the download of technology reference files from NHS England.
- Who is the target audience and what are scientific applications of this package?
The technology reference files from NHS England are widely used by researchers (both within and outside the UK) working with electronic health records data. The available items include various clinical coding terminologies such as ICD, Read, prescription codes and the SNOMED CT ontology (which is updated with new available releases every few months). While trud is a relatively small package, it provides a helpful aid to researchers working with these release items, greatly simplifying the process of automated updates to support downstream analyses.
- Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category?
There are no other similar R packages that I am aware of.
- (If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research?
Not applicable
- If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or
@tagthe editor you contacted.
https://github.com/ropensci/software-review/issues/689
- Explain reasons for any
pkgcheckitems which your package is unable to pass.
Please note that all pkgcheck checks are passing for me locally, however the pkgcheck GitHub Actions currently hangs (being investigated at https://github.com/ropensci-review-tools/pkgcheck/issues/235)
Technical checks
Confirm each of the following by checking the box.
- [X] I have read the rOpenSci packaging guide.
- [X] I have read the author guide and I expect to maintain this package for at least 2 years or to find a replacement.
This package:
- [X] does not violate the Terms of Service of any service it interacts with.
- [X] has a CRAN and OSI accepted license.
- [X] contains a README with instructions for installing the development version.
- [X] includes documentation with examples for all functions, created with roxygen2.
- [X] contains a vignette with examples of its essential functions and uses.
- [X] has a test suite.
- [X] has continuous integration, including reporting of test coverage.
Publication options
- [X] Do you intend for this package to go on CRAN?
trud 0.1.0 is available on CRAN (accepted mid-2024)
-
[ ] Do you intend for this package to go on Bioconductor?
-
[ ] Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:
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)
- (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.
@rmgpanw You've used the pre-submission template here, instead of the one for full submissions. Can you please:
- click "New Issue" -> "Submit software for review" and copy the templated text somewhere
- Fill fields by copying across what you've got in current pre-submission template
- Edit your initial comment by replacing current version will equivalent full-submission version.
The bot checks may not be automatically triggered, so you might also need to manually call @ropensci-review-bot check package (as a separate issue comment). Thanks!
Apologies @mpadge, hopefully I've corrected this now!
@ropensci-review-bot check package
Thanks, about to send the query.
:rocket:
Editor check started
:wave:
Checks for trud (v0.1.0.9000)
git hash: aa883f7f
- :heavy_check_mark: Package is already on CRAN.
- :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.
Important: All failing checks above must be addressed prior to proceeding
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 | 29 |
| internal | trud | 17 |
| internal | utils | 2 |
| internal | methods | 1 |
| internal | stats | 1 |
| imports | rvest | 3 |
| imports | httr2 | 2 |
| imports | purrr | 2 |
| imports | stringr | 2 |
| imports | dplyr | 1 |
| imports | rlang | 1 |
| imports | tibble | 1 |
| imports | cli | NA |
| suggests | knitr | NA |
| suggests | rmarkdown | NA |
| suggests | spelling | NA |
| suggests | testthat | NA |
| suggests | withr | 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 (13), class (2), message (2), paste0 (2), url (2), as.integer (1), body (1), call (1), environment (1), file.path (1), Sys.setenv (1), tryCatch (1), with (1)
trud
get_item_metadata (3), get_trud_items_html (2), request_download_item (2), request_item_metadata (2), trud_error_message (2), trud_items (2), download_item (1), get_subscribed_metadata (1), get_trud_api_key (1), req_user_agent_trud (1)
rvest
html_attr (1), html_elements (1), html_text (1)
httr2
req_error (1), req_perform (1)
purrr
pluck (2)
stringr
str_glue (2)
utils
page (2)
dplyr
mutate (1)
methods
as (1)
rlang
caller_env (1)
stats
df (1)
tibble
tibble (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 6 files) and
- 4 authors
- 1 vignette
- no internal data file
- 8 imported packages
- 4 exported functions (median 14 lines of code)
- 26 non-exported functions in R (median 11 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 | 6 | 37.1 | |
| files_inst | 1 | 94.8 | |
| files_vignettes | 1 | 61.7 | |
| files_tests | 7 | 81.3 | |
| loc_R | 283 | 30.0 | |
| loc_inst | 12 | 17.3 | |
| loc_vignettes | 40 | 6.1 | |
| loc_tests | 279 | 58.5 | |
| num_vignettes | 1 | 58.7 | |
| n_fns_r | 30 | 39.7 | |
| n_fns_r_exported | 4 | 20.1 | |
| n_fns_r_not_exported | 26 | 47.3 | |
| n_fns_per_file_r | 3 | 50.0 | |
| num_params_per_fn | 3 | 29.3 | |
| loc_per_fn_r | 11 | 32.7 | |
| loc_per_fn_r_exp | 14 | 33.4 | |
| loc_per_fn_r_not_exp | 11 | 35.7 | |
| rel_whitespace_R | 19 | 34.2 | |
| rel_whitespace_inst | 8 | 15.6 | |
| rel_whitespace_vignettes | 40 | 9.4 | |
| rel_whitespace_tests | 18 | 53.9 | |
| doclines_per_fn_exp | 24 | 23.5 | |
| doclines_per_fn_not_exp | 0 | 0.0 | TRUE |
| fn_call_network_size | 18 | 43.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)
3a. Continuous Integration Badges
GitHub Workflow Results
| id | name | conclusion | sha | run_number | date |
|---|---|---|---|---|---|
| 14912366508 | Draft PDF | success | aa883f | 6 | 2025-05-08 |
| 14912511223 | pages build and deployment | success | 0c3012 | 34 | 2025-05-08 |
| 14912366515 | pkgcheck | cancelled | aa883f | 10 | 2025-05-08 |
| 14912366495 | pkgdown | success | aa883f | 35 | 2025-05-08 |
| 14912366507 | R-CMD-check | success | aa883f | 25 | 2025-05-08 |
| 14912366493 | test-coverage | success | aa883f | 30 | 2025-05-08 |
3b. goodpractice results
R CMD check with rcmdcheck
R CMD check generated the following error:
- checking tests ...
Running ‘spelling.R’
Comparing ‘spelling.Rout’ to ‘spelling.Rout.save’ ... OK
Running ‘testthat.R’
ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
Error in
get_subscribed_metadata(): x Can't find NHS TRUD API key i Set your NHS TRUD API key as an environment variable usingSys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a.Renvironfile i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage). Backtrace: ▆- ├─testthat::with_mocked_bindings(...) at test-get_subscribed_metadata.R:2:3
- └─trud::get_subscribed_metadata() at test-get_subscribed_metadata.R:14:7
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
[ FAIL 6 | WARN 0 | SKIP 5 | PASS 14 ] Error: Test failures Execution halted
R CMD check generated the following test_fail:
-
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/testing-design.html#sec-tests-files-overview
* https://testthat.r-lib.org/articles/special-files.html
library(testthat) library(trud)
test_check("trud") [ FAIL 6 | WARN 0 | SKIP 5 | PASS 14 ]
══ Skipped tests (5) ═══════════════════════════════════════════════════════════ • identical(Sys.getenv("TRUD_API_KEY"), "") is TRUE (5): 'test-get_item_metadata.R:27:3', 'test-get_item_metadata.R:45:5', 'test-get_item_metadata.R:77:3', 'test-get_subscribed_metadata.R:28:3', 'test-trud_items.R:36:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-download_item.R:2:3'): Expected errors raised for invalid release arg with download_item() ──
<missing_api_key/rlang_error/error/condition>
Error in download_item(394, release = 1): x Can't find NHS TRUD API key
i Set your NHS TRUD API key as an environment variable using Sys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a .Renviron file
i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form
i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage).
Backtrace:
▆
- ├─testthat::expect_error(download_item(394, release = 1), "Argument
releasemust be a string") at test-download_item.R:2:3 - │ └─testthat:::expect_condition_matching(...)
- │ └─testthat:::quasi_capture(...)
- │ ├─testthat (local) .capture(...)
- │ │ └─base::withCallingHandlers(...)
- │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
- └─trud::download_item(394, release = 1)
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
── Error ('test-download_item.R:37:7'): Warning raised if file to be downloaded already exists locally ──
<missing_api_key/rlang_error/error/condition>
Error in download_item(394, release = "item1", directory = tempdir()): x Can't find NHS TRUD API key
i Set your NHS TRUD API key as an environment variable using Sys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a .Renviron file
i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form
i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage).
Backtrace:
▆
- ├─testthat::with_mocked_bindings(...) at test-download_item.R:27:3
- ├─testthat::expect_warning(...) at test-download_item.R:37:7
- │ └─testthat:::expect_condition_matching(...)
- │ └─testthat:::quasi_capture(...)
- │ ├─testthat (local) .capture(...)
- │ │ └─base::withCallingHandlers(...)
- │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
- └─trud::download_item(394, release = "item1", directory = tempdir())
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
── Error ('test-download_item.R:64:7'): download_item() works ────────────────
<missing_api_key/rlang_error/error/condition>
Error in download_item(394, release = "item1", directory = tempdir()): x Can't find NHS TRUD API key
i Set your NHS TRUD API key as an environment variable using Sys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a .Renviron file
i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form
i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage).
Backtrace:
▆
- ├─testthat::with_mocked_bindings(...) at test-download_item.R:47:3
- ├─testthat::expect_equal(...) at test-download_item.R:64:7
- │ └─testthat::quasi_label(enquo(object), label, arg = "object")
- │ └─rlang::eval_bare(expr, quo_get_env(quo))
- └─trud::download_item(394, release = "item1", directory = tempdir())
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
── Error ('test-get_item_metadata.R:2:3'): Error raised with invalid latest_only arg value for get_item_metadata() ──
<missing_api_key/rlang_error/error/condition>
Error in get_item_metadata(394, latest_only = "TRUE"): x Can't find NHS TRUD API key
i Set your NHS TRUD API key as an environment variable using Sys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a .Renviron file
i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form
i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage).
Backtrace:
▆
- ├─testthat::expect_error(...) at test-get_item_metadata.R:2:3
- │ └─testthat:::expect_condition_matching(...)
- │ └─testthat:::quasi_capture(...)
- │ ├─testthat (local) .capture(...)
- │ │ └─base::withCallingHandlers(...)
- │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
- └─trud::get_item_metadata(394, latest_only = "TRUE")
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
── Error ('test-get_item_metadata.R:18:7'): get_item_metadata() runs with mocked API response ──
<missing_api_key/rlang_error/error/condition>
Error in get_item_metadata(394): x Can't find NHS TRUD API key
i Set your NHS TRUD API key as an environment variable using Sys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a .Renviron file
i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form
i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage).
Backtrace:
▆
- ├─testthat::with_mocked_bindings(...) at test-get_item_metadata.R:9:3
- └─trud::get_item_metadata(394) at test-get_item_metadata.R:18:7
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
── Error ('test-get_subscribed_metadata.R:14:7'): get_subscribed_metadata() runs as expected ──
<missing_api_key/rlang_error/error/condition>
Error in get_subscribed_metadata(): x Can't find NHS TRUD API key
i Set your NHS TRUD API key as an environment variable using Sys.setenv(TRUD_API_KEY='<<your-key>>'), or preferably use a .Renviron file
i To get an API key, first sign up for a NHS TRUD account at https://isd.digital.nhs.uk/trud/users/guest/filters/0/account/form
i To find Your API key, log in and visit your account profile page (https://isd.digital.nhs.uk/trud/users/authenticated/filters/0/account/manage).
Backtrace:
▆
- ├─testthat::with_mocked_bindings(...) at test-get_subscribed_metadata.R:2:3
- └─trud::get_subscribed_metadata() at test-get_subscribed_metadata.R:14:7
- └─trud:::get_trud_api_key(TRUD_API_KEY)
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
[ FAIL 6 | WARN 0 | SKIP 5 | PASS 14 ] Error: Test failures Execution halted
R CMD check generated the following check_fail:
- rcmdcheck_tests_pass
Test coverage with covr
ERROR: Test Coverage Failed
Cyclocomplexity with cyclocomp
No functions have cyclocomplexity >= 15
Static code analyses with lintr
lintr found the following 46 potential issues:
| message | number of times |
|---|---|
| Avoid library() and require() calls in packages | 1 |
| Lines should not be more than 80 characters. This line is 100 characters. | 1 |
| Lines should not be more than 80 characters. This line is 105 characters. | 1 |
| Lines should not be more than 80 characters. This line is 108 characters. | 1 |
| Lines should not be more than 80 characters. This line is 111 characters. | 1 |
| Lines should not be more than 80 characters. This line is 112 characters. | 2 |
| Lines should not be more than 80 characters. This line is 113 characters. | 3 |
| Lines should not be more than 80 characters. This line is 115 characters. | 1 |
| Lines should not be more than 80 characters. This line is 117 characters. | 2 |
| Lines should not be more than 80 characters. This line is 118 characters. | 1 |
| Lines should not be more than 80 characters. This line is 147 characters. | 1 |
| Lines should not be more than 80 characters. This line is 165 characters. | 2 |
| Lines should not be more than 80 characters. This line is 81 characters. | 3 |
| Lines should not be more than 80 characters. This line is 82 characters. | 2 |
| Lines should not be more than 80 characters. This line is 83 characters. | 4 |
| Lines should not be more than 80 characters. This line is 84 characters. | 2 |
| Lines should not be more than 80 characters. This line is 85 characters. | 6 |
| Lines should not be more than 80 characters. This line is 86 characters. | 2 |
| Lines should not be more than 80 characters. This line is 87 characters. | 1 |
| Lines should not be more than 80 characters. This line is 88 characters. | 2 |
| Lines should not be more than 80 characters. This line is 89 characters. | 1 |
| Lines should not be more than 80 characters. This line is 90 characters. | 3 |
| Lines should not be more than 80 characters. This line is 93 characters. | 1 |
| Lines should not be more than 80 characters. This line is 97 characters. | 2 |
Package Versions
| package | version |
|---|---|
| pkgstats | 0.2.0.54 |
| pkgcheck | 0.1.2.126 |
Editor-in-Chief Instructions:
Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.
@ropensci-review-bot check package
Thanks, about to send the query.
:rocket:
Editor check started
:wave:
Checks for trud (v0.1.0.9000)
git hash: 969f5d1c
- :heavy_check_mark: Package is already on CRAN.
- :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_check_mark: Package coverage is 91.4%.
- :heavy_check_mark: R CMD check found no errors.
- :heavy_check_mark: R CMD check found no warnings.
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 | 29 |
| internal | trud | 17 |
| internal | utils | 2 |
| internal | methods | 1 |
| internal | stats | 1 |
| imports | rvest | 3 |
| imports | httr2 | 2 |
| imports | purrr | 2 |
| imports | stringr | 2 |
| imports | dplyr | 1 |
| imports | rlang | 1 |
| imports | tibble | 1 |
| imports | cli | NA |
| suggests | knitr | NA |
| suggests | rmarkdown | NA |
| suggests | spelling | NA |
| suggests | testthat | NA |
| suggests | withr | 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 (13), class (2), message (2), paste0 (2), url (2), as.integer (1), body (1), call (1), environment (1), file.path (1), Sys.setenv (1), tryCatch (1), with (1)
trud
get_item_metadata (3), get_trud_items_html (2), request_download_item (2), request_item_metadata (2), trud_error_message (2), trud_items (2), download_item (1), get_subscribed_metadata (1), get_trud_api_key (1), req_user_agent_trud (1)
rvest
html_attr (1), html_elements (1), html_text (1)
httr2
req_error (1), req_perform (1)
purrr
pluck (2)
stringr
str_glue (2)
utils
page (2)
dplyr
mutate (1)
methods
as (1)
rlang
caller_env (1)
stats
df (1)
tibble
tibble (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 6 files) and
- 4 authors
- 1 vignette
- no internal data file
- 8 imported packages
- 4 exported functions (median 14 lines of code)
- 26 non-exported functions in R (median 11 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 | 6 | 37.1 | |
| files_inst | 1 | 94.8 | |
| files_vignettes | 1 | 61.7 | |
| files_tests | 7 | 81.3 | |
| loc_R | 283 | 30.0 | |
| loc_inst | 12 | 17.3 | |
| loc_vignettes | 40 | 6.1 | |
| loc_tests | 290 | 59.4 | |
| num_vignettes | 1 | 58.7 | |
| n_fns_r | 30 | 39.7 | |
| n_fns_r_exported | 4 | 20.1 | |
| n_fns_r_not_exported | 26 | 47.3 | |
| n_fns_per_file_r | 3 | 50.0 | |
| num_params_per_fn | 3 | 29.3 | |
| loc_per_fn_r | 11 | 32.7 | |
| loc_per_fn_r_exp | 14 | 33.4 | |
| loc_per_fn_r_not_exp | 11 | 35.7 | |
| rel_whitespace_R | 19 | 34.2 | |
| rel_whitespace_inst | 8 | 15.6 | |
| rel_whitespace_vignettes | 40 | 9.4 | |
| rel_whitespace_tests | 17 | 53.9 | |
| doclines_per_fn_exp | 24 | 23.5 | |
| doclines_per_fn_not_exp | 0 | 0.0 | TRUE |
| fn_call_network_size | 18 | 43.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)
3a. Continuous Integration Badges
GitHub Workflow Results
| id | name | conclusion | sha | run_number | date |
|---|---|---|---|---|---|
| 14924645040 | Draft PDF | success | 969f5d | 7 | 2025-05-09 |
| 14912511223 | pages build and deployment | success | 0c3012 | 34 | 2025-05-08 |
| 14924645045 | pkgcheck | NA | 969f5d | 11 | 2025-05-09 |
| 14924645044 | pkgdown | NA | 969f5d | 36 | 2025-05-09 |
| 14924645043 | R-CMD-check | NA | 969f5d | 26 | 2025-05-09 |
| 14924645060 | test-coverage | NA | 969f5d | 31 | 2025-05-09 |
3b. goodpractice results
R CMD check with rcmdcheck
rcmdcheck found no errors, warnings, or notes
Test coverage with covr
Package coverage: 91.44
Cyclocomplexity with cyclocomp
No functions have cyclocomplexity >= 15
Static code analyses with lintr
lintr found the following 46 potential issues:
| message | number of times |
|---|---|
| Avoid library() and require() calls in packages | 1 |
| Lines should not be more than 80 characters. This line is 100 characters. | 1 |
| Lines should not be more than 80 characters. This line is 105 characters. | 1 |
| Lines should not be more than 80 characters. This line is 108 characters. | 1 |
| Lines should not be more than 80 characters. This line is 111 characters. | 1 |
| Lines should not be more than 80 characters. This line is 112 characters. | 2 |
| Lines should not be more than 80 characters. This line is 113 characters. | 3 |
| Lines should not be more than 80 characters. This line is 115 characters. | 1 |
| Lines should not be more than 80 characters. This line is 117 characters. | 2 |
| Lines should not be more than 80 characters. This line is 118 characters. | 1 |
| Lines should not be more than 80 characters. This line is 147 characters. | 1 |
| Lines should not be more than 80 characters. This line is 165 characters. | 2 |
| Lines should not be more than 80 characters. This line is 81 characters. | 3 |
| Lines should not be more than 80 characters. This line is 82 characters. | 2 |
| Lines should not be more than 80 characters. This line is 83 characters. | 4 |
| Lines should not be more than 80 characters. This line is 84 characters. | 2 |
| Lines should not be more than 80 characters. This line is 85 characters. | 6 |
| Lines should not be more than 80 characters. This line is 86 characters. | 2 |
| Lines should not be more than 80 characters. This line is 87 characters. | 1 |
| Lines should not be more than 80 characters. This line is 88 characters. | 2 |
| Lines should not be more than 80 characters. This line is 89 characters. | 1 |
| Lines should not be more than 80 characters. This line is 90 characters. | 3 |
| Lines should not be more than 80 characters. This line is 93 characters. | 1 |
| Lines should not be more than 80 characters. This line is 97 characters. | 2 |
Package Versions
| package | version |
|---|---|
| pkgstats | 0.2.0.54 |
| pkgcheck | 0.1.2.126 |
Editor-in-Chief Instructions:
This package is in top shape and may be passed on to a handling editor
Thanks for submitting @rmgpanw, and great to see that you've got the tests working. I note only one aspect of the {pkgcheck} results here:
This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.
And clicking on the statistical properties section shows that is just that you have no documentation lines at all for non-exported functions. Documenting all functions both exported and internal greatly helps others to understand, and thereby contribute, to your package. You just need to add a # @noRd tag to the end of internal function docs to prevent {roxygen2} from outputting documentation for those. See this section of our Dev Guide for more details. We'll proceed with review regardless, but do note that documentation of internal functions is also very helpful for reviewers, so please keep both the yet-to-be-assigned editor, and subsequent reviewers informed of your intentions and status in that regard.
Note also that the statistical properties provide immediate context for your statement that,
trudis a relatively small package
In Lines-of-Code, the standard and most direct measure of package size, it is in the 30th percentile, which is below average but definitely not too small, so rest assured, size is not an issue here. But thanks for pointing that out to us!
Other than that, everything has been previously checked and approved in the pre-submission issue #689, so we're good to proceed here. We'll try to find a handling editor asap. You'll see here when that's been arranged.
Thank you for the helpful feedback, as always @mpadge. I have now added some documentation for the non-exported functions in commit f48ca4d. Looking forward to making any further improvements!
@ropensci-review-bot assign @emilyriederer as editor
Assigned! @emilyriederer is now the editor
@ropensci-review-bot check package
Thanks, about to send the query.
:rocket:
Editor check started
:wave:
Checks for trud (v0.1.0.9000)
git hash: f48ca4d1
- :heavy_check_mark: Package is already on CRAN.
- :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_check_mark: Package coverage is 91.4%.
- :heavy_check_mark: R CMD check found no errors.
- :heavy_check_mark: R CMD check found no warnings.
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 | 29 |
| internal | trud | 17 |
| internal | utils | 2 |
| internal | methods | 1 |
| internal | stats | 1 |
| imports | rvest | 3 |
| imports | httr2 | 2 |
| imports | purrr | 2 |
| imports | stringr | 2 |
| imports | dplyr | 1 |
| imports | rlang | 1 |
| imports | tibble | 1 |
| imports | cli | NA |
| suggests | knitr | NA |
| suggests | rmarkdown | NA |
| suggests | spelling | NA |
| suggests | testthat | NA |
| suggests | withr | 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 (13), class (2), message (2), paste0 (2), url (2), as.integer (1), body (1), call (1), environment (1), file.path (1), Sys.setenv (1), tryCatch (1), with (1)
trud
get_item_metadata (3), get_trud_items_html (2), request_download_item (2), request_item_metadata (2), trud_error_message (2), trud_items (2), download_item (1), get_subscribed_metadata (1), get_trud_api_key (1), req_user_agent_trud (1)
rvest
html_attr (1), html_elements (1), html_text (1)
httr2
req_error (1), req_perform (1)
purrr
pluck (2)
stringr
str_glue (2)
utils
page (2)
dplyr
mutate (1)
methods
as (1)
rlang
caller_env (1)
stats
df (1)
tibble
tibble (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 6 files) and
- 4 authors
- 1 vignette
- no internal data file
- 8 imported packages
- 4 exported functions (median 14 lines of code)
- 26 non-exported functions in R (median 11 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 | 6 | 37.1 | |
| files_inst | 1 | 94.6 | |
| files_vignettes | 1 | 61.7 | |
| files_tests | 7 | 81.3 | |
| loc_R | 283 | 29.9 | |
| loc_inst | 12 | 16.9 | |
| loc_vignettes | 40 | 6.1 | |
| loc_tests | 290 | 59.3 | |
| num_vignettes | 1 | 58.6 | |
| n_fns_r | 30 | 39.6 | |
| n_fns_r_exported | 4 | 20.1 | |
| n_fns_r_not_exported | 26 | 47.3 | |
| n_fns_per_file_r | 3 | 50.0 | |
| num_params_per_fn | 3 | 29.2 | |
| loc_per_fn_r | 11 | 32.7 | |
| loc_per_fn_r_exp | 14 | 33.3 | |
| loc_per_fn_r_not_exp | 11 | 35.7 | |
| rel_whitespace_R | 19 | 34.1 | |
| rel_whitespace_inst | 8 | 15.4 | |
| rel_whitespace_vignettes | 40 | 9.4 | |
| rel_whitespace_tests | 17 | 53.8 | |
| doclines_per_fn_exp | 24 | 23.4 | |
| doclines_per_fn_not_exp | 0 | 0.0 | TRUE |
| fn_call_network_size | 18 | 43.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)
3a. Continuous Integration Badges
GitHub Workflow Results
| id | name | conclusion | sha | run_number | date |
|---|---|---|---|---|---|
| 15022557534 | Draft PDF | success | f48ca4 | 8 | 2025-05-14 |
| 15022748529 | pages build and deployment | success | 7578fb | 36 | 2025-05-14 |
| 15022557548 | pkgcheck | success | f48ca4 | 12 | 2025-05-14 |
| 15022557528 | pkgdown | success | f48ca4 | 37 | 2025-05-14 |
| 15022557537 | R-CMD-check | success | f48ca4 | 27 | 2025-05-14 |
| 15022557561 | test-coverage | success | f48ca4 | 32 | 2025-05-14 |
3b. goodpractice results
R CMD check with rcmdcheck
rcmdcheck found no errors, warnings, or notes
Test coverage with covr
Package coverage: 91.44
Cyclocomplexity with cyclocomp
No functions have cyclocomplexity >= 15
Static code analyses with lintr
lintr found the following 46 potential issues:
| message | number of times |
|---|---|
| Avoid library() and require() calls in packages | 1 |
| Lines should not be more than 80 characters. This line is 100 characters. | 1 |
| Lines should not be more than 80 characters. This line is 105 characters. | 1 |
| Lines should not be more than 80 characters. This line is 108 characters. | 1 |
| Lines should not be more than 80 characters. This line is 111 characters. | 1 |
| Lines should not be more than 80 characters. This line is 112 characters. | 2 |
| Lines should not be more than 80 characters. This line is 113 characters. | 3 |
| Lines should not be more than 80 characters. This line is 115 characters. | 1 |
| Lines should not be more than 80 characters. This line is 117 characters. | 2 |
| Lines should not be more than 80 characters. This line is 118 characters. | 1 |
| Lines should not be more than 80 characters. This line is 147 characters. | 1 |
| Lines should not be more than 80 characters. This line is 165 characters. | 2 |
| Lines should not be more than 80 characters. This line is 81 characters. | 3 |
| Lines should not be more than 80 characters. This line is 82 characters. | 2 |
| Lines should not be more than 80 characters. This line is 83 characters. | 4 |
| Lines should not be more than 80 characters. This line is 84 characters. | 2 |
| Lines should not be more than 80 characters. This line is 85 characters. | 6 |
| Lines should not be more than 80 characters. This line is 86 characters. | 2 |
| Lines should not be more than 80 characters. This line is 87 characters. | 1 |
| Lines should not be more than 80 characters. This line is 88 characters. | 2 |
| Lines should not be more than 80 characters. This line is 89 characters. | 1 |
| Lines should not be more than 80 characters. This line is 90 characters. | 3 |
| Lines should not be more than 80 characters. This line is 93 characters. | 1 |
| Lines should not be more than 80 characters. This line is 97 characters. | 2 |
Package Versions
| package | version |
|---|---|
| pkgstats | 0.2.0.54 |
| pkgcheck | 0.1.2.132 |
Editor-in-Chief Instructions:
This package is in top shape and may be passed on to a handling editor
Hi @rmgpanw ! I will be the handling editor for this package.
Overall, the package looks to be in good shape to begin a review.
I note you are still not passing the check for documenting non-exported functions. From your commit, it appears you added the necessary R files but may not have rerun roxygenize (no changes to the Rd files)?
I'll proceed to look for reviewers as this should not impact their ability to engage with the code, but this might be useful to add as you are able.
@ropensci-review-bot seeking reviewers
Please add this badge to the README of your package repository:
[](https://github.com/ropensci/software-review/issues/705)
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
Hi @emilyriederer thanks for proceeding with the review! I have now added the rOpenSci status badge to the README.
Regarding documentation for non-exported functions, I have tagged these with @noRd (as per https://github.com/ropensci/software-review/issues/705#issuecomment-2879364988) for now but happy of course to remove this if outputting documentation for any internal functions would be helpful.
@ropensci-review-bot assign @AleKoure as reviewer
@AleKoure added to the reviewers list. Review due date is 2025-06-18. Thanks @AleKoure 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.
@AleKoure: If you haven't done so, please fill this form for us to update our reviewers records.
@ropensci-review-bot assign @jonclayden as reviewer
@jonclayden added to the reviewers list. Review due date is 2025-06-18. Thanks @jonclayden 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.
@jonclayden: If you haven't done so, please fill this form for us to update our reviewers records.
@rmgpanw -- Thank you for the explanation! My apologies, that's my oversight. That's good as-is.
@rmgpanw -- I'm happy to introduce our two reviewers @jonclayden and @AleKoure. Both have backgrounds in API extraction and healthcare, so I'm grateful to bring their expertise into the review process.