Skip to content

fix: resolve test-suite warnings#1018

Merged
Zethson merged 4 commits into
mainfrom
fix/test-suite-warnings
Jun 11, 2026
Merged

fix: resolve test-suite warnings#1018
Zethson merged 4 commits into
mainfrom
fix/test-suite-warnings

Conversation

@Zethson

@Zethson Zethson commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Cleans up the warnings emitted while running the test suite. Running pytest on main produced 329 warnings; with this change the runnable subset produces 0. No library behavior changes.

Fixed at the source

  • Augur logistic regression no longer passes the penalty argument that scikit-learn 1.8 deprecated (FutureWarning, removal in 1.10). The L1/L2 mix is now expressed with l1_ratio and the unregularized case with C:
    • l2l1_ratio=0.0 (verified to produce identical coefficients to the old default, default lbfgs solver, works across the supported sklearn range)
    • l1l1_ratio=1.0, elasticnetl1_ratio=0.5 (both with the saga solver)
    • none/NoneC=np.inf
  • statsmodels DGE test sets the negative-binomial alpha=1.0 explicitly — the previous implicit default — removing the ValueWarning raised when the parametrization is collected.
  • Perturbation-space test wraps the intentional ensure_consistency=False add/subtract calls in pytest.warns(UserWarning, ...), which both silences the leaked warning and asserts the warning is actually raised.

Filtered as unavoidable third-party noise

Added to the existing filterwarnings list in pyproject.toml (same pattern already used for ~15 other dependency warnings):

  • pydeseq2 "dispersion trend curve fitting did not converge" and "residual degrees of freedom is less than 3" — emitted on the small synthetic data the Milo and compare_groups tests use (this was ~310 of the 329 warnings).
  • jaxopt "no longer maintained" deprecation notice.
  • joblib loky "A worker stopped while some jobs were given to the executor" notice.
  • formulaic DataMismatchWarning from no-intercept contrast handling in the DGE base tests.

Notes

  • The sklearn penalty deprecation was fixed in code rather than filtered, since it originates from pertpy's own call.
  • 10 failures / 106 errors seen locally are pre-existing network-blocked dataset downloads in this sandbox and are unrelated to this change.

🤖 Generated with Claude Code

Clean up the warnings emitted while running the test suite, without changing any behavior.

Fixed at the source:
- Augur logistic regression no longer passes the `penalty` argument that scikit-learn 1.8 deprecated; the L1/L2 mix is now expressed via `l1_ratio` (l2 -> 0.0, identical coefficients to the old default) and the unregularized case via `C=np.inf`, with `saga` for the L1 paths.
- The statsmodels DGE test sets the negative-binomial `alpha=1.0` explicitly (the previous implicit default), removing the dispersion warning raised at collection time.
- The perturbation-space test wraps the intentional `ensure_consistency=False` calls in `pytest.warns`, asserting the expected UserWarning instead of letting it leak into the summary.

Filtered as unavoidable third-party noise (consistent with the existing filterwarnings entries):
- pydeseq2 dispersion-trend / residual-degrees-of-freedom warnings on the small synthetic data used by the Milo and compare_groups tests.
- jaxopt maintenance notice, joblib loky worker notice, and the formulaic DataMismatchWarning from no-intercept contrast handling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Jun 10, 2026
pre-commit-ci Bot and others added 3 commits June 10, 2026 15:12
Points the tutorials submodule at scverse/pertpy-tutorials#65, which
speeds up the miloDE section of the Milo notebook to run in well under
15 minutes (it had regressed to ~90 minutes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
scverse/pertpy-tutorials#65 is merged; point the submodule at the
squashed commit on tutorials main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Zethson Zethson merged commit 6695bc5 into main Jun 11, 2026
16 of 19 checks passed
@Zethson Zethson deleted the fix/test-suite-warnings branch June 11, 2026 07:53
@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.80%. Comparing base (5fa8ed7) to head (113563d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pertpy/tools/_augur.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1018      +/-   ##
==========================================
- Coverage   77.81%   77.80%   -0.01%     
==========================================
  Files          50       50              
  Lines        6580     6584       +4     
==========================================
+ Hits         5120     5123       +3     
- Misses       1460     1461       +1     
Files with missing lines Coverage Δ
pertpy/tools/_augur.py 89.64% <80.00%> (-0.22%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants