Skip to content

Commit fd9a385

Browse files
authored
Create pyproject.toml
1 parent ce2ea19 commit fd9a385

File tree

1 file changed

+258
-0
lines changed

1 file changed

+258
-0
lines changed

13426/pyproject.toml

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
[build-system]
2+
requires = ["setuptools>=64"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "<snipped>"
7+
version = "0.1.0"
8+
description = "<snipped>"
9+
readme = "README.md"
10+
requires-python = ">=3.11"
11+
license = "LicenseRef-Proprietary"
12+
authors = [
13+
{name = "<snipped>"}
14+
]
15+
keywords = [<snipped>]
16+
classifiers = [
17+
"Development Status :: 3 - Alpha",
18+
"Environment :: Web Environment",
19+
"Intended Audience :: Developers",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3 :: Only",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
25+
"Topic :: Internet :: WWW/HTTP",
26+
"Topic :: Internet :: WWW/HTTP :: ASGI",
27+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
28+
]
29+
30+
dependencies = [
31+
"aioboto3==15.2.0",
32+
"aiofiles==25.1.0",
33+
"aiohttp==3.13.0",
34+
"bcrypt==5.0.0",
35+
"httpx==0.28.1",
36+
"jmespath==1.0.1",
37+
"langchain-community==0.3.31",
38+
"langchain-mongodb==0.7.1",
39+
"langchain-core==0.3.79",
40+
"langchain-openai==0.3.35",
41+
"langgraph==0.6.10",
42+
"motor==3.7.1", # required by quart-session
43+
"pycountry==24.6.1",
44+
"pydantic-extra-types==2.10.6",
45+
"pymongo==4.15.3",
46+
"python-dotenv==1.1.1",
47+
"python-multipart==0.0.20",
48+
"rcssmin==1.2.2",
49+
"Quart==0.20.0",
50+
"quart-assets==0.1.2",
51+
"quart-compress==0.2.1",
52+
"quart-cors==0.8.0",
53+
"quart-session==3.0.0",
54+
"requests==2.32.5",
55+
"shortuuid==1.0.13",
56+
"starlette==0.48.0",
57+
"uvicorn==0.37.0",
58+
"xsdata==25.7",
59+
"thefuzz==0.22.1",
60+
]
61+
62+
[project.urls]
63+
Homepage = "<snipped>"
64+
Repository = "<snipped>"
65+
66+
[dependency-groups]
67+
dev = [
68+
"beautifulsoup4==4.14.2",
69+
"ipykernel==6.30.1",
70+
"lxml==6.0.2",
71+
"pandas-ods-reader==1.0.2",
72+
]
73+
test = [
74+
"playwright==1.55.0",
75+
"pyflakes==3.4.0",
76+
"pytest==8.4.2",
77+
"pytest-asyncio==1.2.0",
78+
"pytest-httpx==0.35.0",
79+
"pytest-playwright==0.7.1",
80+
"ruff==0.13.3",
81+
"tox>=4.30.3",
82+
"tox-gh-actions>=3.3.0",
83+
"tox-uv>=1.28.0",
84+
]
85+
86+
[tool.setuptools.packages.find]
87+
where = ["."]
88+
include = ["app*"]
89+
exclude = ["tests*", "tmp*", "logs*", "config*", "uploads*", "generated*", "notebooks*", "node_modules*"]
90+
91+
[tool.ruff]
92+
extend-exclude = [
93+
"notebooks/*.ipynb"
94+
]
95+
line-length = 120
96+
target-version = "py313"
97+
98+
[tool.ruff.lint]
99+
select = [
100+
"E", # pycodestyle errors
101+
"W", # pycodestyle warnings
102+
"F", # pyflakes
103+
"I", # isort
104+
"B", # flake8-bugbear
105+
"C4", # flake8-comprehensions
106+
"UP", # pyupgrade
107+
]
108+
ignore = [
109+
"E501", # line too long (handled by formatter)
110+
"B008", # do not perform function calls in argument defaults
111+
"C901", # too complex
112+
]
113+
114+
[tool.ruff.lint.per-file-ignores]
115+
"__init__.py" = ["F401"] # imported but unused
116+
"tests/**/*.py" = ["B011"] # assert False
117+
118+
[tool.ruff.lint.isort]
119+
known-first-party = ["app"]
120+
121+
[tool.ruff.format]
122+
quote-style = "double"
123+
indent-style = "space"
124+
skip-magic-trailing-comma = false
125+
line-ending = "auto"
126+
127+
[tool.pytest.ini_options]
128+
testpaths = ["tests"]
129+
python_files = ["test_*.py"]
130+
python_classes = ["Test*"]
131+
python_functions = ["test_*"]
132+
addopts = [
133+
"--asyncio-mode=auto",
134+
"--screenshot=only-on-failure",
135+
"--tb=short",
136+
"--strict-markers",
137+
"-v",
138+
]
139+
markers = [
140+
"unit: Unit tests",
141+
"integration: Integration tests",
142+
"e2e: End-to-end tests",
143+
"slow: Slow running tests",
144+
"frontend: Frontend component tests",
145+
"asyncio: Async tests",
146+
]
147+
148+
[tool.mypy]
149+
python_version = "3.13"
150+
warn_return_any = true
151+
warn_unused_configs = true
152+
disallow_untyped_defs = false
153+
disallow_incomplete_defs = false
154+
check_untyped_defs = true
155+
no_implicit_optional = true
156+
warn_redundant_casts = true
157+
warn_unused_ignores = true
158+
warn_no_return = true
159+
strict_optional = true
160+
161+
[[tool.mypy.overrides]]
162+
module = [
163+
"quart_assets.*",
164+
"quart_session.*",
165+
"langchain.*",
166+
"langgraph.*",
167+
"playwright.*",
168+
]
169+
ignore_missing_imports = true
170+
171+
[tool.coverage.run]
172+
source = ["app"]
173+
omit = [
174+
"*/tests/*",
175+
"*/test_*.py",
176+
"*/__init__.py",
177+
"*/conftest.py",
178+
]
179+
180+
[tool.coverage.report]
181+
exclude_lines = [
182+
"pragma: no cover",
183+
"def __repr__",
184+
"raise AssertionError",
185+
"raise NotImplementedError",
186+
"if __name__ == .__main__.:",
187+
"if TYPE_CHECKING:",
188+
"class .*\\bProtocol\\):",
189+
"@(abc\\.)?abstractmethod",
190+
]
191+
192+
[tool.tox]
193+
requires = ["tox>=4.20"]
194+
env_list = ["py313", "py312", "frontend", "lint", "unit"]
195+
196+
[tool.tox.gh-actions]
197+
python = """
198+
3.12: py312, frontend, lint, unit
199+
3.13: py313, frontend, lint, unit
200+
"""
201+
202+
[tool.tox.env_run_base]
203+
runner = "uv-venv-lock-runner"
204+
description = "Run test under {base_python}"
205+
dependency_groups = ["test"]
206+
passenv = [
207+
"MONGODB_URI"
208+
]
209+
allowlist_externals = ["pytest"]
210+
commands = [
211+
["pytest", { replace = "posargs", default = ["tests/", "--tb=short", "-vs"], extend = true } ]
212+
]
213+
214+
[tool.tox.env.unit]
215+
description = "Run unit tests"
216+
dependency_groups = ["dev", "test"]
217+
passenv = [
218+
"MONGODB_URI"
219+
]
220+
allowlist_externals = ["pytest"]
221+
commands = [
222+
["pytest", { replace = "posargs", default = ["tests/", "--tb=short", "-m", "not frontend", "-vs"], extend = true } ]
223+
]
224+
225+
[tool.tox.env.frontend]
226+
description = "Run frontend tests using Playwright"
227+
dependency_groups = ["dev", "test"]
228+
passenv = [
229+
"CLIENT_ID",
230+
"CLIENT_SECRET",
231+
"PLAYWRIGHT_HEADLESS",
232+
"MONGODB_URI"
233+
]
234+
allowlist_externals = ["playwright", "pytest"]
235+
commands = [
236+
["python", "-m", "quart", "--app=app.main", "assets", "clean"],
237+
["python", "-m", "quart", "--app=app.main", "assets", "build"],
238+
["playwright", "install", "chromium-headless-shell", "--with-deps", "--only-shell"],
239+
["pytest", { replace = "posargs", default = ["tests/frontend/", "--tb=short", "-m", "frontend", "-vs"], extend = true } ]
240+
]
241+
242+
[tool.tox.env.format]
243+
allowlist_externals = ["ruff"]
244+
commands = [
245+
["ruff", "check", "--fix", { replace = "posargs", default = ["app/", "scripts/", "tests/"], extend = true } ],
246+
["ruff", "format", { replace = "posargs", default = ["app/", "scripts/", "tests/"], extend = true } ]
247+
]
248+
249+
[tool.tox.env.lint]
250+
allowlist_externals = ["ruff"]
251+
commands = [
252+
["ruff", "check", "--diff", { replace = "posargs", default = ["app/", "scripts/", "tests/"], extend = true } ],
253+
["ruff", "format", "--check", { replace = "posargs", default = ["app/", "scripts/", "tests/"], extend = true } ]
254+
]
255+
256+
[tool.uv]
257+
package = false
258+
required-version = '>=0.8.20'

0 commit comments

Comments
 (0)