-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (99 loc) · 2.82 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (99 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[tool.poetry]
name = "faststack"
version = "0.1.0"
description = "Hybrid FastAPI framework — runtime core + CLI generator"
authors = ["Manav Gupta <manavgup@gmail.com>"]
license = "MIT"
readme = "README.md"
packages = [
{ include = "faststack_core" },
{ include = "cli" },
]
[tool.poetry.scripts]
faststack = "cli:cli"
[tool.poetry.dependencies]
python = ">=3.12,<4.0"
fastapi = ">=0.115.0"
sqlalchemy = {version = ">=2.0", extras = ["asyncio"]}
asyncpg = ">=0.30.0"
pydantic = ">=2.0"
alembic = ">=1.14.0"
click = ">=8.1"
jinja2 = ">=3.1"
inflect = ">=7.0"
uvicorn = ">=0.34.0"
python-json-logger = ">=2.0"
pyyaml = "^6.0.3"
[tool.poetry.group.dev.dependencies]
pytest = ">=8.0"
pytest-asyncio = ">=0.24.0"
polyfactory = ">=2.0"
ruff = ">=0.8.0"
black = ">=24.0"
aiosqlite = ">=0.20.0"
httpx = ">=0.28.0"
mypy = ">=1.13.0"
types-pyyaml = "^6.0.12.20250915"
pytest-cov = "^7.1.0"
pre-commit = "^4.5.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "-v --tb=short"
markers = [
"unit: Fast isolated tests (core, templates)",
"integration: Tests that scaffold projects in tmp dirs (CLI commands)",
"e2e: End-to-end workflow tests (init → add-entity → generate → list)",
"slow: Tests that take >1s",
]
[tool.coverage.run]
source = ["faststack_core", "cli"]
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.",
]
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
"UP046", # Generic[T] subclass — we use this pattern for Protocol/SQLAlchemy compat
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["C901"] # allow complex test helper functions
"cli/model_introspector.py" = ["C901"] # AST parsing is inherently complex
"cli/yaml_parser.py" = ["C901"] # YAML parsing with relationship resolution
"cli/cmd_generate.py" = ["C901"] # regeneration logic with PRESERVED/REGENERATABLE handling
"cli/cmd_add_entity.py" = ["C901"] # entity generation with multiple input modes
"examples/*" = ["F841", "E402", "F401", "C901", "B904"] # smoke test scripts — relaxed lint
[tool.black]
line-length = 120
target-version = ["py312"]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false