Skip to content

Commit 42aa09c

Browse files
committed
Switch to uv.
1 parent 295502b commit 42aa09c

7 files changed

Lines changed: 33 additions & 27 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
container: coady/pylucene
1414
steps:
1515
- uses: actions/checkout@v5
16-
- run: pip install -r tests/requirements.in
16+
- uses: astral-sh/setup-uv@v6
17+
- run: uv venv --system-site-packages
1718
- run: make check
18-
- run: coverage xml
19+
- run: uv run coverage xml
1920
- uses: codecov/codecov-action@v5
2021
with:
2122
token: ${{ secrets.CODECOV_TOKEN }}
@@ -24,16 +25,14 @@ jobs:
2425
runs-on: ubuntu-latest
2526
steps:
2627
- uses: actions/checkout@v5
27-
- uses: actions/setup-python@v5
28-
with:
29-
python-version: 3.x
30-
- run: pip install ruff mypy
28+
- uses: astral-sh/setup-uv@v6
3129
- run: make lint
3230

3331
docs:
3432
runs-on: ubuntu-latest
3533
container: coady/pylucene
3634
steps:
3735
- uses: actions/checkout@v5
38-
- run: pip install -r docs/requirements.in
36+
- uses: astral-sh/setup-uv@v6
37+
- run: uv venv --system-site-packages
3938
- run: make html

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: release
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
tags: ['v*']
76

87
jobs:
98
publish:
@@ -12,8 +11,8 @@ jobs:
1211
permissions: write-all
1312
steps:
1413
- uses: actions/checkout@v5
15-
- run: pip install build -r docs/requirements.in
16-
- run: python -m build
17-
- run: git config --global --add safe.directory /__w/lupyne/lupyne
18-
- run: PYTHONPATH=$PWD python -m mkdocs gh-deploy --force
14+
- uses: astral-sh/setup-uv@v6
15+
- run: uv venv --system-site-packages
16+
- run: uv build
17+
- run: uv run --with lupyne mkdocs gh-deploy --force
1918
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__pycache__/
22
site/
33
.coverage
4+
uv.lock

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
check:
2-
python -m pytest -s --cov=lupyne.engine tests/test_engine.py
3-
python -m pytest -s --cov-append --cov=lupyne.services tests/test_rest.py tests/test_graphql.py
2+
uv run pytest -s --cov=lupyne.engine tests/test_engine.py
3+
uv run pytest -s --cov-append --cov=lupyne.services tests/test_rest.py tests/test_graphql.py
44

55
lint:
6-
ruff check .
7-
ruff format --check .
8-
mypy -p lupyne.engine
6+
uv run ruff check .
7+
uv run ruff format --check .
8+
uv run mypy -p lupyne.engine
99

1010
html:
11-
PYTHONPATH=$(PWD) python -m mkdocs build
11+
uv run --with lupyne mkdocs build

docs/requirements.in

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

pyproject.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ version = "3.3"
44
description = "Pythonic search engine based on PyLucene."
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
license = {file = "LICENSE.txt"}
7+
license = "Apache-2.0"
88
authors = [{name = "Aric Coady", email = "aric.coady@gmail.com"}]
99
keywords = ["lucene", "pylucene"]
1010
classifiers = [
1111
"Development Status :: 6 - Mature",
1212
"Intended Audience :: Developers",
13-
"License :: OSI Approved :: Apache Software License",
1413
"Operating System :: OS Independent",
1514
"Programming Language :: Python :: 3",
1615
"Programming Language :: Python :: 3.10",
@@ -51,3 +50,17 @@ filterwarnings = ["ignore:builtin type .* has no __module__ attribute:Deprecatio
5150
[tool.coverage.run]
5251
source = ["lupyne"]
5352
branch = true
53+
54+
[dependency-groups]
55+
dev = [
56+
"strawberry-graphql[asgi]",
57+
"fastapi",
58+
"httpx",
59+
"pytest-cov",
60+
"pytest-codspeed",
61+
"pytest-parametrized",
62+
"ruff",
63+
"mypy",
64+
"mkdocstrings[python]",
65+
"mkdocs-jupyter",
66+
]

tests/requirements.in

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

0 commit comments

Comments
 (0)