try()-protected execution chunks, so
transient server errors (502, 503, 500) never cause vignette rebuild
failures. The user-facing code shown on pkgdown remains clean and
uncluttered.skip_if_offline() and
skip_if_resource_unavailable() guards to previously
unprotected tests for deprecated WoRMS wrappers
(match_wormstaxa, update_worms_taxonomy) and
the empty/NA input edge case
(match_worms_taxa(c("", NA))).skip_on_cran() to deprecated WoRMS wrapper tests,
since the base-URL availability check can pass while individual API
endpoints return server errors.skip_if_offline() to the
"wrong url fails" test in
test-xylookup.R.get_nua_media_metadata() to retrieve detailed
metadata for media items from Nordic Microalgaeget_nua_image_labeling_links() to retrieve media
URLs for automated imaging images (e.g., IFCB) from Nordic
Microalgaeget_nua_image_labeling_metadata() to retrieve
detailed metadata for automated imaging images from Nordic
Microalgaeload_shark4r_fields() now downloads field definitions
as a binary .rds file instead of sourcing a remote R
script, eliminating a remote code execution risk.get_shark_data() now validates that
file_path does not contain .. path components,
preventing path traversal when used in downstream applications.get_shark_datasets() now sanitizes dataset names from
the API with basename() before writing to disk.match_algaebase_taxa(). The join between API results and
input data used left_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)match_algaebase_genus() returning unrelated
genera when exact_matches_only = TRUE. A variable shadowing
bug inside tibble() caused the input_match
column 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)match_algaebase_species(). When higher taxonomy was
requested, genus = genus_taxonomy$genus was included in the
taxonomy tibble, which could overwrite the species-level genus value.
(Part of #47)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)get_dyntaxa_records() silently returning a
character string on API error instead of raising a condition with
stop().get_shark_data() silently dropping
municipalities, waterCategories, and
typOmraden parameters when computing the pre-download row
count, which could bypass the chunked download path.nrow(genus > 0) to
nrow(genus) > 0 in
construct_dyntaxa_missing_table().1:length() and 1:nrow()
loops with seq_along() and seq_len() in
construct_dyntaxa_missing_table() and
construct_dyntaxa_table() to prevent errors on zero-length
input.message("ERROR: ...") calls with
warning() in check_value_logical(),
check_zero_value(), check_zero_positions(),
check_codes(), and read_shark_deliv() so
conditions can be caught programmatically with
tryCatch().cachefile assignment in
cache_call() and dead list.files() call in
list_cache().cache_dir()
helper, which redirects to tempdir() during R CMD check.
Previously several functions called tools::R_user_dir()
directly, which could create ~/.cache/R/SHARK4R during CRAN
checks.clean_shark4r_cache()
where search_pattern = NULL (the default) could cause an
error.1.0.0).get_hab_list() documentation.get_hab_list() updated to wrap inline text with
I() in readr::read_delim() for
readr ≥ 2.2.0 compatibility and to remove deprecation
warnings.https://api.obis.org/) which could
return 200 while the /xylookup endpoint itself returned
500.\donttest{} examples that call external APIs are
now wrapped with try() so that transient service outages do
not cause R CMD check --run-donttest failures.quality_control vignette now wraps OBIS-dependent
calls (check_onland(), check_depth()) in
tryCatch() so the vignette builds even when the API is
unavailable.harmful_non_toxic_only argument to
get_hab_list() to download only non-toxigenic harmful
microalgal species from the IOC-UNESCO HABs listspecies_only argument to
get_hab_list() to return only species-level records, which
is now also the default option. This filter is ignored when
harmful_non_toxic_only = TRUEverbose argument to
positions_are_near_land() and
get_hab_list(harmful_non_toxic_only = TRUE) to enable
printing of progress messages during data retrievalpositions_are_near_land(), replacing direct file server
downloads that were unstableSHARK4R:::.type_lookup now includes the missing
datatype Jellyfish (#39)extract_complete_toxins() and
repair_toxins_json()README.mdlon and lat arguments to the
lookup_xy() function for more flexible lookup optionsget_toxin_list() now handles partial JSON
responsesget_delivery_template() and
find_required_fields() to get SHARK delivery templates and
required fields from the webget_shark_datasets() to retrieve
available SHARK datasets from APIget_nomp_list() to download and read
the latest NOMP biovolume Excel listsget_peg_list() to download and read
the PEG biovolume Excel listread_ptbx() to read Plankton Toolbox
filesget_shark_codes() to download and read
the current SHARK code listsclean_shark4r_cache() to clear cached
filescheck_setup() and
run_qc_app() to download and run SHARK QC scripts and Shiny
Appget_shark_statistics() to download
SHARK data and extract summary statistics for numeric parameterstranslate_shark_datatype() to
translate user-facing datatype names to internal SHARK4R namesload_shark4r_stats() to download and
load precomputed SHARK4R statistical datasets (e.g., threshold or
summary statistics) from a GitHub repositoryload_shark4r_fields() to download and
load fields definitions from a GitHub repositoryget_worms_classification() to retrieve
higher taxonomic information from WoRMS recordsget_worms_taxonomy_tree() to retrieve
and constructs a hierarchical taxonomy tree from WoRMS recordsconvert_ddmm_to_dd() to convert
coordinates from DDMM format to decimal degreesiRfcb package:
which_basin() and
positions_are_near_land()get_dyntaxa_dwca(),
get_shark_codes(), get_nomp_list() and
get_peg_list() to avoid repeated downloadscheck_depth()lookup_xy()scatterplot() function to allow plotting of
multiple parametersmatch_worms_taxa() function to clean taxon
names from problematic special characters before being passed to API
callplot_leaflet argument to functions
check_station_distance() and
check_onland()utv argument to functions
get_shark_options(), get_shark_data(),
get_shark_datasets() and
get_shark_table_counts().add_rank_to_hierarchy argument to the
add_worms_taxonomy() functionmatch_worms_taxa() now handles bulk API requests using
the bulk argumentrun_qc_app())ifcb_is_near_land() and
ifcb_which_basin() (replaced by re-exported functions with
improved cache behavior)get_algaebase_species(),
get_algaebase_genus() and match_algaebase()
are now replaced by match_algaebase_species(),
match_algaebase_genus() and
match_algaebase_taxa()check_*_*_logical() functions replaced by general functions
check_parameter_rules and
check_logical_parameter() functioncheck_*() and check_*_deliv() replaced by a
general check_fields() functioncheck_*_*() functions to check for outliers replaced by a
general check_outliers() functionshark_read_deliv() and
shark_read_deliv_xls() are now replaced by
read_shark_deliv()shark_read() and
shark_read_zip() are now replaced by
read_shark()match_dyntaxa() is now replaced by
is_in_dyntaxa()plot_map_leaflet_deliv() is now
replaced by plot_map_leaflet()check_code_proj() is now replaced
by check_codes()match_taxon_name() is now replaced
by match_dyntaxa_taxa()get_worms_records_name() is now
replaced by match_worms_taxa()nominal_station() is now replaced
by check_nominal_station()match_wormstaxa() is now replaced
by match_worms_taxa()apikey replaced by
subscription_key in get_algaebase_genus(),
get_algaebase_species() and
match_algaebase()aphia_id replaced by
aphia_ids in get_worms_records() and
add_worms_taxonomy()scientific_name replaced by
scientific_names in add_worms_taxonomy() and
parse_scientific_names()genus replaced by
genera in match_algaebase_taxa()get_shark_table()NEWS.md filerow_limits in
get_shark_data() to retrieve data in yearly chunksget_hab_list() and
get_toxin_list()Patch release
get_shark_option()Patch release
construct_dyntaxa_table()get_shark_data()assign_plankton_group()get_shark_data() parameters,
e.g. boundary and year ranges