Skip to content

Conversation

@DocOtak
Copy link
Owner

@DocOtak DocOtak commented Sep 30, 2025

Converts project to using uv for every part of its lifecycle.

Some notable changes:

  • Sets minimum dependencies in pyproject.toml using python version markers (@rcaneill please pay special attention to this when reviewing)
  • Uses above minimum dependencies in CI
  • Switches to trusted publishing to pypi (I've already configured pypi to be ready)
  • Switches the readthedoc builder to uv
  • I relaxed the xarray dependency to be what is recommended in spec0 though maybe it's 2023.10 now.

Closes #78

@DocOtak DocOtak marked this pull request as ready for review October 1, 2025 00:55
@DocOtak DocOtak requested a review from rcaneill October 1, 2025 01:00
@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

For python 3.10 and 3.11:

The version lowest-direct fails because gsw seems to be compiled for numpy 1.x, while the projects uses numpy 2.x (with a version lowest I guess that it would catch numpy 1.x, but it would also catch all outdated packages coming from other packages that did not set proper version constraints)

For python 3.12 and 3.13:

E AttributeError: module 'numpy' has no attribute 'cumproduct'. Did you mean: 'cumprod'?

This error comes from pint

@DocOtak
Copy link
Owner Author

DocOtak commented Oct 1, 2025

What should we do?

If we follow SPEC0, we should drop numpy<2 support, and python 3.10 support. Recent versions of xarray already have a python >=3.11 requirement, but hasn't yet dropped numpy 1. GSW tests against numpy2 starting with v3.6.18.

When I did my initial testing, indeed found that the "lowest" strategy was a bit of a mess.

@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

I agree the lowest is a mess ^^, but that’s why it should be tested I guess

I believe that we can drop 3.10 support, and require gsw>=3.6.18. As our new version does not bring any extra feature, this will not block any user that still uses python 3.10 and old gsw version

@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

For the pint error, version 0.24.1 seems to be compatible with numpy 2 and 1
hgrecco/pint#1974

@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

What I propose is:

  • Pint>=0.24.1
  • pint-xarray>=0.6

@DocOtak
Copy link
Owner Author

DocOtak commented Oct 1, 2025

Sounds good, feel free to push updates to this pr.

@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

We need pint>0.24.4
hgrecco/pint#2074

@rcaneill rcaneill dismissed their stale review October 1, 2025 09:31

superseded by new commits

@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

I added ci for python 3.14 as it is gonna be released soon, so it is done :)

@rcaneill
Copy link
Collaborator

rcaneill commented Oct 1, 2025

@DocOtak can you review and merge if you’re happy with the modifications?

@rcaneill rcaneill merged commit 0a58985 into master Oct 2, 2025
26 checks passed
@rcaneill rcaneill deleted the to_uv branch October 3, 2025 06:58
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.

Switch to UV?

2 participants