Repository navigation
Test more packages' latest builds in upstream ci - #1786
Conversation
polars latest build is hard to get working properly because it isn't a pure python package. Minimal effort solution is to just stick with stable release for now. Can revisit later if there's a more compelling reason to add it into uxarray upstream ci.
dylannelson
left a comment
There was a problem hiding this comment.
Hey I tried to follow the order of these commands and may see a potential problem. Breaking some of this file into pieces and testing each line individually can show an error where matplotlib is installed
PackagesNotFoundError: The following packages are missing from the target environment:
- matplotlibbut I think the reason this doesn't come up during the CI run is because this isn't an error, and just a warning. I think this causes some/all of the rest of the code to not run at all, and fail silently. I think if it's changed to matplotlib-base it works as intended though. Or if you want to test this, I believe if you add set -e to the top of the script, it will result in the error above, and can warn you of future ones.
The reason it seems to work with matplotlib-base is because /ci/environment.yml requires matplotlib-base<3.11 and calling conda remove matplotlib doesn't find matplotlib-base
I think you can reproduce with the set -e or by making the env yourself and trying to run the commands:
conda env create -n upstream-check -f ci/environment.yml
conda activate upstream-check
conda remove -y --force matplotlibor even the full
conda remove -y --force antimeridian cartopy dask datashader distributed matplotlib holoviews hvplot geoviews pandas pyarrow requests scikit-learn scipy shapely spatialpandas xarrayassuming your terminal is at the location of this branch's environment.yml
I'm also not seeing an issue with uninstalling pooch as part of the conda list. If I create an env and run
conda remove -y --force pooch it seems to work. Though I'm not as sure what you saw while running that warranted the change in the first place, so I'm not as certain about this one being a concern. For me though it does appear on conda list:
pooch 1.9.0 pyhd8ed1ab_0 conda-forgeand it works fine uninstalling for me
conda remove -y --force pooch
3 channel Terms of Service accepted
## Package Plan ##
environment location: ...
removed specs:
- pooch
The following packages will be REMOVED:
pooch-1.9.0-pyhd8ed1ab_0
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: doneHoping these aren't just a local quirk/windows machine bug too, if so, then carry on, haha.
matplotlib is spelled as matplotlib-base and matplotlib-inline for conda pooch exists in the first conda list from upstream-dev-ci.yml so it can be uninstalled via conda remove. (It was missing from the second conda list, which is what led to this originally.) Kept the related comment for future reference.
|
Good finds, I fixed those two issues (I think) by:
Now trying to debug what appears to be a completely separate issue, occurring while collecting the tests: This is also occurring on
Hoping to get a chance to look into this further later today; will follow up here with any progress. |
|
It looks like the libgeos_c.so.1 ImportError has stopped occurring. The last run which had that error was on the night of Sept 30. Since then, upstream CI runs on Since things seem to be working now, I ran the upstream CI action on this branch again, and confirmed it seems to be working here now, so I think this PR is once again ready for review! |
rajeeja
left a comment
There was a problem hiding this comment.
Checked the run you linked (37353199049) — all 20 packages in the conda remove list are found and removed, and the pip step then pulls cartopy 0.26.1.dev, geoviews 1.16.0b0.dev and matplotlib 3.12.0.dev, so it is genuinely testing upstream rather than the releases. That is the fix for #1785, and distributed resolves fine even though it is not in environment.yml directly, since dask brings it.
One thing I would still take from @dylannelson's review: the set -e. The matplotlib vs matplotlib-base bug is fixed, but the reason it was invisible is not. I checked, and conda remove is atomic — one missing name aborts the whole removal and exits 1:
$ conda remove -y --force pooch nonexistentpkg requests
PackagesNotFoundError: The following packages are missing from the target environment:
- nonexistentpkg
EXIT CODE: 1
$ conda list | grep -E "pooch|requests"
pooch 1.9.0 # still there
requests 2.34.2 # still there
So it is not a warning that skips one package, it skips all of them. Without set -e the script carries on, the pip step reinstalls over whatever is left, and the job goes green while silently testing the conda releases. That is the failure mode this PR exists to fix, and it would come back the next time a package gets renamed or dropped from environment.yml — which is exactly the sort of thing an upstream job runs into.
set -e at the top is a one-liner and makes the whole script fail loudly instead. Approving since this is a clear improvement as it stands, but I would add that before merging.
|
Thank you for taking a look @rajeeja! Understood. Added |
dylannelson
left a comment
There was a problem hiding this comment.
What does the addition of matplotlib-inline do in this case? from what I see the matplotlib-base makes sense, but without a seperate install of matplotlib-inline (which I don't see anywhere), it doesn't ever get installed or uninstalled, making this line not do anything. Unless it's getting installed some other way I don't see and what I'm reading about matplotlib-inline online may be wrong? Either way I think this all works as intended, but that line may not be needed, and I may just be confused as to what you're able to see from side of the the env. Approving though as it all looks like it's working as intended now.
|
Thank you for reviewing, I'll merge this into main! To address your final question:
The |
Closes #1785
Overview
Adds geoviews (and more other packages, too) to the upstream ci job (via
install-upstream.sh). Using the latest geoviews should be sufficient to fix #1785; the upstream ci is failing because it is testing the latest geoviews release (which is not compatible with the latest cartopy; see #1780) when it probably should be testing the latest version of geoviews instead (where a fix has already been merged; see holoviz/geoviews#884).Closing the original issue only requires adding geoviews to the upstream ci job, but this PR adds more packages there, too. There have recently been other bugs related to the latest versions of packages including breaking changes (see, e.g., #1542, where some cartopy<0.26 plots don't work properly with matplotlib>=3.11). Including more packages in upstream ci may help spot this before the relevant releases actually occur.
Minor sidenote: moved the pip uninstall packages at start of install-upstream.sh into the
conda removecommand, because they were both being installed by conda. This comes fromupstream-dev-ci.ymlwhich usesci/environment.ymlwhich does not have apip: ...block; everything there is installed via conda; confirmed by looking at theconda listoutput from an actualCI Upstreamrun (e.g.: https://github.com/UXARRAY/uxarray/actions/runs/35949787277/job/107475635076).(Tiny sidenote: woops, misspelled the branch name! Fixing it means deleting the PR, though, so that typo is here to stay....)
PR Checklist
General
Testing & Benchmarking
Documentation and Examples
docs/api.rst; internal (private) function names start with an underscore (_)AI Disclosure
AI Usage: GitHub Copilot's inline code suggestions, plus asked claude about how to decide whether packages belong in the
conda removeorpip uninstallblock.