Skip to content

Commit 0e9b42d

Browse files
committed
Use uv instead of pixi.
1 parent ec28d0e commit 0e9b42d

7 files changed

Lines changed: 1865 additions & 4487 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow will install Python dependencies, run tests and lint using pixi
1+
# This workflow will install Python dependencies, run tests and lint using uv
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
name: Python application
@@ -19,46 +19,49 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
include:
22-
- python-version: "py38"
22+
- python-version: "3.8"
2323
os: ubuntu-latest
24-
- python-version: "py39"
24+
- python-version: "3.9"
2525
os: ubuntu-latest
26-
- python-version: "py310"
26+
- python-version: "3.10"
2727
os: ubuntu-latest
28-
- python-version: "py311"
28+
- python-version: "3.11"
2929
os: ubuntu-latest
30-
- python-version: "py312"
30+
- python-version: "3.12"
3131
os: ubuntu-latest
32-
- python-version: "py313"
32+
- python-version: "3.13"
3333
os: ubuntu-latest
34-
- python-version: "py314"
34+
- python-version: "3.14"
3535
os: ubuntu-latest
3636
# Test on additional platforms for Python 3.11
37-
- python-version: "py311"
37+
- python-version: "3.11"
3838
os: macos-latest
39-
- python-version: "py311"
39+
- python-version: "3.11"
4040
os: windows-latest
4141

4242
steps:
4343
- uses: actions/checkout@v4
4444

45-
- name: Setup pixi
46-
uses: prefix-dev/setup-pixi@v0.8.1
45+
- name: Setup uv
46+
uses: astral-sh/setup-uv@v5
4747
with:
48-
pixi-version: v0.55.0
49-
cache: true
48+
enable-cache: true
49+
python-version: ${{ matrix.python-version }}
5050

5151
- name: Install dependencies and run tests
52-
run: pixi run test-${{ matrix.python-version }}
52+
run: uv run --group dev pytest tests/
5353

5454
- name: Run lint (Python 3.11 only)
55-
if: matrix.python-version == 'py311' && matrix.os == 'ubuntu-latest'
56-
run: pixi run lint
55+
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
56+
run: uv run --group dev flake8 sqlparse/
5757

5858
- name: Generate coverage report (Python 3.11 only)
59-
if: matrix.python-version == 'py311' && matrix.os == 'ubuntu-latest'
60-
run: pixi run -e py311 coverage && pixi run -e py311 coverage-combine && pixi run -e py311 coverage-xml
59+
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
60+
run: |
61+
uv run --group dev coverage run -m pytest tests/
62+
uv run --group dev coverage combine
63+
uv run --group dev coverage xml
6164
6265
- name: Publish to codecov
63-
if: matrix.python-version == 'py311' && matrix.os == 'ubuntu-latest'
66+
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
6467
uses: codecov/codecov-action@v4

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ MANIFEST
77
.cache/
88
*.egg-info/
99
htmlcov/
10-
.pytest_cache# pixi environments
11-
.pixi/*
12-
!.pixi/config.toml
10+
.pytest_cache
11+
.venv/

AGENTS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ sqlparse is a non-validating SQL parser for Python that provides support for par
88

99
## Development Commands
1010

11-
This project uses `pixi` for dependency and environment management. Common commands:
11+
This project uses `uv` for dependency and environment management. Common commands:
1212

1313
### Testing
14-
- Run all tests across Python versions: `pixi run test-all`
15-
- Run tests for specific Python version: `pixi run -e py311 pytest tests/`
16-
- Run single test file: `pixi run -e py311 pytest tests/test_format.py`
17-
- Run specific test: `pixi run -e py311 pytest tests/test_format.py::test_name`
14+
- Run all tests across Python versions: `make test`
15+
- Run tests for specific Python version: `uv run --group dev --python 3.11 pytest tests/`
16+
- Run single test file: `uv run --group dev --python 3.11 pytest tests/test_format.py`
17+
- Run specific test: `uv run --group dev --python 3.11 pytest tests/test_format.py::test_name`
1818
- Using Makefile: `make test`
1919

2020
### Linting
21-
- `pixi run lint` or `make lint`
21+
- `uv run --group dev flake8 sqlparse/` or `make lint`
2222

2323
### Coverage
2424
- `make coverage` (runs tests with coverage and shows report)

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,26 @@ help:
1010
@sed -n '/^[a-zA-Z0-9_.]*:/s/:.*//p' <Makefile | sort
1111

1212
test:
13-
pixi run test-all
13+
uv run --group dev --python 3.8 pytest tests/
14+
uv run --group dev --python 3.9 pytest tests/
15+
uv run --group dev --python 3.10 pytest tests/
16+
uv run --group dev --python 3.11 pytest tests/
17+
uv run --group dev --python 3.12 pytest tests/
18+
uv run --group dev --python 3.13 pytest tests/
19+
uv run --group dev --python 3.14 pytest tests/
1420

1521
lint:
16-
pixi run lint
22+
uv run --group dev flake8 sqlparse/
1723

1824
coverage:
19-
pixi run -e py311 coverage
20-
pixi run -e py311 coverage-combine
21-
pixi run -e py311 coverage-report
25+
uv run --group dev coverage run -m pytest tests/
26+
uv run --group dev coverage combine
27+
uv run --group dev coverage report
2228

2329
coverage-xml:
24-
pixi run -e py311 coverage
25-
pixi run -e py311 coverage-combine
26-
pixi run -e py311 coverage-xml
30+
uv run --group dev coverage run -m pytest tests/
31+
uv run --group dev coverage combine
32+
uv run --group dev coverage xml
2733

2834
clean:
2935
$(PYTHON) setup.py clean

0 commit comments

Comments
 (0)