-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Part of #315 (cross-version deserialization, RFC 0002).
Two categories of tests, in both R (test/R/testthat/) and Python (test/python/):
1. Snapshot tests
Serialize a BART and BCF model (covering: RFX, adaptive coding, variance forest, internal propensity) under the current version and save the JSON as a checked-in fixture. Future test runs load the fixture and assert deserialization succeeds — preventing silent regressions when the schema changes.
2. Backward-compat tests
Construct minimal "old-format" JSON strings with specific fields deliberately omitted (mirroring the version brackets in #318) and assert that:
- Deserialization succeeds (no error)
- The correct default value is applied
- The expected warning is emitted (use
expect_warning/pytest.warns)
Fields to cover at minimum:
- Missing
outcome/link(pre-v0.4.1 format) - Missing
multivariate_treatment(pre-v0.4.0 Python BCF) - Missing
internal_propensity_model(pre-v0.3.2) - Missing
rfx_model_specwithhas_rfx = TRUE(should warn) - Missing
covariate_preprocessor/preprocessor_metadata(should warn)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels