@@ -44,11 +44,13 @@ jobs:
4444 working-directory : cluster_tools
4545 steps :
4646 - uses : actions/checkout@v3
47- - name : Set up Python ${{ matrix.python-version }}
48- uses : actions /setup-python@v4
47+ - name : Install uv
48+ uses : astral-sh /setup-uv@v3
4949 with :
50- python-version : ${{ matrix.python-version }}
51- architecture : " x64"
50+ version : " 0.4.19"
51+
52+ - name : Set up Python ${{ matrix.python-version }}
53+ run : uv python install ${{ matrix.python-version }}
5254 - name : Build/pull dockered-slurm image
5355 if : ${{ matrix.executors == 'slurm' }}
5456 run : |
7072 docker logs c2
7173
7274 # Run setup.py on all three nodes
73- docker exec -w /cluster_tools slurmctld bash -c "poetry install " &
74- docker exec -w /cluster_tools c1 bash -c "poetry install " &
75- docker exec -w /cluster_tools c2 bash -c "poetry install " &
75+ docker exec -w /cluster_tools slurmctld bash -c "uv sync --frozen " &
76+ docker exec -w /cluster_tools c1 bash -c "uv sync --frozen " &
77+ docker exec -w /cluster_tools c2 bash -c "uv sync --frozen " &
7678 wait
7779
7880 - name : Setup Kubernetes-in-Docker
@@ -84,21 +86,18 @@ jobs:
8486 ./kind create cluster --config=tests/cluster-config.yaml
8587 ./kind export kubeconfig
8688
87- cp ../requirements.txt .
8889 docker build -f tests/Dockerfile -t scalableminds/cluster-tools:latest .
8990 ./kind load docker-image scalableminds/cluster-tools:latest
9091
9192 - name : Install dependencies (without docker)
9293 if : ${{ matrix.executors == 'multiprocessing' }}
9394 run : |
94- pip install -r ../requirements.txt
95- poetry install
95+ uv sync --frozen
9696
9797 - name : Install dependencies (without docker)
9898 if : ${{ matrix.executors == 'kubernetes' || matrix.executors == 'dask' }}
9999 run : |
100- pip install -r ../requirements.txt
101- poetry install --all-extras
100+ uv sync --all-extras --frozen
102101
103102 - name : Check typing
104103 if : ${{ matrix.executors == 'multiprocessing' && matrix.python-version == '3.11' }}
@@ -117,7 +116,7 @@ jobs:
117116 run : |
118117 cd tests
119118 PYTEST_EXECUTORS=multiprocessing,sequential,test_pickling,debug_sequential \
120- poetry run python -m pytest -sv test_all.py test_multiprocessing.py
119+ uv run --frozen python -m pytest -sv test_all.py test_multiprocessing.py
121120
122121 - name : Run slurm tests
123122 if : ${{ matrix.executors == 'slurm' }}
@@ -126,22 +125,22 @@ jobs:
126125 docker exec \
127126 -w /cluster_tools/tests \
128127 -e PYTEST_EXECUTORS=slurm \
129- slurmctld bash -c "poetry run python -m pytest -sv test_all.py test_slurm.py"
128+ slurmctld bash -c "uv run --frozen python -m pytest -sv test_all.py test_slurm.py"
130129 docker exec \
131130 -w /cluster_tools/tests \
132- slurmctld bash -c "poetry run python test_deref_main.py"
131+ slurmctld bash -c "uv run --frozen python test_deref_main.py"
133132
134133 - name : Run kubernetes tests
135134 if : ${{ matrix.executors == 'kubernetes' }}
136135 run : |
137136 cd tests
138- PYTEST_EXECUTORS=kubernetes poetry run python -m pytest -sv test_all.py test_kubernetes.py
137+ PYTEST_EXECUTORS=kubernetes uv run --frozen python -m pytest -sv test_all.py test_kubernetes.py
139138
140139 - name : Run dask tests
141140 if : ${{ matrix.executors == 'dask' }}
142141 run : |
143142 cd tests
144- PYTEST_EXECUTORS=dask poetry run python -m pytest -sv test_all.py test_dask.py
143+ PYTEST_EXECUTORS=dask uv run --frozen python -m pytest -sv test_all.py test_dask.py
145144
146145 webknossos_linux :
147146 needs : changes
@@ -161,17 +160,16 @@ jobs:
161160
162161 steps :
163162 - uses : actions/checkout@v3
164- - name : Set up Python ${{ matrix.python-version }}
165- uses : actions/setup-python@v4
166- with :
167- python-version : ${{ matrix.python-version }}
168- architecture : " x64"
169-
170- - name : Install dependencies
171- run : |
172- pip install -r ../requirements.txt
173- poetry install --extras all --with examples --with dev
174163
164+ - name : Install uv
165+ uses : astral-sh/setup-uv@v3
166+ with :
167+ # Install a specific version of uv.
168+ version : " 0.4.19"
169+
170+ - name : Set up Python ${{ matrix.python-version }}
171+ run : uv python install ${{ matrix.python-version }}
172+
175173 - name : Check formatting
176174 if : ${{ matrix.group == 1 && matrix.python-version == '3.11' }}
177175 run : ./format.sh check
@@ -192,7 +190,7 @@ jobs:
192190
193191 - name : Check if git is dirty
194192 run : |
195- git diff --no-ext-diff --quiet -- exit-code
193+ git diff --no-ext-diff --exit-code
196194 [[ -z $(git status -s) ]]
197195
198196 webknossos_cli_docker :
@@ -205,21 +203,20 @@ jobs:
205203 runs-on : ubuntu-latest
206204 steps :
207205 - uses : actions/checkout@v3
208- - name : Set up Python
209- uses : actions /setup-python@v4
206+ - name : Install uv
207+ uses : astral-sh /setup-uv@v3
210208 with :
211- python- version: " 3.10 "
212-
209+ # Install a specific version of uv.
210+ version : " 0.4.19 "
213211 - name : Write version file
214212 run : |
215- pip install -r requirements.txt
216213 pushd webknossos
217214
218- PKG_VERSION="$(dunamai from git)"
215+ PKG_VERSION="$(uvx dunamai from git)"
219216 echo "__version__ = '$PKG_VERSION'" > ./webknossos/version.py
220- poetry version "$ PKG_VERSION"
217+ sed -i 's/ version = "0.0.0"/version = "'"${ PKG_VERSION}"'"/g' pyproject.toml
221218
222- popd
219+ popd
223220
224221 - name : Build docker image
225222 run : docker build -t scalableminds/webknossos-cli:$GITHUB_SHA -f webknossos/Dockerfile .
@@ -283,16 +280,11 @@ jobs:
283280 with :
284281 repository : scalableminds/webknossos
285282 path : docs/wk-repo
286- - name : Set up Python 3.8
287- uses : actions /setup-python@v4
283+ - name : Install uv
284+ uses : astral-sh /setup-uv@v3
288285 with :
289- python-version : 3.8
290- architecture : " x64"
291-
292- - name : Install dependencies
293- run : |
294- pip3 install -r requirements.txt
295-
286+ # Install a specific version of uv.
287+ version : " 0.4.19"
296288 - name : Build Docs
297289 run : |
298290 cd docs
@@ -325,7 +317,7 @@ jobs:
325317 SLACK_HOOK : ${{ secrets.LINK_CHECKER_SLACK_HOOK }}
326318 run : |
327319 cd docs
328- poetry run linkchecker --config linkcheckerrc https://docs.webknossos.org > link_status || \
320+ uv run --frozen linkchecker --config linkcheckerrc https://docs.webknossos.org > link_status || \
329321 curl -X POST --data-urlencode "payload={\"text\": \":warning: Broken Links on doc.webknossos.org :warning:\n"'```'"\n$(cat link_status)\n"'```"}' \
330322 "$SLACK_HOOK"
331323
@@ -340,20 +332,18 @@ jobs:
340332 runs-on : ubuntu-latest
341333 steps :
342334 - uses : actions/checkout@v3
343- - name : Set up Python 3.8
344- uses : actions /setup-python@v4
335+ - name : Install uv
336+ uses : astral-sh /setup-uv@v3
345337 with :
346- python-version : 3.8
347- architecture : " x64"
348- - name : Install dependencies
349- run : pip3 install -r requirements.txt
338+ # Install a specific version of uv.
339+ version : " 0.4.19"
350340 - name : Publish python packages
351341 env :
352- POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_PASSWORD }}
342+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_PASSWORD }}
353343 run : _tooling/publish.sh
354344 - name : Prepare github release
355345 run : |
356- VERSION="$(dunamai from git)"
346+ VERSION="$(uvx dunamai from git)"
357347 _tooling/changelog_for_version.sh $VERSION > Changelog.md
358348 - name : Publish github release
359349 id : create_release
0 commit comments