Skip to content

Commit 7c24dde

Browse files
Merge pull request #20 from wphillipmoore/feature/uv-migration
chore: migrate pymqrest to uv
2 parents 6cbf193 + 8dabbac commit 7c24dde

13 files changed

Lines changed: 1011 additions & 2326 deletions

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- If no issue exists, open one before any work begins.
1111

1212
## Testing
13-
- poetry run python3 scripts/dev/validate_local.py
13+
- python3 scripts/dev/validate_local.py
1414

1515
## Notes
1616
-

.github/workflows/ci.yml

Lines changed: 20 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -65,35 +65,22 @@ jobs:
6565
with:
6666
python-version: "3.14"
6767

68-
- name: Cache Poetry installation
69-
uses: actions/cache@v4
70-
with:
71-
path: |
72-
~/.local/share/pypoetry
73-
~/.local/bin/poetry
74-
key: poetry-install-${{ runner.os }}-3.14
75-
76-
- name: Install Poetry
77-
run: |
78-
if ! command -v poetry &> /dev/null; then
79-
curl -sSL https://install.python-poetry.org | python3 -
80-
echo "$HOME/.local/bin" >> $GITHUB_PATH
81-
fi
82-
poetry --version
68+
- name: Install uv
69+
run: python3 -m pip install uv==0.9.26
8370

84-
- name: Cache dependencies
71+
- name: Cache uv
8572
uses: actions/cache@v4
8673
with:
87-
path: ~/.cache/pypoetry/virtualenvs
88-
key: poetry-${{ runner.os }}-py3.14-${{ hashFiles('poetry.lock') }}
74+
path: ~/.cache/uv
75+
key: uv-${{ runner.os }}-py3.14-${{ hashFiles('uv.lock') }}
8976
restore-keys: |
90-
poetry-${{ runner.os }}-py3.14-
77+
uv-${{ runner.os }}-py3.14-
9178
9279
- name: Install dependencies
93-
run: poetry install --no-interaction
80+
run: uv sync --frozen --group dev
9481

9582
- name: Run pip-audit (fail on any vulnerability)
96-
run: poetry run pip-audit -r requirements.txt -r requirements-dev.txt
83+
run: uv run pip-audit -r requirements.txt -r requirements-dev.txt
9784

9885
test-and-validate:
9986
name: test-and-validate
@@ -120,48 +107,35 @@ jobs:
120107
- name: Validate version string policy
121108
run: python3 scripts/dev/validate_version.py
122109

123-
- name: Cache Poetry installation
124-
uses: actions/cache@v4
125-
with:
126-
path: |
127-
~/.local/share/pypoetry
128-
~/.local/bin/poetry
129-
key: poetry-install-${{ runner.os }}-${{ matrix.python-version }}
130-
131-
- name: Install Poetry
132-
run: |
133-
if ! command -v poetry &> /dev/null; then
134-
curl -sSL https://install.python-poetry.org | python3 -
135-
echo "$HOME/.local/bin" >> $GITHUB_PATH
136-
fi
137-
poetry --version
110+
- name: Install uv
111+
run: python3 -m pip install uv==0.9.26
138112

139113
- name: Validate dependency specifications
140114
run: python3 scripts/dev/validate_dependency_specs.py
141115

142-
- name: Verify poetry.lock sync
143-
run: poetry check --lock
116+
- name: Verify uv.lock sync
117+
run: uv lock --check
144118

145-
- name: Cache dependencies
119+
- name: Cache uv
146120
uses: actions/cache@v4
147121
with:
148-
path: ~/.cache/pypoetry/virtualenvs
149-
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
122+
path: ~/.cache/uv
123+
key: uv-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
150124
restore-keys: |
151-
poetry-${{ runner.os }}-py${{ matrix.python-version }}-
125+
uv-${{ runner.os }}-py${{ matrix.python-version }}-
152126
153127
- name: Install dependencies
154-
run: poetry install --no-interaction
128+
run: uv sync --frozen --group dev
155129

156130
- name: Run ruff check
157-
run: poetry run ruff check
131+
run: uv run ruff check
158132

159133
- name: Run mypy
160-
run: poetry run mypy src/
134+
run: uv run mypy src/
161135

162136
- name: Run tests with coverage
163137
run: |
164-
poetry run pytest \
138+
uv run pytest \
165139
--cov=pymqrest \
166140
--cov-report=term-missing \
167141
--cov-branch \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Experimental. The current focus is on attribute mapping and metadata modeling.
1919
Set up the environment and run the canonical validation command:
2020

2121
```bash
22-
poetry install
23-
poetry run python3 scripts/dev/validate_local.py
22+
uv sync --group dev
23+
python3 scripts/dev/validate_local.py
2424
```
2525

2626
Docs-only changes can use:

docs/standards-and-conventions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ https://github.com/wphillipmoore/standards-and-conventions
3131
- release_model: artifact-publishing
3232
- supported_release_lines: current and previous
3333
- Local validation:
34-
- `poetry run python3 scripts/dev/validate_local.py`
34+
- `python3 scripts/dev/validate_local.py`
3535
- Docs-only changes: `python3 scripts/dev/validate_docs.py`
3636
- Docs-only validation requires `markdownlint` `0.41.0` on the PATH or `npx`
3737
to run the pinned version.
38+
- Tooling requirement:
39+
- `uv` `0.9.26` (install with `python3 -m pip install uv==0.9.26`).

0 commit comments

Comments
 (0)