Skip to content

Commit f517a81

Browse files
authored
Merge pull request #2 from AndreuCodina/features/add-poe
Add poe
2 parents c28bb11 + 1822563 commit f517a81

File tree

5 files changed

+34
-28
lines changed

5 files changed

+34
-28
lines changed

.github/workflows/pull_request.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ jobs:
3333
run: uv sync --locked
3434
shell: bash
3535

36-
- name: Pre-commit
37-
uses: pre-commit/[email protected]
38-
with:
39-
extra_args: --all-files
36+
- name: Check code
37+
run: uv run --frozen -- poe check-code
38+
shell: bash
4039

4140
- name: Unit tests
4241
run: uv run --frozen -- pytest -m unit

.pre-commit-config.yaml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ docker compose --file docker-compose-dev.yaml up --detach
1212
```
1313

1414
```bash
15-
uv run -- fastapi dev api/src/api/main.py
15+
uv run -- poe start-api-dev
1616
```
1717

1818
```bash

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies = [
66
"common",
77
"domain",
88
"fastapi[standard]==0.115.12",
9+
"poethepoet==0.34.0",
910
"pydantic==2.11.4",
1011
"pydantic-settings[azure-key-vault]==2.9.1",
1112
]
@@ -60,3 +61,8 @@ ignore = [
6061
asyncio_mode = "auto"
6162
asyncio_default_fixture_loop_scope = "function"
6263
markers = ["unit: Unit tests", "integration: Integration tests"]
64+
65+
[tool.poe.tasks]
66+
check-code.shell = "ruff check && ruff format --diff && pyright"
67+
start-api-dev = "fastapi dev api/src/api/main.py"
68+
start-api-pro.shell = "workers=$(nproc) && fastapi run --workers $workers api/src/api/main.py"

uv.lock

Lines changed: 24 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)