forked from ryudkiss-hue/nyc_data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (125 loc) · 4.73 KB
/
Copy pathpyproject.toml
File metadata and controls
138 lines (125 loc) · 4.73 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
[tool.poetry]
name = "socrata_toolkit"
version = "0.4.0"
description = "NYC DOT Sidewalk Inspection & Management Toolkit"
authors = ["Richard Yudkiss ryudkiss@gmail.com"]
readme = "README.md"
license = "MIT"
packages = [
{ include = "socrata_toolkit", from = "src" },
{ include = "app" },
]
[tool.poetry.dependencies]
python = ">=3.9,<3.15"
python-dotenv = ">=1.0.0"
requests = ">=2.28"
pandas = ">=2.0,<3.0"
pyyaml = ">=6.0"
click = ">=8.0"
numpy = ">=1.24,<3.0"
duckdb = ">=0.9.0"
tenacity = ">=8.0"
apscheduler = ">=3.10"
duckdb-engine = ">=0.9.0"
pyinstaller = {version = ">=6.0", optional = true}
pydantic = ">=2.0"
openpyxl = ">=3.0"
sodapy = {version = ">=2.2.0", optional = true}
pyarrow = {version = ">=14.0", optional = true}
# Optional heavy dependencies
langchain = {version = ">=0.3.30", optional = true}
langchain-community = {version = ">=0.3.27", optional = true}
langchain-openai = {version = ">=0.1.0", optional = true}
ollama = {version = ">=0.1.0", optional = true}
openai = {version = ">=1.0.0", optional = true}
huggingface-hub = {version = ">=0.16.0", optional = true}
spacy = {version = ">=3.5", optional = true}
shapely = {version = "^2.0", optional = true}
geopandas = {version = ">=0.14", optional = true}
matplotlib = {version = ">=3.5", optional = true}
psycopg = {version = ">=3.1", optional = true}
plotly = {version = ">=5.0", optional = true}
weasyprint = {version = ">=60.0", optional = true}
python-pptx = {version = ">=0.6.23", optional = true}
folium = {version = ">=0.14", optional = true}
pydeck = {version = ">=0.8", optional = true}
pymc = {version = ">=5.0", optional = true}
arviz = {version = ">=0.16", optional = true}
prophet = {version = ">=1.1", optional = true}
beautifulsoup4 = {version = ">=4.11", optional = true}
river = {version = ">=0.21", optional = true}
mapie = {version = ">=0.8", optional = true}
dowhy = {version = ">=0.11", optional = true}
sentence-transformers = {version = ">=2.2", optional = true}
numba = {version = ">=0.57", optional = true}
opendp = {version = ">=0.9", optional = true}
agentql = {version = ">=1.19.0", optional = true}
playwright = {version = ">=1.40", optional = true}
python-dateutil = {version = ">=2.8"}
[tool.poetry.extras]
# Default install: pip install -e . (core analyst + Dash workflow)
xlsx = ["openpyxl"]
postgres = ["psycopg"]
# Optional — install only when needed
nlp = ["spacy"]
llm = ["langchain", "langchain-community", "langchain-openai", "ollama", "openai", "huggingface-hub"]
viz = ["matplotlib", "plotly"]
geo = ["shapely", "geopandas"]
reports = ["plotly", "weasyprint"]
ui = ["streamlit"]
mission = ["streamlit", "sodapy", "geopandas", "shapely", "plotly", "pyarrow", "folium", "pydeck", "pymc", "arviz", "prophet", "beautifulsoup4", "river", "mapie", "dowhy", "sentence-transformers", "numba", "opendp", "agentql", "playwright", "openpyxl", "python-pptx"]
pptx = ["python-pptx"]
exe = ["pyinstaller"]
desktop = ["pywebview"]
all = ["openpyxl", "spacy", "shapely", "geopandas", "matplotlib", "plotly", "weasyprint", "psycopg", "pydeck", "python-pptx", "langchain", "langchain-community", "langchain-openai", "ollama", "openai", "huggingface-hub", "pyinstaller"]
[tool.poetry.scripts]
socrata = "socrata_toolkit.core.cli:main"
socrata-fair = "socrata_toolkit.fair.cli:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[dependency-groups]
dev = [
"pytest (>=7.0)",
"pytest-cov (>=4.0)",
"black (>=23.0)",
"ruff (>=0.1.0)",
"isort (>=5.0)",
"coverage (>=7.0)",
"faker (>=20.0)",
"flask (>=3.0)",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: long-running tests",
]
[tool.coverage.run]
# Coverage gates on the testable library layer. The app/ Streamlit views are
# verified via runtime launch (integration), not unit tests, so they are not
# part of the coverage gate.
source = ["src/socrata_toolkit/analyst", "src/socrata_toolkit/core"]
omit = ["*/tests/*"]
[tool.coverage.report]
fail_under = 45
show_missing = true
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B"]
ignore = [
"E501", # line too long (handled by Black/formatter)
"E402", # module import not at top (needed for sys.path manipulation)
"F401", # unused import (re-exports are intentional in __init__ files)
"F403", # star import used (intentional in __init__ re-exports)
"F811", # redefinition of unused name (shadowing is intentional in some cases)
"F841", # local variable assigned but never used
"B007", # loop variable not used in body
"B023", # function definition in loop
"B904", # exception chaining (raise X from e)
"E701", # multiple statements on one line
"E722", # bare except
]
fixable = ["ALL"]
unfixable = []