j-brady / peakipy

Interactive NMR peak deconvolution
https://j-brady.github.io/peakipy
GNU General Public License v3.0
15 stars 3 forks source link

Potential dependency conflicts between peakipy and pandas #2

Closed NeolithEra closed 12 months ago

NeolithEra commented 4 years ago

Hi, as shown in the following full dependency graph of peakipy, peakipy requires pandas >=0.24.0,<0.25.0, numdifftools requires statsmodels >=0.6 (statsmodels 0.11.1 will be installed, i.e., the newest version satisfying the version constraint), and directed dependency statsmodels 0.11.1 transitively introduces pandas >=0.21.

Obviously, there are multiple version constraints set for pandas in this project. However, according to pip's “first found wins” installation strategy, pandas 0.24.2 (i.e., the newest version satisfying constraint >=0.24.0,<0.25.0) is the actually installed version.

Although the first found package version pandas 0.24.2 just satisfies the later dependency constraint (pandas >=0.24.0,<0.25.0), such installed version is very close to the upper bound of the version constraint of pandas specified by statsmodels 0.11.1.

Once statsmodels upgrades,its newest version will be installed, as peakipy does not specify the upper bound of version constraint for statsmodels . Therefore, it will easily cause a dependency conflict (build failure), if the upgraded statsmodels version introduces a higher version of pandas, violating its another version constraint >=0.24.0,<0.25.0.

According to the release history of statsmodels , it habitually upgrates Pandas in its recent releases. For instance, statsmodels 0.10.0rc2 upgrated Pandas’s constraint from >=0.18 to >=0.19 ,statsmodels 0.11.0rc1 upgrated Pandas’s constraint from >=0.19 to >=0.21 and statsmodels next version upgrated Pandas’s constraint from >=0.21 to >=0.23.

As such, it is a warm warning of a potential dependency conflict issue for peakipy.

Dependency tree

peakipy - 0.1.29
| +- bokeh(install version:1.4.0 version range:>=1.0.4,<2.0.0)
| | +- jinja2(install version:2.11.2 version range:>=2.7)
| | | +- MarkupSafe(install version:2.0.0a1 version range:>=0.23)
| | +- pandas(install version:0.24.2 version range:>=1.7.1)
| | +- packaging(install version:20.3 version range:>=16.8)
| | +- pillow(install version:7.1.1 version range:>=4.0)
| | +- python-dateutil(install version:2.8.1 version range:>=2.1)
| | +- pyyaml(install version:5.3.1 version range:>=3.10)
| | +- six(install version:1.14.0 version range:>=1.5.2)
| | +- tornado(install version:6.0.4 version range:>=4.3)
| +- colorama(install version:0.4.3 version range:>=0.4.1,<0.5.0)
| +- docopt(install version:0.6.2 version range:>=0.6.2,<0.7.0)
| +- lmfit(install version:0.9.15 version range:>=0.9.12,<0.10.0)
| | +- asteval(install version:0.9.18 version range:>=0.9.16)
| | +- pandas(install version:0.24.2 version range:>=1.16)
| | +- scipy(install version:1.4.1 version range:>=1.2)
| | +- six(install version:1.14.0 version range:>=1.11)
| | +- uncertainties(install version:3.1.2 version range:>=3.0.1)
| +- matplotlib(install version:3.2.1 version range:>=3.0,<4.0)
| | +- cycler(install version:0.10.0 version range:>=0.10)
| | | +- six(install version:1.14.0 version range:*)
| | +- kiwisolver(install version:1.2.0 version range:>=1.0.1)
| | +- pandas(install version:0.24.2 version range:>=1.11)
| | +- pyparsing(install version:3.0.0a1 version range:>=2.0.1)
| | +- python-dateutil(install version:2.8.1 version range:>=2.1)
| +- nmrglue(install version:0.6 version range:>=0.6.0,<0.7.0)
| | +- pandas(install version:0.24.2 version range:*)
| | +- scipy(install version:1.4.1 version range:*)
| +- numba(install version:0.44.1 version range:>=0.44.1,<0.45.0)
| +- numdifftools(install version:0.9.39 version range:>=0.9.39,<0.10.0)
| | +- algopy(install version:0.5.7 version range:>=0.4)
| | +- pandas(install version:0.24.2 version range:>=1.9)
| | +- scipy(install version:1.4.1 version range:>=0.8)
| | +- statsmodels(install version:0.11.1 version range:>=0.6)
| | | +- pandas(install version:0.24.2 version range:>=1.14)
| | | +- pandas(install version:0.24.2 version range:>=0.21)
| | | +- patsy(install version:0.5.1 version range:>=0.5)
| | | | +- pandas(install version:0.24.2 version range:>=1.4)
| | | | +- six(install version:1.14.0 version range:*)
| | | +- scipy(install version:1.4.1 version range:>=1.0)
| +- pandas(install version:0.24.2 version range:>=0.24.0,<0.25.0)
| +- pandas(install version:0.24.2 version range:>=0.24.0,<0.25.0)
| +- PyYAML(install version:5.3.1 version range:>=5.1,<6.0)
| +- schema(install version:0.7.2 version range:>=0.7.0,<0.8.0)
| | +- contextlib2(install version:0.6.0.post1 version range:>=0.5.5)
| +- scikit-image(install version:0.14.5 version range:>=0.14.2,<0.15.0)
| +- scipy(install version:1.4.1 version range:>=1.2,<2.0)
| +- tabulate(install version:0.8.7 version range:>=0.8.3,<0.9.0)

Thanks for your help. Best, Neolith

NeolithEra commented 4 years ago

Suggested Solution

  1. Loosen the version range of pandas to be >=0.24.0.
  2. Remove your direct dependency pandas, and use the pandas transitively introduced by statsmodels . @ j-brady Which solution do you prefer, 1 or 2? Please let me know your choice. May I pull a request to solve this issue?
j-brady commented 4 years ago

Hi there, thanks for the info. I'm not sure what the best solution is but probably no. 1.