-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
173 lines (163 loc) · 4.25 KB
/
Copy pathpyproject.toml
File metadata and controls
173 lines (163 loc) · 4.25 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
[project]
name = "ml-analytics-tools"
version = "0.8.1"
description = "Tools for ML projects and data management"
readme = "README.md"
requires-python = ">=3.11"
# Core dependencies: the data connectors (Snowflake, Redshift, S3, Google
# Sheets, Slack) and their light support libs. The heavy ML/modeling stack
# (mlflow, scikit-learn, catboost, shap, lifelines, plotting) is intentionally
# NOT here — it pins numpy hard and conflicts with host environments such as
# Databricks. Install it via the `[modeling]` extra when you need ModelManager
# or ml_analytics.model_tools.
dependencies = [
"boto3>=1.37.24",
"ddtrace>=3.4.1",
"dotenv>=0.9.9",
"duckdb>=1.4.1",
"google-api-python-client>=2.150.0",
"google-auth>=2.35.0",
"google-auth-httplib2>=0.2.0",
"google-auth-oauthlib>=1.2.0",
"ipykernel>=6.29.5",
"ipywidgets>=8.1.8",
"pip>=25.3",
"polars>=1.30.0",
"pytest>=8.3.5",
"pyyaml>=6.0.2",
"redshift-connector>=2.1.9",
"ruff>=0.11.4",
"schedule>=1.2.2",
"setuptools>=42.0.0",
"slack-sdk>=3.27.0",
"snowflake-connector-python[pandas,secure-local-storage]>=4.6.0",
]
[project.optional-dependencies]
# ML/modeling stack used by ModelManager (mlflow) and ml_analytics.model_tools
# (scikit-learn, catboost, shap, lifelines, plotting). Kept optional because
# these pin numpy and conflict with host environments. Version floors are `>=`
# (not `==`) so the resolver can pick numpy-compatible builds.
# pip install ml-analytics-tools[modeling]
modeling = [
"mlflow>=3.10.1",
"mlflow[auth]>=3.10.1",
"scikit-learn>=1.5.2",
"catboost>=1.2.8",
"shap>=0.47.2",
"lifelines>=0.30.3",
"seaborn>=0.13.2",
]
# Local development against a remote Databricks cluster/serverless.
# Do NOT install on a Databricks cluster: databricks-connect shadows the
# runtime's built-in PySpark and breaks notebook Spark sessions. On Databricks,
# get_spark() reuses the active session and never needs this.
# pip install ml-analytics-tools[databricks]
databricks = [
"databricks-connect>=15.1",
]
[project.scripts]
ml-analytics-auth = "ml_analytics.cli:aws_auth_command"
ml-analytics-sso = "ml_analytics.cli:aws_sso_command"
ml-analytics-tunnel = "ml_analytics.tunnel_manager:main"
[dependency-groups]
dev = [
"pytest>=8.3.4",
"mypy>=1.14.1",
"ruff>=0.9.4",
]
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 120
indent-width = 4
#target-version = "py313" TODO: parametrize
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
ignore = [
"INP001" # File `docs/conf.py` is part of an implicit namespace package. Add an `__init__.py`.
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false
docstring-code-line-length = "dynamic"
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = { find = { include = ["ml_analytics"], exclude = ["img", "img.*"] } }
[tool.mypy]
python_version = "3.11"
show_error_codes = true
show_error_context = true
pretty = true
warn_unused_ignores = true
warn_unused_configs = true
ignore_missing_imports = true
warn_unreachable = true
warn_redundant_casts = true
check_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_any_generics = true
disallow_subclassing_any = false
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]