pertpy icon indicating copy to clipboard operation
pertpy copied to clipboard

add (optional) `rpy2` dependency for `milo`

Open mschilli87 opened this issue 2 months ago • 3 comments

PR Checklist

  • [x] Referenced issue is linked
  • [ ] If you've fixed a bug or added code that should be tested, add tests!
  • [ ] Documentation in docs is updated

Description of changes

The da_nhoods function of pertpy's milo implementation defaults to solver=edger which in turn requires rpy2 (and the edgeR R package) as a dependency not listed so far in pyproject.toml.

Technical details

This commit addresses this by adding the [milo] target with that optional dependency.

Additional context

fixes issue #873

mschilli87 avatar Nov 03 '25 09:11 mschilli87

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 72.01%. Comparing base (12897e1) to head (2656296). :warning: Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #874      +/-   ##
==========================================
- Coverage   73.54%   72.01%   -1.54%     
==========================================
  Files          48       48              
  Lines        5613     5613              
==========================================
- Hits         4128     4042      -86     
- Misses       1485     1571      +86     
Files with missing lines Coverage Δ
pertpy/tools/_milo.py 63.39% <ø> (-17.27%) :arrow_down:

... and 6 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Nov 03 '25 09:11 codecov-commenter

I'll have a look at this next week, sorry.

Zethson avatar Nov 09 '25 21:11 Zethson

No worries. This is hardly a priority. :wink:

mschilli87 avatar Nov 10 '25 07:11 mschilli87

Eieiei this PR is still open. I'll finalize and merge this in about 10 days. Sorry!

Zethson avatar Dec 02 '25 10:12 Zethson

Like I said: No rush. This is more to make it easier for people new to pertpy that install via pip/conda and then try running the milo example.

mschilli87 avatar Dec 02 '25 11:12 mschilli87

https://github.com/scverse/pertpy/pull/874/commits/8bc7e4e79a70aef5d3fa4d6393fe043b6bca16e6

like this or?

Zethson avatar Dec 05 '25 12:12 Zethson

LGTM but two test are failing. The first one looks like an unrelated network/upstream related issue. The second one concerns milo. Maybe an API change?

mschilli87 avatar Dec 05 '25 13:12 mschilli87

I'm looking into it. I changed the default from pydeseq2 but we're passing 'edger' explicitly as solver there. I'll figure it out and merge then.

Zethson avatar Dec 05 '25 14:12 Zethson