Skip to content

v3.5.1#155

Merged
Rafnuss merged 29 commits into
mainfrom
dev
Mar 11, 2026
Merged

v3.5.1#155
Rafnuss merged 29 commits into
mainfrom
dev

Conversation

@Rafnuss

@Rafnuss Rafnuss commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Rafnuss added 29 commits March 10, 2026 10:44
Use names(tag$acceleration) when checking for a 'label' field instead of %in% on the object itself. The previous check could match values rather than column/list names; this ensures we correctly detect a 'label' column/key in tag$acceleration and avoids incorrect branch behavior.
Wrap interactive prompts with interactive() checks across several functions so they no longer block or error in non-interactive/batch contexts (CI/CRAN). Defaults are provided when not interactive: directory-creation prompts default to TRUE, select.list prompts default to choice 1 (No), and overwrite confirmation defaults to FALSE. Files changed: R/geopressuretemplate_tag.R, R/tag_label.R, R/tag_set_map.R, R/trainset_write.R. Adjusted nocov placement accordingly to preserve coverage reporting where appropriate.
load_interim: treat .rda/.rdata extensions as explicit RData paths without requiring the file to already exist (removed file.exists check).
trainset_write: when asking to create a missing directory, honor options("askYesNo") in non-interactive runs by calling utils::askYesNo if that option is set; otherwise default to TRUE. This preserves interactive prompting and allows programmatic control of the prompt behavior.
Protect registration of the S4 method for 'rast' by wrapping methods::setMethod("rast", "map", rast.map) in try(..., silent = TRUE). This prevents package load failures or noisy errors if the method cannot be set (e.g., due to missing generic or conflicts) while preserving the attempt to register the method in zzz.R.
Extract the load_interim() test block from tests/testthat/test-0-workflow.R into a new dedicated file tests/testthat/test-1-load_interim.R. This keeps the workflow test file focused and isolates the var / var_optional checks for load_interim in their own test file; behavior and assertions are unchanged.
Add validation to tag_create to error when both crop_start and crop_end are provided but crop_start is not strictly earlier than crop_end. In tag_create_crop initialize a has_data flag, update it after cropping each sensor, and abort with a clear message if cropping was requested but no data remains. Error messages use cli::cli_abort and include received values to aid debugging.
Replace the old "dataframe" input flow with a new "tabular" mode that accepts in-memory data.frames/tibbles or CSV paths. Adds tag_create_tabular (and helpers tag_create_tabular_read, tag_create_tabular_check, tag_create_csv) to read/validate sensor CSVs, and removes tag_create_dataframe.R. Update tag_create to detect and dispatch "tabular", adjust trainset csv2tag to use tabular, and rename internal sensor variables (e.g. df -> sensor_data) in parsing helpers. Documentation and man pages updated to describe the "tabular" usage and CSV column expectations. Tests updated to cover CSV and in-memory tabular inputs and to reflect changed warning expectations.
@Rafnuss Rafnuss merged commit 093951c into main Mar 11, 2026
7 checks passed
@Rafnuss Rafnuss deleted the dev branch March 11, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant