Skip to content

EventStudy 0.66.0 — API Stabilization & CRAN Resubmission

Latest

Choose a tag to compare

@sipemu sipemu released this 18 Sep 19:59
· 42 commits to main since this release

EventStudy 0.66.0

API Stabilization & Deprecation Lifecycle (Phase 28)

This release completes a signature-consistency audit of the full public API and
wires a formal deprecation lifecycle (base .Deprecated() + optional
lifecycle shim). All deprecated argument names continue to work and emit
exactly one deprecation warning pointing to the replacement.

Renamed Arguments (deprecated old names still work)

  • plot_stocks(): do_sample is deprecated in favour of sample_symbols
    (#APIS-01). The new name is noun-first, consistent with the sibling parameter
    max_symbols. Pass the old name and you receive one deprecation warning; the
    result is identical. (#APIS-04)

Deprecation Infrastructure

  • New internal helper .deprecate_arg() in R/deprecation.R. Always calls
    base .Deprecated() unconditionally; additionally calls
    lifecycle::deprecate_warn() when lifecycle is installed (Suggests-only,
    never a hard dependency). (#APIS-04)

Return-Shape Contracts (opt-in, default-off)

  • New R/shape_contracts.R provides an opt-in return-shape contract for the
    pipeline's result tibbles. Enable with
    options(EventStudy.shape_contracts = TRUE). When enabled, the pipeline
    checks that the column names and types of the single-event statistics tibbles
    (ART, CART) and the multi-event AAR/CAAR tibble (CSectT) match the
    canonical expected shapes. On any mismatch exactly one warning() is
    emitted naming the context and the specific drift; the contract never calls
    stop(). Correctly-shaped is_fitted = FALSE degenerate outputs (same
    column names, NA-propagated values) are treated as valid shapes and produce
    no warning. The option defaults to FALSE so valid-input behaviour and the
    existing test suite are completely unaffected. (#APIS-02)

Install-Tested Multi-OS CI (Phase 29)

  • The GitHub Actions workflow now runs rcmdcheck against the installed
    package (not load_all) across multiple operating systems, catching
    install-vs-load_all divergence in NAMESPACE/imports before it reaches CRAN.
  • A dedicated CI leg runs with _R_CHECK_FORCE_SUGGESTS_ forced on, exercising
    every optional-Suggests code path so the requireNamespace() guards are
    verified end-to-end.
  • report_table() is now an exported function; the public API snapshot accepts
    it.
  • Vignette and example audits confirm no default network access and no writes
    outside tempdir().

CRAN Resubmission Preparation (Phase 30)

  • DESCRIPTION version bumped to 0.66.0 in preparation for CRAN resubmission
    (the package was archived on 2024-04-20; v0.66.0 is a complete ground-up
    rewrite).
  • CRAN example-policy compliance: the six data-dependent / slow-but-safe
    examples (es_report, generate_report, run_event_study, recommend_stat,
    flag_robustness, nonparametric_intraday_test) were converted from
    \dontrun{} to \donttest{} and made self-contained (bundled dieselgate
    data, tempdir()-only output). Only the genuine network + credentials
    provider examples remain \dontrun{}.
  • R CMD check --as-cran on the built source tarball is clean (0 errors,
    0 warnings; the only NOTE is the expected archived-package incoming-feasibility
    acknowledgement), and win-builder R-devel / R-release checks were dispatched.