Skip to content

Commit 6f6798a

Browse files
authoredApr 8, 2025··
Migrate to uv (#113)
* Migrate to uv * GHA and Makefile
1 parent 701b643 commit 6f6798a

10 files changed

+485
-119
lines changed
 

Diff for: ‎.github/dependabot.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "pip"
3+
- package-ecosystem: "uv"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77

88
- package-ecosystem: "github-actions"
99
directory: "/"
1010
schedule:
11-
interval: "weekly"
11+
interval: "monthly"

Diff for: ‎.github/workflows/tests.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ jobs:
1515
- name: Set up Python 3
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.x'
19-
cache: "pip"
18+
python-version: '3.13'
2019

21-
- name: Install dependencies
22-
run: make deps/pre install
20+
- name: Setup uv
21+
uses: astral-sh/setup-uv@v5
22+
23+
- name: Install dependencies from uv.lock
24+
run: make deps/install
2325

2426
- name: Run pytest
2527
run: make test

Diff for: ‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,6 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161+
162+
# Ruff:
163+
.ruff_cache/

Diff for: ‎.pre-commit-config.yaml

+9-20
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
repos:
2-
- repo: https://github.com/pycqa/isort
3-
rev: 5.13.2
4-
hooks:
5-
- id: isort
6-
7-
- repo: https://github.com/psf/black-pre-commit-mirror
8-
rev: 24.10.0
9-
hooks:
10-
- id: black
11-
122
- repo: https://github.com/pre-commit/pre-commit-hooks
133
rev: v5.0.0
144
hooks:
@@ -19,19 +9,18 @@ repos:
199
- id: trailing-whitespace
2010

2111
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.7.4
12+
rev: v0.11.4
2313
hooks:
2414
- id: ruff
15+
args: [ --fix ]
2516
- id: ruff-format
2617

27-
- repo: local
18+
- repo: https://github.com/tox-dev/pyproject-fmt
19+
rev: v2.5.1
2820
hooks:
29-
- id: pytest
30-
name: Run pytest
31-
entry: make test
32-
language: system
33-
pass_filenames: false
34-
always_run: true
21+
- id: pyproject-fmt
3522

36-
ci:
37-
skip: [pytest]
23+
- repo: https://github.com/abravalheri/validate-pyproject
24+
rev: v0.24.1
25+
hooks:
26+
- id: validate-pyproject

Diff for: ‎.python-version

-1
This file was deleted.

Diff for: ‎Makefile

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
dev:
2+
uv sync --dev
13

2-
deps/pre:
3-
pip install pip-tools
4-
5-
deps/compile:
6-
pip-compile
4+
deps/upgrade:
5+
uv lock --upgrade
76

87
deps/install:
9-
pip-sync
8+
uv sync
109

1110
install: deps/install
1211

@@ -23,11 +22,10 @@ endif
2322
all: download transform
2423

2524
test:
26-
PYTHONPATH="src" pytest
25+
uv run pytest
2726

2827
pre-commit:
2928
pre-commit install
30-
pre-commit run --all-files
3129

3230
clean:
3331
git clean -xdf

Diff for: ‎pyproject.toml

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
1-
[tool.isort]
2-
profile = "black"
1+
[project]
2+
name = "programapi"
3+
version = "2025.4.5"
4+
description = "Programme API for EuroPython"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
classifiers = [
8+
"Programming Language :: Python :: 3 :: Only",
9+
"Programming Language :: Python :: 3.12",
10+
"Programming Language :: Python :: 3.13",
11+
]
12+
dependencies = [
13+
"pydantic>=2.11.2",
14+
"python-dotenv>=1.1",
15+
"python-slugify>=8.0.4",
16+
"requests>=2.32.3",
17+
"tqdm>=4.67.1",
18+
]
19+
20+
[dependency-groups]
21+
dev = [
22+
"pre-commit>=4.2",
23+
"pytest>=8.3.5",
24+
"ruff>=0.11.4",
25+
]
26+
27+
[tool.ruff]
28+
lint.select = [ "I" ]

Diff for: ‎requirements.in

-9
This file was deleted.

Diff for: ‎requirements.txt

-72
This file was deleted.

Diff for: ‎uv.lock

+430
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.