Skip to content

Release v0.4.0 - #34

Merged
DougManuel merged 44 commits into
mainfrom
dev
Jun 10, 2026
Merged

Release v0.4.0#34
DougManuel merged 44 commits into
mainfrom
dev

Conversation

@DougManuel

Copy link
Copy Markdown
Collaborator

Summary

Merges the v0.4.0 release from dev to main. DESCRIPTION already carries Version 0.4.0 on dev; this PR adds the final release prep (README status line updated from "release candidate" to "release", NEWS heading dated, Development section retitled New features).

Highlights since v0.3.0 (full details in NEWS.md):

  • mock_spec architecture: direct specification helpers, recodeflow metadata adapter, native generation, optional simstudy backend, post-processing diagnostics
  • Code-quality pass (PR Code-quality fixes: dedupe loaders and dispatch, loud failure modes, runnable examples #32): dplyr dropped from Imports, deduplicated metadata loading and dispatch, generators stop on missing variables (breaking, NEWS-documented), runnable roxygen examples, accurate skip tracking
  • Divio-style documentation set for the v0.4 workflow

State of the branch

After merging

Suggest tagging the merge commit as v0.4.0.

DougManuel added 30 commits May 18, 2026 06:52
Copilot AI review requested due to automatic review settings June 10, 2026 15:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Merges the v0.4.0 release work into main, introducing the v0.4 mock_spec architecture (adapters, native generation, post-processing diagnostics, optional simstudy backend), updating package metadata (version/NEWS), and adding Divio-style v0.4 documentation and expanded test coverage.

Changes:

  • Adds the v0.4 mock_spec pipeline: recodeflow adapter, native backend generation, post-processing with diagnostics, and an optional simstudy baseline backend.
  • Expands/updates test coverage to characterize v0.4 behavior, legacy fallback behavior, and metadata loading from file paths.
  • Updates release/docs surface: README, NEWS, pkgdown config, new v0.4 vignettes, and DESCRIPTION/NAMESPACE exports.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
vignettes/recodeflow-metadata-v04.qmd New v0.4 how-to for recodeflow metadata → mock_spec → generation + diagnostics.
vignettes/migrating-from-v03-v04.qmd New migration how-to covering routing/fallback and seed/diagnostics differences.
vignettes/getting-started-v04.qmd New v0.4 tutorial for direct mock_spec workflow and wrapper usage.
vignettes/diagnostics-and-garbage-v04.qmd New how-to for reading mockdata_diagnostics and garbage/missing semantics.
vignettes/design-philosophy-v04.qmd New explanation vignette describing v0.4 design goals and scope boundaries.
vignettes/choosing-a-backend-v04.qmd New how-to comparing native vs optional simstudy backend usage.
tests/testthat/test-survival-data.R Adds regression coverage for CSV-path inputs and error propagation in survival wrapper.
tests/testthat/test-simstudy-backend.R Adds simstudy backend tests (unavailable path, contracts, routing, reproducibility).
tests/testthat/test-rtype-coercion.R Adds characterization tests for legacy dispatch rType routing and defaults.
tests/testthat/test-recodeflow-mock-spec.R Adds tests for recodeflow adapter correctness, filtering, and validation behavior.
tests/testthat/test-native-backend.R Adds tests for native backend contracts, reproducibility, and unsupported features.
tests/testthat/test-mock-spec.R Adds tests for spec construction/validation behavior and print method.
tests/testthat/test-mock-spec-postprocess.R Adds tests for post-processing semantics and diagnostics invariants.
tests/testthat/test-mock-spec-pipeline.R Adds end-to-end pipeline tests (baseline + postprocess) including parity checks.
tests/testthat/test-load-metadata.R Adds tests for .load_metadata_df() behavior and error messaging.
tests/testthat/test-direct-mock-api.R Adds tests for direct mock_*() APIs and equivalence with explicit constructors.
tests/testthat/test-critical-regressions.R Adds regression tests for stricter generator errors, duplicate-row warnings, and skip summaries.
tests/testthat/test-create-mock-data-v04.R Adds tests ensuring create_mock_data() routes to v0.4 pipeline and falls back correctly.
README.md Updates version/status and adds a v0.4 direct API example + vignette link.
R/mockdata_helpers.R Removes dplyr dependency from rType defaulting logic.
R/mock_spec_simstudy.R Introduces optional simstudy baseline generation backend for supported spec pieces.
R/mock_spec_recodeflow.R Introduces recodeflow metadata → mock_spec adapter and related helpers.
R/mock_spec_postprocess.R Introduces post-processing layer applying missing/garbage with diagnostics.
R/mock_spec_native.R Introduces native baseline generator with strict scope validation and RNG isolation.
R/load_metadata.R Adds .load_metadata_df() helper to standardize legacy metadata loading and messages.
R/create_wide_survival_data.R Extends survival wrapper to accept CSV paths via .load_metadata_df() and updates docs/errors.
R/create_mock_data.R Adds v0.4 pipeline attempt + legacy fallback logic; refactors legacy dispatch to a generator map; enhances skip summary.
R/create_date_var.R Uses .load_metadata_df(), strengthens missing-variable handling, improves duplicate-row messaging.
R/create_con_var.R Uses .load_metadata_df(), strengthens missing-variable handling, improves duplicate-row messaging.
R/create_cat_var.R Uses .load_metadata_df(), strengthens missing-variable handling, improves duplicate-row messaging.
R/add_garbage.R Updates examples to be runnable/self-contained and avoids \dontrun where feasible.
NEWS.md Adds v0.4.0 release notes (breaking changes + new v0.4 features).
NAMESPACE Exports v0.4 APIs and registers S3 print method for spec validation results.
development/v04-simstudy-spike/README.md Removes spike README (development-only artifact).
development/v04-phase-c-comms-note.md Adds maintainer communication note for Phase C testing.
development/v04-documentation-sprint.md Adds documentation sprint summary/checklist.
development/simstudy-v04.md Adds/retains historical v0.4 production refactor plan context.
development/adr/v04-hybrid-backend.md Adds ADR documenting the hybrid backend decision and constraints.
DESCRIPTION Bumps version to 0.4.0; adjusts dependencies (drops dplyr from Imports; adds simstudy to Suggests).
_pkgdown.yml Adds v0.4 reference sections and includes new v0.4 vignettes in site navigation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/mock_spec_recodeflow.R
Comment on lines +16 to +28
if (is.character(x) && length(x) == 1) {
if (!file.exists(x)) {
stop(label, " file does not exist: ", x, call. = FALSE)
}
# Pin CSV parsing so path inputs behave like data-frame inputs for the
# recodeflow conventions MockData understands.
return(read.csv(
x,
stringsAsFactors = FALSE,
check.names = FALSE,
na.strings = c("", "NA")
))
}
Comment on lines +29 to +33
if (!is.null(package_root)) {
devtools::load_all(package_root, quiet = TRUE)
} else {
library(MockData)
}
Comment on lines +29 to +33
if (!is.null(package_root)) {
devtools::load_all(package_root, quiet = TRUE)
} else {
library(MockData)
}
Comment on lines +29 to +33
if (!is.null(package_root)) {
devtools::load_all(package_root, quiet = TRUE)
} else {
library(MockData)
}
Comment on lines +29 to +33
if (!is.null(package_root)) {
devtools::load_all(package_root, quiet = TRUE)
} else {
library(MockData)
}
Comment on lines +29 to +33
if (!is.null(package_root)) {
devtools::load_all(package_root, quiet = TRUE)
} else {
library(MockData)
}
Comment on lines +29 to +33
if (!is.null(package_root)) {
devtools::load_all(package_root, quiet = TRUE)
} else {
library(MockData)
}
@DougManuel
DougManuel merged commit a4d5302 into main Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants