conda-forge / xarray-feedstock

A conda-smithy repository for xarray.
BSD 3-Clause "New" or "Revised" License
5 stars 13 forks source link

Add run_constrained #84

Closed dcherian closed 1 year ago

dcherian commented 1 year ago

From https://github.com/pydata/xarray/blob/main/ci/requirements/min-all-deps.yml with only netcdf4, h5netcdf, zarr backends specified.

Closes https://github.com/pydata/xarray/issues/7467

Checklist

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

dcherian commented 1 year ago

@conda-forge-admin, please rerender

jhamman commented 1 year ago

To check my understanding of what this does, this will warn (or error?) when a user tries to install xarray into a environment where one of the listed optional dependencies is out of range from what is listed in run_constrained?

ocefpaf commented 1 year ago

@jhamman that will error out with a package conflict message. It is, in a way, the best way to control optional dependencies version.

dcherian commented 1 year ago

And when creating a new env, it'll ensure these minimum versions even if the env file doesn't list them?

ocefpaf commented 1 year ago

And when creating a new env, it'll ensure these minimum versions even if the env file doesn't list them?

Nope. The user must list the optional dependencies. The user can drop the min versions pin though, the solver will do te right thing and respect the run constraints in xarray.

dcherian commented 1 year ago

Right that's what I meant. Sorry for nbeing unclear.

The user lists all the packages they want; and the solver will respect xarray's run constraints. Sounds like a feature!

We should have a policy on what to list here though: https://github.com/pydata/xarray/issues/7573

Should Xarray limit iris for example? It seems like almost no one is converting xarray datasets to iris or vice versa.

ocefpaf commented 1 year ago

The user lists all the packages they want; and the solver will respect xarray's run constraints. Sounds like a feature!

Yeah. We, conda-forge, should probably add those automatically for python projects in our recipes via grayskull. The problem is that most Python packages use this so loosely that we will probably create packages that are too "rigid" to install rather than more stable solves.

TL;DR the xarray metadata is solid and that makes sense here. Doing that for all packages, not so much.

hmaarrfk commented 1 year ago

is pandas 2 safe?

ocefpaf commented 1 year ago

is pandas 2 safe?

For the xarray version in this PR? No. But if we are to merge this we would rebase and the latest version of xarray already pins pandas accordingly.

jhamman commented 1 year ago

closed by #93