Context
While following up on PR #22, the CI-equivalent non-notebook/non-Pyomo test subset originally reported 2064 warnings. PR #22 now filters the expected test warnings narrowly in pytest.ini, so the test run is clean again.
The warnings came from legacy edge-case tests that intentionally exercise infeasible or no-sublimation paths:
- repeated
No sublimation... UserWarnings from lyopronto.calc_unknownRp
Total shelf temperature setpoint time exceeded... from lyopronto.calc_unknownRp
- infeasible design-space warnings from
lyopronto.design_space
- pressure/shelf-temperature infeasibility warnings from
lyopronto.calc_knownRp
- optimization failure and incomplete-drying warnings from
lyopronto.opt_Pch
- a small number of
RuntimeWarning: divide by zero encountered in scalar divide from lyopronto.functions.Rp_finder
Why this should be separate from PR #22
The warning flood is test noise, but the underlying code behavior is broader than benchmark validation/timeouts. In particular, Rp_finder has a singular denominator when Tbot == T_sub; the current downstream behavior appears tolerated by tests, but changing it should be reviewed against physical/numerical expectations.
Suggested Work
- Decide whether these conditions should use custom warning categories rather than plain
UserWarning.
- Audit
Rp_finder behavior for Tbot == T_sub and document or handle the singular resistance case explicitly.
- Consider adding a verbosity or diagnostics option for calculators that can emit per-time-step warnings.
- Replace broad coverage-test warning filters with
pytest.warns at specific call sites where practical.
Acceptance Criteria
- Expected infeasible/no-sublimation scenarios are still visible to users when appropriate.
- Tests do not emit large warning counts during normal CI runs.
- Any singular resistance behavior is documented and covered by focused tests.
Context
While following up on PR #22, the CI-equivalent non-notebook/non-Pyomo test subset originally reported 2064 warnings. PR #22 now filters the expected test warnings narrowly in
pytest.ini, so the test run is clean again.The warnings came from legacy edge-case tests that intentionally exercise infeasible or no-sublimation paths:
No sublimation...UserWarnings fromlyopronto.calc_unknownRpTotal shelf temperature setpoint time exceeded...fromlyopronto.calc_unknownRplyopronto.design_spacelyopronto.calc_knownRplyopronto.opt_PchRuntimeWarning: divide by zero encountered in scalar dividefromlyopronto.functions.Rp_finderWhy this should be separate from PR #22
The warning flood is test noise, but the underlying code behavior is broader than benchmark validation/timeouts. In particular,
Rp_finderhas a singular denominator whenTbot == T_sub; the current downstream behavior appears tolerated by tests, but changing it should be reviewed against physical/numerical expectations.Suggested Work
UserWarning.Rp_finderbehavior forTbot == T_suband document or handle the singular resistance case explicitly.pytest.warnsat specific call sites where practical.Acceptance Criteria