-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
117 lines (103 loc) · 3.58 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[tool.poetry]
name = "jacobson"
version = "0.1.0"
description = "self-hosted zipcode API"
authors = ["Christian G. Semke <chrisemke@protonmail.com>"]
license = "AGPLv3"
readme = "README.md"
[tool.poetry.dependencies]
python = "3.12.*"
uvicorn = {extras = ["standard"], version = "^0.30.4"}
fastapi-slim = "^0.111.1"
strawberry-graphql = {extras = ["fastapi"], version = "^0.237.3"}
httpx = "^0.27.0"
pydantic = "^2.8.2"
alembic = "^1.13.2"
psycopg = {extras = ["binary"], version = "^3.2.1"}
pydantic-settings = "^2.4.0"
sqlmodel = "^0.0.21"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.8.0"
ruff = "^0.5.5"
mypy = "^1.11.1"
commitizen = "^3.28.0"
poetry-plugin-export = "^1.8.0"
fastapi = "^0.111.1"
strawberry-graphql = {extras = ["cli"], version = "^0.237.3"}
taskipy = "^1.13.0"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.0"
mkdocs-material = "^9.5.30"
mkdocstrings = {extras = ["python"], version = "^0.25.2"}
mkdocs-site-urls = "^0.2.0"
[tool.poetry.group.test.dependencies]
pytest = "^8.3.2"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
pytest-asyncio = "^0.23.8"
respx = "^0.21.1"
testcontainers = {extras = ["postgres"], version = "^4.7.2"}
factory-boy = "^3.3.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
python_version = "3.12"
strict = true
explicit_package_bases = true
exclude = ["build", "docker", "tests"]
plugins = ["pydantic.mypy", "strawberry.ext.mypy_plugin"]
[tool.ruff]
lint.select = [
"E", # pydocstyle
"W", # pydocstyle
"F", # pyflakes
"I", # isort
"PL", # Pylint
"UP", # pyupgrade
"D", # docstrings
"RUF", # ruff
"ASYNC", # flake8-async
"PT", # flake8-pytest-style
]
lint.ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D211", # no-blank-line-before-class
"D212", # Multi-line docstring summary should start at the first line
"D206", # Docstring should be indented with spaces, not tabs
"D407", # Missing dashed underline after section
"W191", # Indentation contains tabs
]
indent-width = 1
line-length = 79
target-version = "py312"
[tool.ruff.format]
indent-style = "tab"
quote-style = "single"
docstring-code-format = true
[tool.pytest.ini_options]
minversion = "8.2"
addopts = "-vv --no-header -p no:warnings"
asyncio_mode = 'auto'
testpaths = ["tests"]
[tool.taskipy.variables]
container = "podman"
[tool.taskipy.tasks]
build = {cmd = "{container} compose up -d --build", help = "Build containers", use_vars = true}
up = {cmd = "{container} compose up -d", help = "Run containers", use_vars = true}
down = {cmd = "{container} compose down", help = "Turn off containers", use_vars = true}
logs = {cmd = "{container} logs -f -t --color jacobson_app_1", use_vars = true}
docs_serve = {cmd = "mkdocs serve -w . -a localhost:8008", help = "Serve mkdocs watch all files"}
pre_docs_deploy = {cmd = "mkdocs build", help = "Build mkdocs"}
docs_deploy = {cmd = "mkdocs gh-deploy -b pages", help = "Deploy mkdocs on branch pages"}
hooks = {cmd = "pre-commit run --all-files", help = "Run htoolooks on all files"}
hooks_upgrade = {cmd = "pre-commit autoupdate", help = "Auto update git hooks"}
post_test = {cmd = "coverage html", help = "Generate coverage html"}
[tool.taskipy.tasks.test]
cmd = "DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock TESTCONTAINERS_RYUK_DISABLED=true pytest --cov=."
help = "Run all tests in current directory"