132 lines
2.3 KiB
TOML
132 lines
2.3 KiB
TOML
[project]
|
|
name = "nyahome"
|
|
version = "0.1.0"
|
|
description = "Add your description here"
|
|
readme = "README.md"
|
|
requires-python = ">=3.13"
|
|
dependencies = [
|
|
"aiofiles>=25.1.0",
|
|
"aiosmtplib>=5.1.1",
|
|
"alembic>=1.18.4",
|
|
"argon2-cffi>=25.1.0",
|
|
"fastapi>=0.136.3",
|
|
"httpx>=0.28.1",
|
|
"jinja2>=3.1.6",
|
|
"openai>=2.40.0",
|
|
"passlib[bcrypt]>=1.7.4",
|
|
"pydantic>=2.13.4",
|
|
"python-dotenv>=1.2.2",
|
|
"python-jose[cryptography]>=3.5.0",
|
|
"python-multipart>=0.0.30",
|
|
"pyyaml>=6.0.3",
|
|
"rich>=15.0.0",
|
|
"sqlalchemy>=2.0.50",
|
|
"sqlmodel>=0.0.38",
|
|
"typer>=0.26.5",
|
|
"uvicorn>=0.48.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
mysql = [
|
|
"pymysql>=1.2.0",
|
|
]
|
|
|
|
postgresql = [
|
|
"psycopg[binary]>=3.3.4",
|
|
]
|
|
|
|
all = [
|
|
"nyahome[mysql]",
|
|
"nyahome[postgresql]",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"nyahome[all]",
|
|
"docstring-parser>=0.18.0",
|
|
"mypy>=2.1.0",
|
|
"ruff>=0.15.15",
|
|
"taskipy>=1.14.1",
|
|
"types-aiofiles>=25.1.0.20260518",
|
|
"types-passlib>=1.7.7.20260211",
|
|
"types-python-jose>=3.5.0.20260408",
|
|
]
|
|
|
|
[project.scripts]
|
|
nyahome = "nyahome.manage:app"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
artifacts = ["src/nyahome/static/**"]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/nyahome"]
|
|
artifacts = ["src/nyahome/static/**"]
|
|
|
|
[tool.ruff]
|
|
preview = true
|
|
line-length = 120
|
|
target-version = "py313"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"A",
|
|
"B",
|
|
"C",
|
|
"E",
|
|
"F",
|
|
"E",
|
|
"Q",
|
|
"I",
|
|
"N",
|
|
"W",
|
|
"DOC",
|
|
"RSE",
|
|
"RET",
|
|
"FAST",
|
|
"YTT",
|
|
"ANN",
|
|
"ASYNC",
|
|
"COM",
|
|
"T20",
|
|
"SIM",
|
|
"PTH",
|
|
"FLY",
|
|
"RUF",
|
|
]
|
|
|
|
ignore = [
|
|
"PTH123",
|
|
"RUF001",
|
|
"RUF002",
|
|
"RUF003",
|
|
"RUF029",
|
|
"C90",
|
|
"COM812",
|
|
"E501",
|
|
]
|
|
|
|
fixable = ["ALL"]
|
|
|
|
[tool.mypy]
|
|
files = ["src"]
|
|
strict = true
|
|
warn_return_any = true
|
|
|
|
disable_error_code = ["list-item", "attr-defined", "type-arg"]
|
|
|
|
[tool.taskipy.tasks]
|
|
# 生成迁移
|
|
makemigrations = "alembic revision --autogenerate -m 'auto'"
|
|
# 执行迁移
|
|
migrate = "alembic upgrade head"
|
|
# 回滚
|
|
rollback = "alembic downgrade -1"
|
|
# 查看数据库版本
|
|
current = "alembic current"
|
|
# 为 docs 文档生成最新 openapi.json
|
|
openapi-docs = "nyahome openapi docs/.vitepress/theme/openapi.json"
|