Skip to content

Commit 77656de

Browse files
committed
update(pyproject): use new dependencies
1 parent 76248eb commit 77656de

File tree

27 files changed

+434
-374
lines changed

27 files changed

+434
-374
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ jobs:
88
steps:
99
- uses: actions/checkout@v4
1010
- name: ruff
11-
run: docker compose -f deployments/dev/docker-compose.yaml run backend ruff check src tests
11+
run: docker compose -f deploy/dev/docker-compose.yaml run backend ruff check src tests
1212

1313
mypy:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: mypy
18-
run: docker compose -f deployments/dev/docker-compose.yaml run backend mypy src tests
18+
run: docker compose -f deploy/dev/docker-compose.yaml run backend mypy src tests
1919

2020
pytest:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
2424

2525
- name: pytest
26-
run: docker compose -f deployments/dev/docker-compose.yaml run backend pytest tests --cov --cov-report=xml
26+
run: docker compose -f deploy/dev/docker-compose.yaml run backend pytest tests --cov --cov-report=xml
2727

2828
- name: upload coverage reports to codecov
2929
uses: codecov/codecov-action@v5

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ app_name_description.
99
## Развертывание для разработки
1010
```bash
1111
git clone https://github.com/emptybutton/app-name-kebab-case.git
12-
docker compose -f app-name-kebab-case/deployments/dev/docker-compose.yaml up
12+
docker compose -f app-name-kebab-case/deploy/dev/docker-compose.yaml up
1313
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ ENV UV_CACHE_DIR /run/app/uv
99
ENV PYTHONPATH /app/src:/app/tests
1010
ENV WATCHFILES_FORCE_POLLING true
1111

12-
ENTRYPOINT ["bash", "deployments/dev/backend/entrypoint.sh"]
12+
ENTRYPOINT ["bash", "deploy/dev/backend/entrypoint.sh"]
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
backend:
55
build:
66
context: ../../
7-
dockerfile: deployments/dev/backend/Dockerfile
7+
dockerfile: deploy/dev/backend/Dockerfile
88
tags:
99
- "app-name-kebab-case-backend:dev"
1010
container_name: app-name-kebab-case-backend
@@ -19,7 +19,12 @@ services:
1919
environment:
2020
JWT_SECRET: super-secret-jwt-secret
2121
POSTGRES_URL: postgresql+psycopg://root:root@postgres/root
22-
command: app-name-kebab-case-fastapi-dev
22+
command: app-name-kebab-case-dev
23+
healthcheck:
24+
test: python3 -c "from urllib.request import urlopen as f; assert f('http://backend:8000/health').status == 204"
25+
start_period: 2m
26+
start_interval: 0.5s
27+
interval: 10s
2328

2429
postgres:
2530
image: postgres:16.3-alpine3.19

pyproject.toml

Lines changed: 61 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,32 @@ readme = "README.md"
1010
classifiers = ["Private :: Do Not Upload"]
1111
requires-python = "==3.13.*"
1212
dependencies = [
13+
"dishka==1.6.0",
1314
"effectt==0.2.0",
14-
"uvicorn[standard]==0.30.6",
15-
"typenv==0.2.0",
16-
"dishka==1.4.2",
17-
"fastapi==0.115.2",
15+
"in-memory-db==0.3.0",
16+
"sqlalchemy==2.0.41",
17+
"psycopg[binary]==3.2.9",
18+
"alembic==1.16.1",
1819
"PyJWT==2.10.1",
19-
"sqlalchemy==2.0.38",
20-
"psycopg[binary]==3.2.5",
21-
"alembic==1.14.1",
22-
"in-memory-db==0.2.0",
20+
"typenv==0.2.0",
21+
"fastapi==0.115.12",
22+
"uvicorn[standard]==0.34.3",
2323
]
2424

25-
[project.optional-dependencies]
25+
[dependency-groups]
2626
dev = [
27-
"mypy[faster-cache]==1.15.0",
28-
"ruff==0.9.7",
29-
"pytest==8.3.4",
30-
"pytest-asyncio==0.25.3",
31-
"pytest-cov==6.0.0",
32-
"dirty-equals==0.8.0",
33-
"httpx==0.27.2",
34-
"httpx-ws==0.7.0",
27+
"mypy[faster-cache]==1.16.0",
28+
"ruff==0.11.13",
29+
"pytest==8.4.0",
30+
"pytest-cov==6.1.1",
31+
"pytest-asyncio==1.0.0",
32+
"dirty-equals==0.9.0",
33+
"httpx==0.28.1",
34+
"httpx-ws==0.7.2",
3535
]
36-
prod = []
36+
37+
[project.urls]
38+
Repository = "https://github.com/emptybutton/app-name-kebab-case"
3739

3840
[build-system]
3941
requires = ["hatchling"]
@@ -43,7 +45,15 @@ build-backend = "hatchling.build"
4345
packages = ["src/app_name_snake_case"]
4446

4547
[project.scripts]
46-
app-name-kebab-case-fastapi-dev = "app_name_snake_case.main.fastapi.__main__:main"
48+
app-name-kebab-case-dev = "app_name_snake_case.main.fastapi.__main__:main"
49+
50+
[tool.uv]
51+
add-bounds = "exact"
52+
53+
[tool.uv.workspace]
54+
members = [
55+
"dist",
56+
]
4757

4858
[tool.mypy]
4959
mypy_path = "$MYPY_CONFIG_FILE_DIR/src:$MYPY_CONFIG_FILE_DIR/tests"
@@ -57,24 +67,42 @@ preview = true
5767
line-length = 80
5868
indent-width = 4
5969

60-
[tool.ruff.lint]
61-
select = [
62-
"ANN", "F", "W", "E", "B", "C90", "N", "UP", "YTT", "ASYNC", "PL", "RUF",
63-
"Q", "RET", "SLF", "SLOT", "SIM", "TID252", "TCH", "ARG", "PTH", "ERA", "TRY",
64-
"PERF", "INP", "I", "S", "FAST", "TID", "TCH", "INT"
65-
]
66-
ignore = ["N818", "RUF009", "UP018", "PLR6301", "PLR0913", "PLW0108", "TC006"]
67-
6870
[tool.ruff.lint.isort]
6971
lines-after-imports = 2
7072

73+
[tool.ruff.lint]
74+
select = ["ALL"]
75+
ignore = [
76+
"EXE002",
77+
"CPY001",
78+
"C401",
79+
"C408",
80+
"D100",
81+
"D101",
82+
"D102",
83+
"D103",
84+
"D104",
85+
"D105",
86+
"D106",
87+
"D107",
88+
"D200",
89+
"D201",
90+
"D202",
91+
"D203",
92+
"D205",
93+
"D401",
94+
"D212",
95+
"DOC201",
96+
"DOC501",
97+
"PLR6301",
98+
"TC002",
99+
"TC003",
100+
"TC006",
101+
]
102+
71103
[tool.ruff.lint.per-file-ignores]
72-
"src/app_name_snake_case/entities/*" = ["PLR2004"]
73-
"src/app_name_snake_case/application/*" = ["PLR0917"]
74-
"src/app_name_snake_case/infrastructure/adapters/*" = ["RUF029"]
75-
"tests/*" = ["S101", "PLR0124", "PLR0917", "S106", "C901"]
76-
"*/alembic/versions/*" = ["S101"]
77-
"__init__.py" = ["PLC0414"]
104+
"tests/*" = ["S101", "PT013", "PLR2004", "D400", "D415"]
105+
"tests/test_tgdb/test_entities/test_horizon.py" = ["D400", "D415"]
78106

79107
[tool.pytest.ini_options]
80108
pythonpath = ["src"]

src/app_name_snake_case/application/ports/user_id_signing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ async def signed_user_id(self, user_id: UUID, /) -> SignedUserIDT:
99

1010
@abstractmethod
1111
async def user_id(
12-
self, signed_user_id: SignedUserIDT, /
12+
self, signed_user_id: SignedUserIDT, /,
1313
) -> UUID | None: ...

src/app_name_snake_case/application/ports/user_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ async def view_of_user(self, user: User, /) -> UserViewT: ...
1010

1111
@abstractmethod
1212
async def view_of_user_with_id(
13-
self, user_id: UUID | None, /
13+
self, user_id: UUID | None, /,
1414
) -> UserWithIDViewT:
1515
...

src/app_name_snake_case/application/ports/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
class Users(ABC):
88
@abstractmethod
9-
async def user_with_id(self, id: UUID) -> User | None: ...
9+
async def user_with_id(self, id_: UUID, /) -> User | None: ...

0 commit comments

Comments
 (0)