-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
199 lines (184 loc) · 6.45 KB
/
Copy pathpyproject.toml
File metadata and controls
199 lines (184 loc) · 6.45 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
[project]
name = "aegis-stack"
version = "0.9.1"
description = "A production-ready FastAPI platform with modular components and a built-in control plane. Try: uvx aegis-stack init my-project"
readme = "README.md"
requires-python = ">=3.11,<3.15"
license = { text = "MIT" }
authors = [{ name = "Leonard Bedner", email = "gamecoder99@gmail.com" }]
keywords = [
"cli",
"scaffold",
"generator",
"fastapi",
"copier",
"python",
"template",
"boilerplate",
"stack",
"database",
"worker",
"scheduler",
"uvx",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Typing :: Typed",
]
dependencies = [
# Pinned (not >=) because typer's newer releases use unquoted forward
# references (e.g. ``cls: type[TyperCommand] | None``) that fail at
# class-body evaluation on Python 3.11/3.12. CI runs on 3.11 — pin
# below the regressed range until typer ships a fix.
"typer==0.26.8",
# 9.15.x relocates .copier-answers.yml out of the generated project dir
# (with _subdirectory + {{ project_slug }} wrapper), which breaks
# `aegis update`. The ceiling MUST stay below 9.15 — `<9.16`/`<9.17`
# still resolve 9.15.x/9.16.0 and reintroduce the relocation. Do not let
# dependabot widen this until the placement is handled upstream.
"copier>=9.11.2,<9.15",
"rich>=13.0.0",
"pillow>=12.2.0",
"packaging>=24.0",
# Imported directly across the CLI (copier_manager, update, template_cleanup,
# …). Guaranteed transitively via copier, but declared explicitly since we
# ``import yaml`` in ~9 runtime modules.
"pyyaml>=6.0",
"filelock>=3.20.1",
"urllib3>=2.7.0",
# Runtime, not just dev: `aegis update` / add-service 3-way merges shell
# out to ruff to look through formatting (template_cleanup.run_ruff_on_text,
# issue #715). Without it in the installed env (uvx/pip), merges silently
# degrade to raw byte diffs and pristine projects get spurious conflicts.
"ruff>=0.9.0",
]
[project.urls]
Homepage = "https://aegis-stack.io"
Documentation = "https://docs.aegis-stack.io/"
Repository = "https://github.com/lbedner/aegis-stack.git"
Issues = "https://github.com/lbedner/aegis-stack/issues"
[project.optional-dependencies]
dev = [
"pytest>=9.0.3",
"pytest-asyncio>=0.23.0",
"pytest-xdist>=3.5.0",
"ty>=0.0.8", # Type checker
"pre-commit>=3.7.0",
"pip-audit>=2.6.0",
"sqlalchemy>=2.0.0", # For migrate-fix integration tests
"alembic>=1.13.0", # For migrate-fix integration tests
"opencc-python-reimplemented>=0.1.7", # Simplified → Traditional Chinese conversion
"aegis-plugin-test", # In-repo fake plugin (tests/fixtures); see [tool.uv.sources]
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.24.0",
"mkdocs-gen-files>=0.5.0",
"pygments>=2.20.0",
"pymdown-extensions>=10.21.3",
"mkdocs-mermaid2-plugin>=1.1.0",
"mkdocs-glightbox>=0.3.0",
]
[project.scripts]
aegis = "aegis.__main__:app"
aegis-stack = "aegis.__main__:app"
# Plugin entry-point groups consumed by aegis/core/plugin_discovery.py.
# Aegis itself ships nothing in these groups; the empty declarations
# document the contract for plugin authors and let `pip show -f
# aegis-stack` surface them. A third-party plugin's pyproject.toml
# declares its own entries:
#
# [project.entry-points."aegis.plugins"]
# scraper = "aegis_plugin_scraper:get_spec"
#
# [project.entry-points."aegis.plugins.cli"]
# scraper = "aegis_plugin_scraper.cli:app"
[project.entry-points."aegis.plugins"]
[project.entry-points."aegis.plugins.cli"]
[tool.uv.sources]
# The fake plugin lives in-tree at ``tests/fixtures/aegis_plugin_test``
# so the plugin-distribution tests can pip-install it as a real package
# (entry point + src layout). Pinned via path so ``uv sync --all-extras``
# installs it editable in CI.
aegis-plugin-test = { path = "tests/fixtures/aegis_plugin_test", editable = true }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["aegis"]
[tool.hatch.build.targets.sdist]
include = ["/aegis", "/tests", "/README.md", "/CHANGELOG.md", "/pyproject.toml"]
exclude = ["/.github", "/stacks", "/test-*", "*.pyc", "__pycache__"]
[tool.ruff]
line-length = 88
target-version = "py311"
# Mirrors ``[tool.ty.src].exclude``: skip generated/template files and
# any locally-generated test stacks.
extend-exclude = [
"aegis/templates",
"test-project",
"my-app",
"demo-*",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B011", # do not call assert False
"B904", # raise without from in exception handler
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["B018", "B017"] # Allow assert statements in tests
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = ["-v", "--tb=short", "--strict-markers", "--durations=20"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"postgres: marks tests requiring PostgreSQL (run with '-m postgres')",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.ty.src]
# Exclude template files and generated test projects from type checking
exclude = [
"aegis/templates/**",
"test-project/**",
"my-app/**",
"test-*/**",
"*-test/**",
"demo-*/**",
]