Skip to content

Commit 3214fb5

Browse files
committed
chore: switch from uv to pixi (#1)
1 parent 6595093 commit 3214fb5

8 files changed

Lines changed: 1441 additions & 980 deletions

File tree

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SCM syntax highlighting & preventing 3-way merges
2+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v5
2424

25-
- name: Install uv
26-
uses: astral-sh/setup-uv@v5
25+
- name: Install pixi
26+
uses: prefix-dev/setup-pixi@v0.8.1
2727
with:
2828
python-version: "3.12"
2929

3030
- name: Run Lint
3131
run: |
32-
uv run hatch run quality:check
32+
pixi run -e dev check
3333
3434
- name: Run Type Checks
3535
run: |
36-
uv run hatch run quality:typecheck
36+
pixi run -e dev typecheck
3737
3838
testing:
3939
runs-on: ubuntu-latest
@@ -49,11 +49,11 @@ jobs:
4949
with:
5050
lfs: true
5151

52-
- name: Install uv
53-
uses: astral-sh/setup-uv@v5
52+
- name: Install pixi
53+
uses: prefix-dev/setup-pixi@v0.8.1
5454
with:
5555
python-version: "${{ matrix.python-version }}"
5656

5757
- name: Run tests
5858
run: |
59-
uv run hatch run tests:run
59+
pixi run -e dev test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,6 @@ poetry.toml
283283
pyrightconfig.json
284284

285285
# End of https://www.toptal.com/developers/gitignore/api/python
286+
# pixi environments
287+
.pixi/*
288+
!.pixi/config.toml

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ help:
1111
@echo " fix Fix the project"
1212
@echo " test Run the tests"
1313
@echo " test-snapshot Run the tests and rebuild snapshots"
14-
@echo " lock Build uv.lock file"
14+
@echo " lock Update pixi.lock file"
1515

1616
.PHONY: check
1717
check:
18-
uv run hatch run quality:check
19-
uv run hatch run quality:typecheck
18+
pixi run -e dev check
19+
pixi run -e dev typecheck
2020

2121
.PHONY: fix
2222
fix:
23-
uv run hatch run quality:format
23+
pixi run -e dev format
2424

2525
.PHONY: test
2626
test:
27-
uv run hatch run tests:run
27+
pixi run -e dev test
2828

2929
.PHONY: test-snapshot
3030
test-snapshot:
31-
uv run hatch run tests:run-snapshot
31+
pixi run -e dev test-snapshot
3232

3333
.PHONY: lock
3434
lock:
35-
uv lock --upgrade
35+
pixi update

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@
1010

1111
### Prerequisites
1212

13-
Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/):
13+
Install [`pixi`](https://pixi.sh/latest/):
1414

1515
```
16-
curl -LsSf https://astral.sh/uv/install.sh | sh
16+
curl -fsSL https://pixi.sh/install.sh | bash
1717
```
1818

1919
### Instructions
2020

21+
Open VS Code with pix-installed `dev` environment
22+
23+
```
24+
pixi run -e dev code .
25+
```
26+
2127
Clone repository:
2228

2329
```

pixi.lock

Lines changed: 1391 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ dev = [
5252
]
5353

5454
[tool.hatch.envs.quality]
55-
installer = "uv"
5655

5756
[tool.hatch.envs.quality.scripts]
5857
check = [
@@ -66,7 +65,7 @@ format = [
6665
]
6766
typecheck = [
6867
"""
69-
pyright --pythonpath="$(uv run --active hatch run quality:python -c 'import sys; print(sys.executable)')" \
68+
pyright --pythonpath="$(pixi run python -c 'import sys; print(sys.executable)')" \
7069
{args:src/ tests/}
7170
"""
7271
]
@@ -129,34 +128,24 @@ lint.select = [
129128
known-first-party = ["svirlpool"]
130129

131130
[tool.hatch.envs.tests]
132-
installer = "uv"
133131

134132
[tool.hatch.envs.tests.scripts]
135133
run = "pytest --cov=svirlpool --cov-report=term-missing tests/ --durations 0 -s {args:tests}"
136134
run-snapshot = "run --snapshot-update"
137135

138136
[tool.hatch.envs.build]
139-
installer = "uv"
140-
feature = [
141-
"dev",
142-
]
143137

144138
[tool.hatch.envs.build.scripts]
145139
run = "hatch build"
146140

147141
[tool.hatch.envs.targets]
148-
installer = "uv"
149142

150143
[tool.hatch.build]
151144
include = [
152145
"src/svirlpool/**/*.py",
153146
"src/**/py.typed",
154147
]
155148

156-
[tool.hatch.build.targets.wheel]
157-
sources = ["src"]
158-
ignore-vcs = true
159-
160149
[tool.hatch.build.targets.sdist]
161150
ignore-vcs = true
162151

@@ -174,3 +163,25 @@ version_variables = [
174163
version_toml = [
175164
"pyproject.toml:project.version",
176165
]
166+
167+
[tool.pixi.workspace]
168+
channels = ["conda-forge"]
169+
platforms = ["linux-64"]
170+
171+
[tool.pixi.pypi-dependencies]
172+
svirlpool = { path = ".", editable = true }
173+
[tool.pixi.dependencies]
174+
python = ">=3.12"
175+
hatch = ">=1.14.0"
176+
177+
[tool.pixi.environments]
178+
default = { solve-group = "default" }
179+
dev = { features = ["dev"], solve-group = "default" }
180+
181+
[tool.pixi.tasks]
182+
check = "black --check --diff --preview src tests && ruff check src tests"
183+
format = "black --preview src tests && ruff check --fix src tests"
184+
typecheck = "pyright src/ tests/"
185+
test = "pytest --cov=svirlpool --cov-report=term-missing tests/ --durations 0 -s"
186+
test-snapshot = "pytest --cov=svirlpool tests/ --snapshot-update"
187+
build = "hatch build"

uv.lock

Lines changed: 0 additions & 952 deletions
This file was deleted.

0 commit comments

Comments
 (0)