earthobservations / wetterdienst

Open weather data for humans.
https://wetterdienst.readthedocs.io/
MIT License
350 stars 54 forks source link

Upgrade dependencies issues #1344

Open guidocioni opened 1 month ago

guidocioni commented 1 month ago

Hey guys :)

I get another weird environment issue and I cannot narrow down the dependency causing it. Today I was trying to install xclim in my environment and, for some reason, conda wants me to downgrade to wetterdienst 0.49.0.

Can you see what is the reason of the conflict? I got lost in all the updates: is pandas still allowed as an optional dependency?

Pinned packages:
  - python 3.12.*

  Updating specs:
   - xclim
   - ca-certificates
   - certifi
   - openssl

  Package               Version  Build            Channel           Size
──────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────

  + regex             2024.7.24  py312hbd25219_0  conda-forge      367kB
  + tzlocal                 5.2  py312hb401068_0  conda-forge       41kB
  + h3-py                 3.7.7  py312hede676d_0  conda-forge      335kB
  + libllvm14            14.0.6  hc8e404f_4       conda-forge       22MB
  + timezonefinder        6.5.2  py312hbd25219_0  conda-forge       40MB
  + llvmlite             0.43.0  py312hdeb90da_0  conda-forge      373kB
  + numba                0.60.0  py312hc3b515d_0  conda-forge        6MB
  + requests-ftp          0.3.1  py_1             conda-forge       11kB
  + boltons              24.0.0  pyhd8ed1ab_0     conda-forge     Cached
  + cf_xarray             0.9.4  pyhd8ed1ab_0     conda-forge       59kB
  + filelock             3.15.4  pyhd8ed1ab_0     conda-forge       18kB
  + jsonpickle            3.2.2  pyhd8ed1ab_0     conda-forge       40kB
  + yamale                5.2.1  pyhca7485f_0     conda-forge       46kB
  + appdirs               1.4.4  pyh9f0ad1d_0     conda-forge       13kB
  + pypdf2               2.11.1  pyhd8ed1ab_0     conda-forge      179kB
  + dataclass-wizard     0.22.3  pyhd8ed1ab_0     conda-forge       74kB
  + dateparser            1.2.0  pyhd8ed1ab_0     conda-forge      173kB
  + xclim                0.52.0  pyhd8ed1ab_0     conda-forge      717kB

  Upgrade:
──────────────────────────────────────────────────────────────────────────

  - pandas                2.1.4  py312haf8ecfc_0  conda-forge     Cached
  + pandas                2.2.2  py312h1171441_1  conda-forge       15MB

  Downgrade:
──────────────────────────────────────────────────────────────────────────

  - wetterdienst         0.94.0  pyhd8ed1ab_0     conda-forge     Cached
  + wetterdienst         0.49.0  pyhd8ed1ab_0     conda-forge      139kB

  Summary:

  Install: 18 packages
  Upgrade: 1 packages
  Downgrade: 1 packages

  Total download: 86MB
guidocioni commented 1 month ago
The following packages are incompatible
├─ wetterdienst 0.94.0**  is installable and it requires
│  └─ pandas >=2,<2.2 , which can be installed;
└─ xclim 0.52.0  is installable and it requires
   └─ pandas >=2.2.0  with the potential options
      ├─ pandas [2.2.0|2.2.1|2.2.2] would require
      │  └─ python >=3.10,<3.11.0a0 , which can be installed;
      ├─ pandas [2.2.0|2.2.1|2.2.2] would require
      │  └─ python >=3.11,<3.12.0a0 , which can be installed;
      ├─ pandas [2.2.0|2.2.1|2.2.2] conflicts with any installable versions previously reported;
      └─ pandas [2.2.0|2.2.1|2.2.2] would require
guidocioni commented 1 month ago

Every time I think about dependencies management I feel so stupid... Isn't wetterdienst requiring pandas >=2,<2.3 ?

https://github.com/earthobservations/wetterdienst/blob/83624f92f96f52c96ffcd985db55d3f09a0025a1/pyproject.toml#L124

I think the problem stems from the fact that 2.2 is not the same as 2.2.0.

gutzbenj commented 1 month ago

I'll bump several upper bounds in another PR that should resolve the issue. Look at the last two messages, I believe pandas needs <3.0

gutzbenj commented 2 weeks ago

Dear @guidocioni ,

I removed upper dependency bounds with the new version. Did you try with the new version?

guidocioni commented 2 weeks ago

I just tried to

mamba create --name=test python wetterdienst xclim

and I get

  + wetterdienst                            0.95.0  pyhd8ed1ab_0         conda-forge      146kB
  + xclim                                   0.37.0  pyhd8ed1ab_0         conda-forge      477kB

So I think there's still some issue?

gutzbenj commented 2 weeks ago

wetterdienst 0.95.0 (latest) sounds good, doesn't it? Or would you expected another version?

guidocioni commented 2 weeks ago

wetterdienst 0.95.0 (latest) sounds good, doesn't it? Or would you expected another version?

yes but xclim is still constrained to an old version (0.37 instead than 0.52) so there is still some dependency issue..I haven't had time do dig into it deeper until now

gutzbenj commented 2 weeks ago

Can't really reproduce. I could without a problem add xclim==0.52.0 to requirements via uv