@@ -17,70 +17,48 @@ jobs:
1717 fail-fast : false
1818 matrix :
1919 os : ["ubuntu-latest", "macos-latest"]
20- python-version : ["3.10 ", "3.11 ", "3.12 ", "3.13 "]
20+ python-version : ["3.11 ", "3.12 ", "3.13 ", "3.14 "]
2121
2222 steps :
2323 - uses : actions/checkout@v4
24- - name : Set up Python ${{ matrix.python-version }}
25- uses : actions /setup-python@v5
24+ - name : Set up latest uv and Python ${{ matrix.python-version }}
25+ uses : astral-sh /setup-uv@v6
2626 with :
2727 python-version : ${{ matrix.python-version }}
28+ activate-environment : true
2829 - name : Install / build
2930 run : |
30- python -m pip install --upgrade pip
31- pip install .
31+ uv pip install .
3232
3333 test :
34- name : test (ubuntu-latest, ${{ matrix.python-version }}, ${{ matrix.pint }} Pint, packages version ${{ matrix.version }})
34+ name : test (ubuntu-latest, ${{ matrix.python-version }}, ${{ matrix.pint }} Pint, packages version ${{ matrix.resolution }})
3535 runs-on : " ubuntu-latest"
36- env :
37- poetry_version : 2.1.3
3836 strategy :
3937 fail-fast : false
4038 matrix :
41- python-version : ["3.10 ", "3.11 ", "3.12 ", "3.13 "]
39+ python-version : ["3.11 ", "3.12 ", "3.13 ", "3.14 "]
4240 pint : ["with", "without"]
43- version : ["lock"]
44- include :
45- - python-version : " 3.10"
46- version : " minimal"
47- pint : " with"
48- - python-version : " 3.13"
49- version : " maximal"
50- pint : " with"
41+ resolution : ["highest", "lowest-direct"]
5142 steps :
5243 - uses : actions/checkout@v4
53- - name : Install poetry
54- run : pipx install poetry==${{ env.poetry_version }}
55- - name : Set up Python ${{ matrix.python-version }}
56- uses : actions/setup-python@v5
44+ - name : Install uv and Python ${{ matrix.python-version }}
45+ uses : astral-sh/setup-uv@v6
5746 with :
5847 python-version : ${{ matrix.python-version }}
59- cache : ' poetry '
48+ activate-environment : true
6049 - name : Install udunits
6150 run : sudo apt-get install -y libudunits2-dev
62- - name : update lock file
63- if : matrix.version == 'maximal'
64- run : poetry update
6551 - name : Install dependencies
6652 run : |
67- poetry install --with dev
68- poetry run pip install cf_units==3.3.0
53+ uv sync --resolution ${{matrix.resolution}} --no-group docs
6954 - if : matrix.pint == 'with'
7055 name : Install pint and pint-xarray
7156 run : |
72- poetry install -E pint
73- - name : use minimal versions for lock file
74- if : matrix.version == 'minimal'
57+ uv sync --resolution ${{matrix.resolution}} --no-group docs --extra pint
58+ - name : Install cf_units
7559 run : |
76- cp pyproject.toml pyproject.toml.bak
77- pipx install uv
78- uvx migrate-to-uv
79- uv add --active "toolz>=0.12.0" "appnope>=0.1.0" "decorator>=5.1.1" "python-json-logger>2.0.4" "matplotlib>=3.5.0" "bleach>5.0.0" --frozen
80- uv lock --resolution lowest
81- uv pip freeze > requirements.txt
82- poetry run pip install -r requirements.txt
83- cp pyproject.toml.bak pyproject.toml
60+ export UDUNITS2_XML_PATH=/usr/share/xml/udunits/udunits2.xml
61+ uv pip install cf_units==3.3.0
8462 - name : Test with pytest
8563 run : |
86- poetry run pytest gsw_xarray/tests
64+ uv run --no-sync pytest gsw_xarray/tests
0 commit comments