Add ruff and mypy to dev dependencies with configuration in pyproject.toml. Add a lint CI job that runs ruff check, ruff format --check, and mypy. Auto-fix import sorting and formatting across the codebase. Exclude alembic/versions from linting (auto-generated migrations). Ignore B008 (FastAPI Depends pattern) and RUF001 (unicode in user-facing strings). 21 ruff lint errors and 50 mypy errors remain for manual review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
69 lines
1.6 KiB
TOML
69 lines
1.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=69", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "scholarr"
|
|
version = "0.1.0"
|
|
description = "Self-hosted scholarr service"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"alembic>=1.14,<2.0",
|
|
"argon2-cffi>=25.1,<26.0",
|
|
"asyncpg>=0.30,<0.31",
|
|
"crossrefapi>=1.6,<2.0",
|
|
"fastapi>=0.116,<0.117",
|
|
"httpx>=0.28,<0.29",
|
|
"itsdangerous>=2.2,<3.0",
|
|
"python-multipart>=0.0.9,<0.1",
|
|
"rapidfuzz>=3.14.3",
|
|
"sqlalchemy>=2.0,<2.1",
|
|
"tenacity>=9.1.4",
|
|
"uvicorn[standard]>=0.34,<0.35",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.3,<9.0",
|
|
"pytest-asyncio>=0.25,<0.26",
|
|
"ruff>=0.9",
|
|
"mypy>=1.14",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "-q -m \"not integration\" --import-mode=importlib"
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
markers = [
|
|
"integration: integration tests that require external services",
|
|
"db: tests that validate database behavior and constraints",
|
|
"migrations: tests focused on alembic schema migration correctness",
|
|
"schema: tests focused on multi-tenant schema invariants",
|
|
"smoke: smoke tests for containerized runtime",
|
|
]
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 120
|
|
extend-exclude = ["alembic/versions"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF"]
|
|
ignore = ["E501", "B008", "RUF001"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["app"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
ignore_missing_imports = true
|
|
check_untyped_defs = false
|
|
warn_unused_ignores = true
|
|
|
|
[tool.setuptools]
|
|
include-package-data = true
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["app*"]
|