Skip to content

Commit 2fcde98

Browse files
authored
Merge pull request #21 from lazka/uv
Port to uv + some minor updates
2 parents 22a17e6 + 1490240 commit 2fcde98

File tree

8 files changed

+626
-822
lines changed

8 files changed

+626
-822
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ['3.11', '3.12', '3.13']
11+
python-version: ['3.12', '3.13', '3.14']
1212
steps:
1313
- uses: actions/checkout@v4
1414

@@ -19,16 +19,16 @@ jobs:
1919

2020
- name: Install dependencies
2121
run: |
22-
pipx install poetry
23-
poetry install
22+
python -m pip install --upgrade uv
23+
uv sync
2424
2525
- name: Lint
2626
run: |
27-
poetry run flake8
27+
uv run flake8
2828
2929
- name: Mypy
3030
run: |
31-
poetry run mypy .
31+
uv run mypy .
3232
3333
deploy:
3434
permissions:

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM python:3.13-bookworm
1+
FROM python:3.14-slim-trixie
22

3-
RUN python -m pip install "poetry==2.2.0"
3+
RUN python -m pip install "uv==0.9.5"
44

55
COPY . /app
66
WORKDIR /app
7-
RUN poetry config virtualenvs.in-project true
8-
RUN poetry install --only main
97

10-
ENTRYPOINT ["poetry", "run", "gunicorn", "--threads", "4", "-w", "1", "--access-logfile", "-", "--bind", "0.0.0.0:80", "flask_app:app"]
8+
RUN uv sync --locked --no-dev --compile-bytecode
9+
10+
ENTRYPOINT ["uv", "run", "--no-sync", "gunicorn", "--threads", "4", "-w", "1", "--access-logfile", "-", "--bind", "0.0.0.0:80", "flask_app:app"]
1111

1212
EXPOSE 80

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Get it running:
66
* fill out `instance/application.cfg`
77

88
```console
9-
poetry install
10-
poetry run flask --app flask_app run
9+
uv run flask --app flask_app run
1110
```
1211

1312
## GitHub App Registration

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
app:
3+
build: .
4+
ports:
5+
- "5000:80"

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "msys2-autobuild-controller"
33
version = "0.1.0"
44
description = ""
55
authors = [{ name = "Jeremy Drake", email = "github@jdrake.com" }]
6-
requires-python = ">=3.11.0,<4.0"
6+
requires-python = ">=3.12.0,<4.0"
77
dependencies = [
88
"Flask>=3.0.2,<4",
99
"requests>=2.25.1,<3",
@@ -15,16 +15,9 @@ dependencies = [
1515
[dependency-groups]
1616
dev = [
1717
"flake8>=7.0.0,<8",
18-
"mypy==1.18.1",
18+
"mypy==1.18.2",
1919
"types-requests>=2.31.0.20240125,<3",
2020
]
2121

2222
[tool.uv]
2323
package = false
24-
25-
[tool.poetry]
26-
package-mode = false
27-
28-
[build-system]
29-
requires = ["hatchling"]
30-
build-backend = "hatchling.build"

uv.lock

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

0 commit comments

Comments
 (0)