cobrawap icon indicating copy to clipboard operation
cobrawap copied to clipboard

Upper limit for PuLP version < 2.8.0 seems to be required

Open cosimolupo opened this issue 1 year ago • 2 comments

PROBLEM

When installing cobrawap via PyPI, the "undirect" PuLP dependency (i.e. not explicitly listed in the pyproject.toml file, but required by other listed dependencies) is not upper-bounded for what regards its versioning, and hence the latest version compatible with other packages is installed. As of today, the 2.9.0 version is retrieved and installed.

Unfortunately, when executing Cobrawap with Snakemake workflow manager, the following error occurs:

Traceback (most recent call last): File "/path/to/working_dir/env_cobrawap/bin/snakemake", line 8, in <module> sys.exit(main()) File "/path/to/working_dir/env_cobrawap/lib/python3.9/site-packages/snakemake/init.py", line 2736, in main parser = get_argument_parser() File "/path/to/working_dir/env_cobrawap/lib/python3.9/site-packages/snakemake/init.py", line 1607, in get_argument_parser lp_solvers = pulp.list_solvers(onlyAvailable=True) AttributeError: module 'pulp' has no attribute 'list_solvers'

The installed version of Snakemake is 7.32.4, as the versioning upper bound <8.0.0 is explicitly set.

PROPOSED SOLUTION

Manually downgrading PuLP to <2.8.0 solves the issue. Hence, a possible fix could to explicitly list PuLP dependency in the pyproject.toml file, and upper-bound its version to 2.7.x. When an upgrade of Snakemake version will be available (see also issue #57), then also the range allowed versions for PuLP can be reconsidered.

cosimolupo avatar Dec 03 '24 14:12 cosimolupo

For reference, the corresponding issue in snakemake: https://github.com/snakemake/snakemake/issues/2607

rgutzen avatar Dec 03 '24 15:12 rgutzen

@rgutzen, indeed I found it, but forgot to link here. Thanks, it's useful to have it here.

cosimolupo avatar Dec 03 '24 15:12 cosimolupo