Repository navigation
Description
import screenpro loads plotting/pheno_plots.py, which imports plotnine at module level, but plotnine is only listed in environment.yml, not in pyproject.toml. A fresh install of dev at 94554fc:
uv venv -p 3.11 env
uv pip install -p env/bin/python "git+https://github.com/FunGI-cap/ScreenPro2.git@dev"
env/bin/python -c "import screenpro"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File ".../site-packages/screenpro/__init__.py", line 25, in <module>
from . import assays
File ".../site-packages/screenpro/assays/__init__.py", line 23, in <module>
from ..plotting import volcano_plot
File ".../site-packages/screenpro/plotting/__init__.py", line 9, in <module>
from .pheno_plots import volcano_plot
File ".../site-packages/screenpro/plotting/pheno_plots.py", line 3, in <module>
import plotnine as p9
ModuleNotFoundError: No module named 'plotnine'
In the same setup, ArcInstitute/ScreenPro2 main (2347611) imports and passes its 4 tests; dev has 28.
Declaring plotnine is not enough under dev's current caps. With pandas<2 and matplotlib<3.7 the resolver picks plotnine 0.12.4, and two tests fail with ValueError: Invalid RGBA argument: 'sensitivity_hit':
test_drawVolcano_keeps_controls_and_colors_hits_despite_nan_in_other_columnstest_drawVolcano_labels_only_significant_hits_and_warns
With pandas 2.3.3 the picture is the same: plotnine 0.12.4, 0.13.6 and 0.14.6 fail those two, while 0.15.0 and 0.15.9 pass all 28. plotnine 0.15 needs Python 3.10+, pandas 2.2+ and matplotlib 3.8+, which the bounds in ArcInstitute#116 allow; ArcInstitute#116 also moves the Python floor to 3.10. Dev with ArcInstitute#116 merged in plus plotnine = ">=0.15" installs fresh and passes 28 of 28 (pandas 2.3.3, plotnine 0.15.9). Without ArcInstitute#116 the same line makes the install unsatisfiable, with the resolver pointing at the pandas<2.0 cap. environment.yml has the same pandas and matplotlib caps, so by plotnine's published requirements it cannot get 0.15 either.
CI will not catch this before dev is opened against main: the workflow triggers on pushes and pull requests to main only. The test step added in ArcInstitute#115 (merged) installs with plain pip install ., so it will fail on that pull request until plotnine is declared.
Once ArcInstitute#116 is in, the fix is that one pyproject.toml line, and I can send it as a PR against dev.
Activity
abearab commentedon Nov 29, 2026
@crtag I think avoiding plotnine added as a dependency is a better idea. It would be nice if a user starts to use plotting function then manually installing plotnine makes more sense. Same should be true with biobear... I think these are packages imported only for some functions which might not be a general dependency and avoiding all those in a initial install command can be helpful for faster and easier install across platforms. What do you think?