Recent Releases of trud
trud - trud 0.2.0
Major changes
Enhanced parameter design with enum validation:
get_item_metadata()andget_subscribed_metadata()now userelease_scope = c("all", "latest")parameter instead oflatest_onlyboolean. This makes function calls more expressive and eliminates boolean ambiguity.download_item()now usesfile_type = c("archive", "checksum", "signature", "publicKey")parameter instead ofdownload_file.
Added
overwriteparameter todownload_item()allowing users to explicitly control whether existing files should be overwritten.Breaking changes:
- Removed
TRUD_API_KEYparameter from all exported functions. API keys must now be set via theTRUD_API_KEYenvironment variable only. download_item()parameterdownload_filerenamed tofile_typewith enhanced validation.get_item_metadata()andget_subscribed_metadata()parameterlatest_onlyreplaced withrelease_scope.
- Removed
Minor changes and bug fixes
Improved documentation and user experience:
- Enhanced subscription workflow documentation with clear step-by-step guidance.
- Added explanation that
purrr::map_at()pattern is used in examples to avoid exposing API keys. - Clarified how to obtain and use release IDs from
get_item_metadata()for downloading specific releases.
Enhanced robustness and testing:
- Added validation warnings to
trud_items()to detect changes in NHS TRUD website structure that might break the scraper. - Refactored tests to use
withr::local_tempdir()for better test isolation and cleanup. - Improved test descriptions to be more specific and informative.
- Enhanced error handling with better retry logic and rate limiting.
- Added validation warnings to
Technical improvements:
- Added support for custom user agent headers via
TRUD_USER_AGENTenvironment variable. - Improved file existence handling in
download_item()with clearer warning messages. - Enhanced request handling with retry logic, and rate limiting.
- Consistently return file paths invisibly from
download_item().
- Added support for custom user agent headers via
- R
Published by rmgpanw 10 months ago
trud - JOSS-Zenodo
Updated version following review by rOpenSci (https://github.com/ropensci/software-review/issues/705). This version will also be submitted to CRAN soon.
- R
Published by rmgpanw 10 months ago