Published March 9, 2026
| Version v.1.1.0
Software
Open
sharksmhi/SHARK4R: v.1.1.0
Description
New features
- Added
get_nua_media_metadata()to retrieve detailed metadata for media items from Nordic Microalgae - Added
get_nua_image_labeling_links()to retrieve media URLs for automated imaging images (e.g., IFCB) from Nordic Microalgae - Added
get_nua_image_labeling_metadata()to retrieve detailed metadata for automated imaging images from Nordic Microalgae
Security improvements
load_shark4r_fields()now downloads field definitions as a binary.rdsfile instead of sourcing a remote R script, eliminating a remote code execution risk.get_shark_data()now validates thatfile_pathdoes not contain..path components, preventing path traversal when used in downstream applications.get_shark_datasets()now sanitizes dataset names from the API withbasename()before writing to disk.
Bug fixes and CRAN compliance
- Fixed species not getting properly matched in
match_algaebase_taxa(). The join between API results and input data usedleft_join(by = c("genus", "species")), which silently dropped results when AlgaeBase returned a reclassified genus (e.g., querying "Chlorella" but API returns "Auxenochlorella"). (Part of #47) - Fixed
match_algaebase_genus()returning unrelated genera whenexact_matches_only = TRUE. A variable shadowing bug insidetibble()caused theinput_matchcolumn to always equal 1, making the exact match filter ineffective. For example, querying "Nitzschia" returned 7 genera (Cymbellonitzschia, Pseudo-nitzschia, etc.) instead of just Nitzschia. (Part of #47) - Fixed genus column collision in
match_algaebase_species(). When higher taxonomy was requested,genus = genus_taxonomy$genuswas included in the taxonomy tibble, which could overwrite the species-level genus value. (Part of #47) - Removed genus fallback in
match_algaebase_taxa()for species-level queries. Previously, when a species was not found in AlgaeBase, the function fell back to a genus-level query. This produced misleading results where a species record linked to an unrelated genus page. Species queries that fail now return NA instead. (Part of #47) - Fixed
get_dyntaxa_records()silently returning a character string on API error instead of raising a condition withstop(). - Fixed
get_shark_data()silently droppingmunicipalities,waterCategories, andtypOmradenparameters when computing the pre-download row count, which could bypass the chunked download path. - Fixed operator precedence bug
nrow(genus > 0)tonrow(genus) > 0inconstruct_dyntaxa_missing_table(). - Replaced unsafe
1:length()and1:nrow()loops withseq_along()andseq_len()inconstruct_dyntaxa_missing_table()andconstruct_dyntaxa_table()to prevent errors on zero-length input. - Replaced
message("ERROR: ...")calls withwarning()incheck_value_logical(),check_zero_value(),check_zero_positions(),check_codes(), andread_shark_deliv()so conditions can be caught programmatically withtryCatch(). - Removed duplicate
cachefileassignment incache_call()and deadlist.files()call inlist_cache(). - All internal cache paths now use the
cache_dir()helper, which redirects totempdir()during R CMD check. Previously several functions calledtools::R_user_dir()directly, which could create~/.cache/R/SHARK4Rduring CRAN checks. - Fixed evaluation order bug in
clean_shark4r_cache()wheresearch_pattern = NULL(the default) could cause an error. - Fixed deprecation warning version numbers in algaebase functions (now correctly reference
1.0.0). - Fixed spelling of "Microalgae" and other minor typos in
get_hab_list()documentation. get_hab_list()updated to wrap inline text withI()inreadr::read_delim()forreadr≥ 2.2.0 compatibility and to remove deprecation warnings.- Tests that depend on the OBIS xylookup API now skip correctly when the endpoint returns a server error. Previously, the availability check targeted the base URL (
https://api.obis.org/) which could return 200 while the/xylookupendpoint itself returned 500. - All
\donttest{}examples that call external APIs are now wrapped withtry()so that transient service outages do not causeR CMD check --run-donttestfailures. - The
quality_controlvignette now wraps OBIS-dependent calls (check_onland(),check_depth()) intryCatch()so the vignette builds even when the API is unavailable.
What's Changed
- make sure cache is cleared after cmd check by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/45
- fix typo in deprecate warning message by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/46
- Add functions for the new nua api endpoints by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/49
- 47 species not getting properly matched in algaebase by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/48
- fix test warnings and update NEWS by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/50
- add copyright_stamp to output by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/51
- fix: make sure tests/vignettes skip or fail gracefully during transie… by @anderstorstensson in https://github.com/sharksmhi/SHARK4R/pull/52
Full Changelog: https://github.com/sharksmhi/SHARK4R/compare/v.1.0.3...v.1.1.0
Files
sharksmhi/SHARK4R-v.1.1.0.zip
Files
(989.5 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:dfddd4a9cfa4b6141c6e6bdd23c825cf
|
989.5 kB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/sharksmhi/SHARK4R/tree/v.1.1.0 (URL)
Software
- Repository URL
- https://github.com/sharksmhi/SHARK4R