feat: scaffold backend Python project (Quart + SQLAlchemy + Celery deps)
Pins runtime and ML deps separately so the regular web image stays lean. Configures ruff for py312 with bugbear, async, and pyupgrade lints enabled. psycopg sync driver included up-front for alembic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
[project]
|
||||
name = "fabledcurator"
|
||||
version = "0.1.0"
|
||||
description = "FabledSword family — self-hosted media curation, gallery, ML tagging, and subscription-driven downloads."
|
||||
requires-python = ">=3.12"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["backend*"]
|
||||
@@ -0,0 +1,9 @@
|
||||
-r requirements.txt
|
||||
|
||||
# ML stack
|
||||
torch>=2.2,<2.3
|
||||
torchvision>=0.17,<0.18
|
||||
transformers>=4.40,<4.41
|
||||
onnxruntime>=1.17,<1.18
|
||||
huggingface-hub>=0.22,<0.23
|
||||
opencv-python-headless>=4.9,<5.0
|
||||
@@ -0,0 +1,28 @@
|
||||
# Web
|
||||
quart>=0.19,<0.20
|
||||
hypercorn>=0.16,<0.17
|
||||
|
||||
# DB
|
||||
sqlalchemy[asyncio]>=2.0,<2.1
|
||||
asyncpg>=0.29,<0.30
|
||||
psycopg[binary]>=3.1,<3.2
|
||||
alembic>=1.13,<1.14
|
||||
pgvector>=0.2,<0.3
|
||||
|
||||
# Task queue
|
||||
celery>=5.4,<5.5
|
||||
redis>=5.0,<6.0
|
||||
|
||||
# Crypto for credential storage (lands in FC-3, but pinned now for stability)
|
||||
cryptography>=42,<43
|
||||
|
||||
# Image handling (lands in FC-2)
|
||||
pillow>=10.2,<11.0
|
||||
imagehash>=4.3,<4.4
|
||||
|
||||
# Gallery-dl wrapper (lands in FC-3)
|
||||
gallery-dl>=1.27,<1.28
|
||||
|
||||
# Utilities
|
||||
python-dotenv>=1.0,<2.0
|
||||
structlog>=24.1,<25.0
|
||||
@@ -0,0 +1,23 @@
|
||||
target-version = "py312"
|
||||
line-length = 100
|
||||
|
||||
[lint]
|
||||
select = [
|
||||
"E", "W", # pycodestyle
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"UP", # pyupgrade
|
||||
"B", # flake8-bugbear
|
||||
"C4", # comprehensions
|
||||
"ASYNC", # async correctness
|
||||
]
|
||||
ignore = [
|
||||
"E501", # line length, handled by formatter
|
||||
]
|
||||
|
||||
[lint.per-file-ignores]
|
||||
"alembic/versions/*.py" = ["E", "F", "I", "UP"]
|
||||
"tests/*" = ["F401"]
|
||||
|
||||
[format]
|
||||
quote-style = "double"
|
||||
Reference in New Issue
Block a user