Skip to content

Commit 9b0af2e

Browse files
MaxGhenisclaude
andcommitted
Migrate from legacy installer to uv for dependency management
Replace legacy installer with uv across Makefile and CI workflows: - Makefile: use uv for package installation - pr.yaml: Add setup-uv action to Test and SmokeTest jobs - push.yaml: Add setup-uv action to versioning, Test, and Publish jobs Lint jobs already used uv (via uvx ruff). This completes the migration. Supersedes #431. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1a8eeb5 commit 9b0af2e

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

.github/workflows/pr.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
uses: actions/setup-python@v5
4646
with:
4747
python-version: ${{ matrix.python-version }}
48+
- name: Install uv
49+
uses: astral-sh/setup-uv@v4
4850
- name: Install package
4951
run: make install
5052
- name: Run tests
@@ -70,23 +72,25 @@ jobs:
7072
uses: actions/setup-python@v5
7173
with:
7274
python-version: ${{ matrix.python-version }}
75+
- name: Install uv
76+
uses: astral-sh/setup-uv@v4
7377
- name: Install -core package
7478
run: |
75-
python -m pip install .
76-
python -m pip install "pytest-rerunfailures>=10,<15"
79+
uv pip install --system .
80+
uv pip install --system "pytest-rerunfailures>=10,<15"
7781
- name: Verify pytest plugins
7882
run: python -m pytest --version
7983
- name: Install -us package from PyPI
8084
run: |
8185
if [[ "${{ matrix.python-version }}" == "3.13" || "${{ matrix.python-version }}" == "3.14" ]]; then
8286
# For Python 3.13+, install newer tables first and ignore conflicts
83-
pip install "tables>=3.11.0"
84-
pip install policyengine-us --no-deps
87+
uv pip install --system "tables>=3.11.0"
88+
uv pip install --system policyengine-us --no-deps
8589
# Install remaining dependencies manually (skip pytest-dependency which has build issues)
86-
pip install click pathlib synthimpute tabulate
87-
pip install policyengine-us-data --no-deps
90+
uv pip install --system click pathlib synthimpute tabulate
91+
uv pip install --system policyengine-us-data --no-deps
8892
else
89-
python -m pip install policyengine-us
93+
uv pip install --system policyengine-us
9094
fi
9195
shell: bash
9296
- name: Run smoke tests only

.github/workflows/push.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ jobs:
2828
uses: actions/setup-python@v5
2929
with:
3030
python-version: "3.14"
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v4
3133
- name: Build changelog
3234
run: |
33-
pip install towncrier
35+
uv pip install --system towncrier
3436
python .github/bump_version.py
3537
towncrier build --yes --version $(python -c "import re; print(re.search(r'version = \"(.+?)\"', open('pyproject.toml').read()).group(1))")
3638
- name: Preview changelog update
@@ -54,6 +56,8 @@ jobs:
5456
uses: actions/setup-python@v5
5557
with:
5658
python-version: "3.14"
59+
- name: Install uv
60+
uses: astral-sh/setup-uv@v4
5761
- name: Install package
5862
run: make install
5963
- name: Run tests
@@ -80,6 +84,8 @@ jobs:
8084
uses: actions/setup-python@v5
8185
with:
8286
python-version: "3.14"
87+
- name: Install uv
88+
uses: astral-sh/setup-uv@v4
8389
- name: Publish a git tag
8490
run: ".github/publish-git-tag.sh || true"
8591
- name: Install package

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ format:
1010
ruff check .
1111

1212
install:
13-
pip install -e ".[dev]" --config-settings editable_mode=compat
13+
uv pip install -e ".[dev]" --config-settings editable_mode=compat
1414

1515
test-country-template:
1616
policyengine-core test policyengine_core/country_template/tests -c policyengine_core.country_template
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Migrate from pip to uv for dependency management in Makefile and CI workflows.

0 commit comments

Comments
 (0)