Skip to content

Add uv config - #1286

Draft
peanutfun wants to merge 86 commits into
developfrom
add-uv-config
Draft

peanutfun wants to merge 86 commits into
developfrom
add-uv-config

Conversation

@peanutfun

@peanutfun peanutfun commented Apr 30, 2026 •

Copy link
Copy Markdown
Member

This PR makes CLIMADA installable with plain pip, and thus also enables the use of uv.

A sister branch is created in Petals to update the CI configuration there (see add-uv-config). For the moment, Petals cannot be made pip-installable simultaneously, as several dependencies block that.

Changes proposed in this PR:

  • Remove GDAL as direct dependency. GDAL itself cannot be installed with pip.
    • Instead of GDAL, use rasterio to read a GeoTIFF file. Update code and tests accordingly. (Tests were buggy, code is not used in any recent module 🙄)
  • Consolidate requirement specs.
    • Define all requirements in pyproject.toml
    • Use dependency groups instead of extra requirements (these dependencies are not actually requirements)
    • Use my program pyproject-to-conda-env to translate pyproject.toml to Conda environment specs automatically (with pre-commit).
  • Add installation instructions for uv and pip
    • Organize instructions for different package managers in tabs for better overview.
  • Update CI testing pipeline:
    • Run integration tests in the GitHub pipeline. Download and cache testing data from Zenodo: https://doi.org/10.5281/zenodo.20592941
    • Use pip to install requirements for unit tests
    • Use uv to install requirements for integration tests
    • Add a separate unit test pipeline still running Mamba (to ensure environment management works there)
  • Update readthedocs.org config to use uv for environment management

This PR fixes #1100

PR Author Checklist

PR Reviewer Checklist

Comment thread Makefile Resolved

@emanuel-schmid emanuel-schmid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

Found one issue: eccodeslib doesn't exist for windows. So I'd follow the suggestion from the linked astral-sh/uv/issue. It worked for me on Linux and Windows.

Comment thread pyproject.toml Resolved
Comment thread pyproject.toml Resolved
Apply batched suggestions from code review

Co-authored-by: Emanuel Schmid <51439563+emanuel-schmid@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants