[TC-221]: init template-backend-service (#1)
https://eva.avroid.tech/desk/cards?obj=Task:TC-221 Начальная версия сервиса-шаблона Co-authored-by: Nadezhda <nadezhda.lavrentieva@avroid.team> Reviewed-on: https://git.avroid.tech/Templates/template-backend-service/pulls/1 Reviewed-by: Victor Stratov <victor.stratov@avroid.tech>
This commit is contained in:
97
pyproject.toml
Normal file
97
pyproject.toml
Normal file
@@ -0,0 +1,97 @@
|
||||
[tool.poetry]
|
||||
name = "template-backend-service"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Nadezhda Lavrenteva <nadezhda.lavrentieva@avroid.team>"]
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.12 <3.13"
|
||||
coverage = "^7.6.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
python = ">=3.12 <3.13"
|
||||
alembic = "^1.13.3"
|
||||
fastapi = "^0.115.0"
|
||||
kafka-python = "^2.0.2"
|
||||
pydantic = "^2.9.2"
|
||||
sqlalchemy = "^2.0.35"
|
||||
pydantic-settings = "^2.5.2"
|
||||
uvicorn = "^0.31.0"
|
||||
scylla-driver = "^3.26.9"
|
||||
cassandra-driver = "^3.29.2"
|
||||
pyyaml = "^6.0.2"
|
||||
aiopg = {version = "^1.4.0", extras = ["sa"]}
|
||||
httpx = "^0.27.2"
|
||||
|
||||
[tool.poetry.group.format.dependencies]
|
||||
mypy = "^1.11.2"
|
||||
ruff = "^0.6.8"
|
||||
pre-commit = "^3.8.0"
|
||||
|
||||
[tool.poetry.group.tests.dependencies]
|
||||
pytest-asyncio = "^0.24.0"
|
||||
pytest-cov = "^5.0.0"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
[tool.coverage.run]
|
||||
omit = ["tests/*"]
|
||||
concurrency = ["greenlet", "thread"]
|
||||
|
||||
[tool.mypy]
|
||||
warn_redundant_casts = true
|
||||
disallow_any_generics = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
check_untyped_defs = true
|
||||
disallow_untyped_decorators = true
|
||||
no_implicit_optional = true
|
||||
warn_unused_ignores = true
|
||||
warn_return_any = true
|
||||
strict_equality = true
|
||||
ignore_missing_imports = true
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "tests.*,migrations.*"
|
||||
ignore_errors = true
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
|
||||
[tool.ruff.lint]
|
||||
|
||||
select = ["E", "F", "W", "C90", "I", "N", "UP", "YTT", "ASYNC", "S", "B", "C4", "DTZ", "T10", "ISC", "ICN",
|
||||
"PIE", "T20", "PT", "Q", "RET", "SLF", "SIM", "ERA", "PLE", "TRY", "PYI", "PERF", "LOG", "RUF008",
|
||||
"RUF009", "RUF012", "RUF013", "RUF015", "RUF019", "RUF100", "RUF200"]
|
||||
unfixable = [
|
||||
"ERA", # do not autoremove commented out code
|
||||
]
|
||||
ignore = [
|
||||
"TRY003",
|
||||
"ISC001", # may cause conflicts when used with the formatter
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/*" = ["S", "C4", "ISC", "SLF", "RUF012"]
|
||||
"src/*" = ["PT"]
|
||||
"migrations/*" = ["S", "C4", "ISC", "SLF", "RUF012", "ERA001"]
|
||||
|
||||
|
||||
[tool.ruff.lint.pep8-naming]
|
||||
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
|
||||
classmethod-decorators = [
|
||||
"classmethod",
|
||||
"pydantic.validator",
|
||||
"pydantic.root_validator",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.flake8-bugbear]
|
||||
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query", "fastapi.Form", "fastapi.Body"]
|
||||
Reference in New Issue
Block a user