Skip to content

Releases: shmercer/writeAlizer

writeAlizer 1.7.2

24 Nov 22:59

Choose a tag to compare

new features

  • Added keep_stem_before_txt() function to process Coh-Metrix and GAMET filenames that appear as paths
  • integrated keep_stem_before_txt() into import_coh() import_gamet() and import_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

22 Oct 17:27

Choose a tag to compare

writeAlizer 1.7.1 (2025-10-22)

CRAN compliance and offline example guard

  • Fixed predict_quality() example to run deterministically when options(writeAlizer.offline = TRUE).
  • Example now seeds a local 'example' model with wa_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

21 Oct 19:52

Choose a tag to compare

writeAlizer 1.7.0 (2025-10-21)

Error handling & classes

  • Introduced structured errors via rlang::abort():
    • writeAlizer_registry_missing – missing/invalid artifacts.csv.
    • writeAlizer_unknown_model – unknown/unsupported model key (raised by preprocess() / 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.
  • .wa_parts_for() validates inputs and uses canonicalized model keys.
  • .wa_load_model_rdas() / .wa_load_fits_list():
    • Prefer mock_dir artifacts; load via temp env; pick sensible object (fit, model, etc.).
    • Legacy → v2 name mapping; special-case example.
  • .wa_require_pkgs_for_fits() collects deps from model classes and train$modelInfo$library; errors with install hint.
  • .wa_validate_import() - checks ID column for duplicates and character type

model_deps()

  • Reports required vs missing from Suggests + override options(writeAlizer.required_pkgs=).
  • Preserves version qualifiers in required; strips qualifiers for missing.
  • 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/invalid model with 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 find inst/extdata in 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
  • Writes matching varlists/fits into mock_dir; verifies prediction columns and mean-column rules.
  • rb_mod3all smoke test made offline-only with mocked varlists.

RB/COH import utilities tests

  • Coverage for:
    • import_rb() path with SEP=, + read.table(text=readLines()).
    • NaNNA in 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

30 Sep 16:49
e3add18

Choose a tag to compare

writeAlizer 1.6.5

  • Addresses CRAN policy for Internet resources:
    • Network access now fails gracefully with informative messages (no low-level download.file errors).
    • 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.

writeAlizer 1.6.4

23 Sep 19:02

Choose a tag to compare

writeAlizer 1.6.4 (2025-09-23)

CRAN policy & documentation improvements

  • Replaced writeAlizer:::wa_seed_example_models() with writeAlizer::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>).

writeAlizer 1.6.3

17 Sep 22:58

Choose a tag to compare

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: @return added to import_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 in tempdir() with cleanup.
  • File I/O: no writes to home by default; examples/tests use tempdir(); caching standardized via tools::R_user_dir("writeAlizer","cache").
  • New helpers: wa_cache_dir() and wa_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 withr fixtures; 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

14 Sep 22:44

Choose a tag to compare

implifies install_model_deps():

  • Remove unused model argument.
  • Standardize on the option hook: options(writeAlizer.require_pkgs_for_fits = function() ...).
  • Collapse discovery to a single utils::packageDescription(..., fields = "Suggests") path.
  • dry_run = TRUE now 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() and utils::install.packages() to verify missing-package handling.
  • All tests pass locally with devtools::test().

Notes

  • Version set to 1.6.2 in DESCRIPTION. (Optional Date: field set to YYYY-MM-DD if present.)
  • NEWS.md updated with a concise entry.

writeAlizer 1.6.1

13 Sep 00:24
45a201d

Choose a tag to compare

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.file chatter 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

12 Sep 15:32

Choose a tag to compare

  • Replaced the ReaderBench mod3 models with their v2 counterparts (e.g., rb_mod3all now calls the rb_mod3all_v2 models).
  • 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 column pred_<model>_mean (where applicable).
  • import_rb() now keeps ReaderBench features by name using the packaged sample_rb.csv header (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).