Initial template
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{%- set deps = ["pydantic-settings>=2.14.2", "rich>=15.0.0"] -%}
|
||||
{%- if use_dishka %}{% set _ = deps.append("dishka>=1.10.1") %}{% endif -%}
|
||||
{%- if 'api' in backend_services %}{% set _ = deps.append("fastapi>=0.138.0") %}{% set _ = deps.append("uvicorn[standard]>=0.49.0") %}{% endif -%}
|
||||
{%- if 'aiogram_bot' in backend_services %}{% set _ = deps.append("aiogram>=3.29.0") %}{% endif -%}
|
||||
{%- if include_payments %}{% set _ = deps.append("aiosend>=3.0.7") %}{% endif -%}
|
||||
{%- if 'kurigram_userbot' in backend_services %}{% set _ = deps.append("anyio>=4.0.0") %}{% set _ = deps.append("kurigram>=2.2.7") %}{% set _ = deps.append("tgcrypto>=1.2.5") %}{% set _ = deps.append("uvloop>=0.21.0") %}{% endif -%}
|
||||
{%- if 'taskiq_worker' in backend_services %}{% set _ = deps.append("taskiq>=0.12.4") %}{% if taskiq_broker == 'redis' %}{% set _ = deps.append("taskiq-redis>=1.2.3") %}{% endif %}{% endif -%}
|
||||
{%- if 'scheduler' in backend_services %}{% set _ = deps.append("apscheduler>=3.11.0") %}{% endif -%}
|
||||
{%- if database == 'mongo' %}{% set _ = deps.append("beanie>=2.0.1") %}{% endif -%}
|
||||
{%- if database == 'postgres' %}{% set _ = deps.append("sqlmodel>=0.0.38") %}{% set _ = deps.append("asyncpg>=0.31.0") %}{% set _ = deps.append("alembic>=1.18.4") %}{% set _ = deps.append("greenlet>=3.1.0") %}{% endif -%}
|
||||
{%- if use_redis %}{% set _ = deps.append("redis>=5.2.0") %}{% endif -%}
|
||||
{%- if use_llm %}{% set _ = deps.append("pydantic-ai-slim[google]>=2.1.0") %}{% endif -%}
|
||||
{%- set modules = [] -%}
|
||||
{%- if 'api' in backend_services %}{% set _ = modules.append("api") %}{% endif -%}
|
||||
{%- if 'aiogram_bot' in backend_services %}{% set _ = modules.append("bot") %}{% endif -%}
|
||||
{%- if 'kurigram_userbot' in backend_services %}{% set _ = modules.append("userbot") %}{% endif -%}
|
||||
{%- if 'taskiq_worker' in backend_services %}{% set _ = modules.append("worker") %}{% endif -%}
|
||||
{%- if 'scheduler' in backend_services and 'taskiq_worker' not in backend_services %}{% set _ = modules.append("scheduler") %}{% endif -%}
|
||||
{%- set _ = modules.append("utils") -%}
|
||||
{%- if use_dishka %}{% set _ = modules.append("dependencies") %}{% endif -%}
|
||||
[project]
|
||||
name = "{{ project_slug }}"
|
||||
version = "0.1.0"
|
||||
description = "{{ project_description }}"{%- if author_name %}
|
||||
authors = [
|
||||
{ name = "{{ author_name }}"{% if author_email %}, email = "{{ author_email }}"{% endif %} }
|
||||
]
|
||||
{%- endif %}
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
{%- for dep in deps | sort %}
|
||||
"{{ dep }}",
|
||||
{%- endfor %}
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["uv_build>=0.11.14,<0.12.0"]
|
||||
build-backend = "uv_build"
|
||||
|
||||
[tool.uv.build-backend]
|
||||
module-name = [{% for module in modules %}"{{ module }}"{% if not loop.last %}, {% endif %}{% endfor %}]
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py313"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["ALL"]
|
||||
ignore = ["CPY", "D1", "D203", "D212", "COM812", "BLE", "S101", "PT", "RUF001", "RUF002", "RUF003", "TRY301"]
|
||||
unfixable = ["F401"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"scripts/*" = ["INP", "T201", "ANN401"]
|
||||
"*.lock" = ["ALL"]
|
||||
{%- if database == 'postgres' %}
|
||||
"migrations/**" = ["ALL"]
|
||||
{%- endif %}
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
[tool.ruff.format]
|
||||
docstring-code-format = true
|
||||
skip-magic-trailing-comma = true
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
split-on-trailing-comma = false
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"ruff>=0.15.20",
|
||||
"ty>=0.0.55",
|
||||
]
|
||||
Reference in New Issue
Block a user