Releases: shmercer/writeAlizer
Releases · shmercer/writeAlizer
writeAlizer 1.7.2
new features
- Added
keep_stem_before_txt()function to process Coh-Metrix and GAMET filenames that appear as paths - integrated
keep_stem_before_txt()intoimport_coh()import_gamet()andimport_merge_gamet_rb()functions
improved documentation
- Added new vignette that details scoring model development
- Added a
pkgdown()site to host documentation on GitHub
writeAlizer 1.7.1
writeAlizer 1.7.1 (2025-10-22)
CRAN compliance and offline example guard
- Fixed
predict_quality()example to run deterministically whenoptions(writeAlizer.offline = TRUE). - Example now seeds a local
'example'model withwa_seed_example_models("example", dir = tempdir())and restores prior options after cleanup. - Offline runs now fully skip remote file downloads, avoiding spurious errors during
R CMD check --as-cran --run-donttest. - No user-facing API changes.
writeAlizer 1.7.0
writeAlizer 1.7.0 (2025-10-21)
Error handling & classes
- Introduced structured errors via
rlang::abort():writeAlizer_registry_missing– missing/invalidartifacts.csv.writeAlizer_unknown_model– unknown/unsupported model key (raised bypreprocess()/predict_quality()).writeAlizer_download_failed– offline/bad URL/checksum fetch failures.writeAlizer_internal_mismatch– expected submodel count ≠ preprocessing splits..wa_ensure_file- added classed errors and download retries
Loaders & caching
.wa_ensure_file():- Honors
options(writeAlizer.mock_dir=)(preserves subdirs). - Supports
file://URLs; clearer offline guidance. - Warns on cached checksum mismatch; hard-errors if post-download checksum mismatches.
- Honors
.wa_parts_for()validates inputs and uses canonicalized model keys..wa_load_model_rdas()/.wa_load_fits_list():- Prefer
mock_dirartifacts; load via temp env; pick sensible object (fit,model, etc.). - Legacy → v2 name mapping; special-case
example.
- Prefer
.wa_require_pkgs_for_fits()collects deps from model classes andtrain$modelInfo$library; errors with install hint..wa_validate_import()- checks ID column for duplicates and character type
model_deps()
- Reports
requiredvsmissingfromSuggests+ overrideoptions(writeAlizer.required_pkgs=). - Preserves version qualifiers in
required; strips qualifiers formissing. - Emits copy-paste
install.packages()command. - Tests updated to capture output/messages cleanly (no stray console prints).
Predict API & preprocessing
- Better validation for swapped args and
NA/invalidmodelwith actionable messages. predict_quality()surfaces unknown model keys (includes canonicalized key).- Preprocessing preserves row counts/
ID; supports v2 varlists and consolidated-split behavior.
Test infrastructure
- Added
wa_sample_path()to reliably findinst/extdatain dev/install contexts. - Network helper hardened; integration tests force offline via
options(writeAlizer.offline=TRUE)and avoid HEAD probes. - Introduced
.quiet_eval()to silence messages/warnings in targeted assertions.
Integration & smoke tests
- Integration test now mocks the registry (RDS + RDA) for all exercised models:
- RB:
rb_mod1,rb_mod2,rb_mod3narr_v2,rb_mod3exp_v2,rb_mod3per_v2,rb_mod3all_v2 - Coh:
coh_mod1,coh_mod2,coh_mod3narr,coh_mod3exp,coh_mod3per,coh_mod3all - GAMET:
gamet_cws1
- RB:
- Writes matching varlists/fits into
mock_dir; verifies prediction columns and mean-column rules. rb_mod3allsmoke test made offline-only with mocked varlists.
RB/COH import utilities tests
- Coverage for:
import_rb()path withSEP=,+read.table(text=readLines()).NaN→NAin character columns; guarded numeric-like conversion (accepts integer where appropriate).- Name-based keep/drop assertions driven by sample header.
- Skips only when assets truly missing (via
wa_sample_path()).
Misc
- Added a package vignette
- switch to MIT license
- Added/updated tests for:
- Mismatched expected submodels.
- Bad registry columns.
- Checksum errors.
- Legacy → v2 artifact-name mapping.
writeAlizer 1.6.5
writeAlizer 1.6.5
- Addresses CRAN policy for Internet resources:
- Network access now fails gracefully with informative messages (no low-level
download.fileerrors). - Tests that rely on remote artifacts now preflight their exact URLs/paths and skip when unavailable.
- Examples/tests seed mock artifacts for deterministic offline runs.
- Network access now fails gracefully with informative messages (no low-level
writeAlizer 1.6.4
writeAlizer 1.6.4 (2025-09-23)
CRAN policy & documentation improvements
-
Replaced
writeAlizer:::wa_seed_example_models()withwriteAlizer::wa_seed_example_models()in examples and documentation, per CRAN’s guidance to avoid accessing unexported objects. -
Exported
wa_seed_example_models()with full documentation:- Added
@return(returns the created temp path invisibly). - Added a small, runnable example that writes only to
tempdir()and cleans up; it also restores any prior option value. - Documented the temporary side effect of setting
options(writeAlizer.mock_dir = <path>).
- Added
writeAlizer 1.6.3
writeAlizer 1.6.3 (2025-09-17)
CRAN policy & documentation improvements
- DESCRIPTION: acronyms expanded (e.g., CBM), software/package names single-quoted, and method references added with CRAN auto-link format (DOIs).
- Documentation:
@returnadded toimport_coh(),import_rb(),import_gamet(),import_merge_gamet_rb(). - Examples:
\\dontrun{}replaced with\\donttest{}where needed; fast examples unwrapped;predict_quality()uses a tiny offline'example'model seeded intempdir()with cleanup. - File I/O: no writes to home by default; examples/tests use
tempdir(); caching standardized viatools::R_user_dir("writeAlizer","cache"). - New helpers:
wa_cache_dir()andwa_cache_clear(ask=)for cache discovery/cleanup. - Optional deps: new
model_deps()reports (does not install) optional packages and prints an install hint;install_model_deps()deprecated. - Tests: self-cleaning with
withrfixtures; no temp detritus; removed deprecated global teardown.
Bug fixes & maintenance
- Stabilized example/test behavior when offline by mocking artifacts via
writeAlizer.mock_dir. - Suppressed noisy pre-processing variance warnings in integration tests.
writeAlizer 1.6.2
implifies install_model_deps():
- Remove unused
modelargument. - Standardize on the option hook:
options(writeAlizer.require_pkgs_for_fits = function() ...). - Collapse discovery to a single
utils::packageDescription(..., fields = "Suggests")path. dry_run = TRUEnow returns tokens visibly; version qualifiers are stripped only for checks/installs.
Tests
- Updated tests to use the options hook and visible dry-run behavior.
- Mocked
requireNamespace()andutils::install.packages()to verify missing-package handling. - All tests pass locally with
devtools::test().
Notes
- Version set to 1.6.2 in
DESCRIPTION. (OptionalDate:field set to YYYY-MM-DD if present.) NEWS.mdupdated with a concise entry.
writeAlizer 1.6.1
writeAlizer 1.6.1
Tests & Coverage
- Added comprehensive tests for artifact registry helpers, cache, and installer.
- Increased overall coverage to ~82% (artifact_registry ~89%, cache ~92%, download 100%).
Artifact registry
- Prefers
inst/metadata/artifacts.csv; robust fallbacks and input validation. - Deterministic part ordering; legacy model key mapping handled.
Downloads
- Suppressed
download.filechatter in tests and internal helpers. - Added checksum verification path in ensure-file.
install_model_deps()
- Dry-run returns canonical Suggests tokens.
- Non-dry-run installs only truly missing packages (strips version tokens).
- Optional helper hook respected via
options(writeAlizer.require_pkgs_for_fits=...). - Added examples and improved docstrings.
Misc
- Quieted noisy test logs; hardened temp-dir handling.
writeAlizer 1.6.0
- Replaced the ReaderBench mod3 models with their v2 counterparts (e.g.,
rb_mod3allnow calls therb_mod3all_v2models). - Optimized model artifact downloads and added SHA-256 checksum verification (auto re-download on mismatch).
predict_quality()now returns per-submodel scores and the overall mean columnpred_<model>_mean(where applicable).import_rb()now keeps ReaderBench features by name using the packagedsample_rb.csvheader (first 404), dropping 405+. It falls back to the legacy positional selection if the header is unavailable, reducing brittleness to column reordering.- Added
install_model_deps()helper to install Suggests for a given model. - CI: wired up GitHub Actions R-CMD-check (Windows/macOS/Linux).