-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
What is your issue?
If you follow the xarray documentation contribution instructions i.e. fork the xarray repo, install the conda env and pip install . -e, then the xarray version created by pip is something like 0.1.dev6085+g5ce69b2.d20250725. When you try and build the docs (and, I suspect, do much else with xarray, but I haven't tested it) then Pandas raises the following error:
ImportError: Pandas requires version '2022.12.0' or newer of 'xarray' (version '0.1.dev6085+g5ce69b2.d20250725' currently installed).
I fixed this problem by setting my upstream repository to xarray, and fetching the tags from the upstream repo
git remote add upstream [email protected]:pydata/xarray.git
git fetch --tags upstream
Then reinstalling xarray
pip install -e .
This may be obvious to more experienced git users, but I saw enough similar queries (e.g. #8087, #9141) without a clear solution that I think it's worth making explicit.
My proposed solution would be to update the docs to include this step, though I'm not sure if there's a cleaner way of making a fork of xarray that inherents tags, or if I've missed a nuance that means copying tags across could be a bad idea in some situations. If someone with more experience can give me the green light, then I'm happy to update the docs myself.