-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (117 loc) · 3.36 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (117 loc) · 3.36 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
[project]
name = "nl-sql"
version = "0.1.0"
description = "Portfolio demo: NL→SQL assistant with measurable accuracy, schema-RAG, safety guards"
readme = "README.md"
requires-python = ">=3.13,<3.14"
authors = [{ name = "Julia Edomskikh" }]
license = { text = "MIT" }
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.32",
"pydantic>=2.9",
"pydantic-settings>=2.6",
"openai>=1.55",
"httpx>=0.27",
"python-dotenv>=1.0",
"sqlalchemy>=2.0",
"psycopg[binary]>=3.2",
"sqlglot>=25.0",
"requests>=2.32",
"chromadb>=0.5",
"gdown>=5.2",
"langgraph>=0.2",
"diskcache>=5.6",
"streamlit>=1.40",
"plotly>=5.24",
"pandas>=2.2",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3",
"pytest-asyncio>=0.24",
"pytest-cov>=5.0",
"respx>=0.21",
"ruff>=0.7",
"mypy>=1.13",
"types-requests",
]
ui = [
"streamlit>=1.40",
"plotly>=5.24",
"pandas>=2.2",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/nl_sql"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers --strict-config"
asyncio_mode = "auto"
filterwarnings = [
"error",
# langgraph 0.6.x emits this on import via langchain_core.cache.base —
# upstream issue, not actionable from our code.
"default::langchain_core._api.deprecation.LangChainPendingDeprecationWarning",
]
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["src", "tests", "app"]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # bugbear
"SIM", # simplify
"RUF", # ruff-specific
"PT", # pytest
"RET", # return
"PIE", # misc
]
ignore = [
"E501", # line length handled by formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101"]
[tool.mypy]
python_version = "3.13"
strict = true
# app/ resolves its sibling modules (i18n, theme, components.*) with app/ on the
# path — same as the Streamlit runtime, where app/ is the working dir.
mypy_path = ["src", "app"]
explicit_package_bases = true
disallow_untyped_decorators = false # FastAPI decorators are fine
# Frozen legacy voting scripts (known compare-defect) and a rough proof-of-concept
# are not type-maintained.
exclude = ["scripts/archive/", "scripts/wider_sc_poc.py"]
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = ["sqlglot.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["chromadb.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["diskcache.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["plotly.*", "streamlit", "pandas", "pandas.*", "gdown", "pyarrow.*"]
ignore_missing_imports = true
# Unofficial Perplexity client (github.com/helallao/perplexity-ai): optional
# local install, absent in CI — silence both import-untyped and import-not-found.
[[tool.mypy.overrides]]
module = ["perplexity"]
ignore_missing_imports = true
# GPU-only training deps for scripts/autotune/train_qlora.py: installed on the
# rented GPU box only (requirements_gpu.txt), never on the dev machine or CI.
[[tool.mypy.overrides]]
module = ["unsloth.*", "trl.*", "datasets.*"]
ignore_missing_imports = true