You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous sims_at_observed I() wrap (commit 41a2f95) closed only
one third of the bug class. The same auto_unbox-without-I() collapse
hits ``t_observed`` and ``observed_dv`` on n_obs == 1 subjects:
``jsonlite::toJSON(..., auto_unbox = TRUE)`` of a length-1 numeric
vector yields a JSON scalar (``57.5``) rather than a length-1 array
(``[57.5]``), and ``PredictedSimulationsSubject.t_observed:
list[float]`` rejects the float with ``Input should be a valid list``.
Surfaces on every n_obs == 1 subject in pheno_sd; aborts the entire
fixture before any per-fold scorecard is produced.
Two-layer fix (symmetric with the existing sims_at_observed wire)
-----------------------------------------------------------------
- **R-side primary** (r/harness.R): wrap ``t_observed = I(t_obs)``
and ``observed_dv = I(dv_obs)`` in ``.simulate_posterior_predictive``
so jsonlite preserves array shape under auto_unbox = TRUE.
- **Pydantic-side defence in depth** (backends/r_schemas.py): a new
``field_validator("t_observed", "observed_dv", mode="before")``
coerces a bare scalar to ``[float(v)]`` so a future R-side
regression fails the harness pin (see below) instead of the
Phase-1 weekly run.
Tests
-----
2 new pins in ``TestPredictedSimulations1DCoercion``:
- ``test_harness_uses_I_wrap_for_sparse_subjects`` extended to also
pin ``t_observed = I(t_obs)`` and ``observed_dv = I(dv_obs)``
substrings in r/harness.R.
- ``test_scalar_t_observed_is_coerced_to_list`` exercises the full
n_obs == 1 auto_unbox-without-I() shape (bare floats for both
obs vectors + flat list for sims) and asserts all three coerce.
Bundled changes (unrelated, were already in the working tree)
-------------------------------------------------------------
- README, CHANGELOG, docs (ARCHITECTURE, FORMULAR, suite_a/c READMEs,
src/r README): documentation drift cleanup that landed alongside.
- src/apmode/cli.py, bundle/models.py, dsl/stan_emitter.py: ruff /
formatting touch-ups.
- tests/unit/test_deep_inspect.py: matching test updates.
Lint + tests
------------
``ruff check`` + ``ruff format`` clean across src/ + tests/.
``mypy --strict`` clean over 136 source files. Full non-live sweep:
2551 passed, 4 skipped, 17 deselected, 15 warnings in 135 s.
|`theophylline_boeckmann_1992`| oral | 1-cmt + FO ka |[10.1002/psp4.12471](https://doi.org/10.1002/psp4.12471) (Schoemaker et al. 2019, nlmixr SAEM/FOCEI grid which contains the Theoph fit) |
18
18
|`warfarin_funaki_2018`| oral | 1-cmt + lagged-FO ka |[10.1002/psp4.12445](https://doi.org/10.1002/psp4.12445) (Fidler et al. 2019, nlmixr documentation including Holford warfarin) |
19
-
|`mavoglurant_wendling_2015`| oral | 2-cmt + FO ka |[10.1007/s11095-014-1574-1](https://doi.org/10.1007/s11095-014-1574-1) (Wendling et al. 2015, mavoglurant population PK; APMODE uses the simpler 2-cmt approximation since the published sum-of-inverse-Gaussian input function is outside DSL scope) |
|`mavoglurant_wendling_2015`| oral | 2-cmt + FO ka |[10.1007/s11095-014-1574-1](https://doi.org/10.1007/s11095-014-1574-1) (Wendling et al. 2015, mavoglurant population PK; the Phase-1 fixture uses the simpler 2-cmt approximation, while SumIG absorption remains a v0.7 preview path) |
0 commit comments