Skip to content

Commit 77d92d1

Browse files
authored
Merge pull request #226 from rapidpro/copilot/switch-to-uv-package-manager-again
Migrate from Poetry to uv package manager
2 parents f89c8d7 + 2efb055 commit 77d92d1

5 files changed

Lines changed: 1267 additions & 1675 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,24 @@ jobs:
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535

36-
- name: Install Poetry
37-
uses: snok/install-poetry@v1
38-
with:
39-
virtualenvs-in-project: true
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v7
4038

4139
- name: Initialize environment
4240
run: |
43-
poetry install --no-root
44-
poetry add django@~${{ matrix.django-version }}
41+
uv sync --extra dev
42+
uv add django~=${{ matrix.django-version }}
4543
4644
- name: Run pre-test checks
4745
run: |
4846
sudo apt-get install gettext
49-
poetry run python ./code_check.py --debug
47+
uv run python ./code_check.py --debug
5048
5149
- name: Run tests
5250
run: |
53-
poetry run coverage run manage.py test dash test_runner --verbosity=2
54-
poetry run coverage report -i
55-
poetry run coverage xml
51+
uv run coverage run manage.py test dash test_runner --verbosity=2
52+
uv run coverage report -i
53+
uv run coverage xml
5654
5755
- name: Upload coverage
5856
if: success()
@@ -73,11 +71,14 @@ jobs:
7371
- name: Install Python
7472
uses: actions/setup-python@v5
7573
with:
76-
python-version: "3.10.x"
74+
python-version: "3.11.x"
75+
76+
- name: Install uv
77+
uses: astral-sh/setup-uv@v7
7778

7879
- name: Publish release
80+
env:
81+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
7982
run: |
80-
python -m pip install -U pip poetry
81-
poetry build
82-
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
83-
poetry publish
83+
uv build
84+
uv publish

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@ fabfile.*
6969
# ruff
7070
.ruff_cache
7171

72+
# uv
73+
.venv/

0 commit comments

Comments
 (0)