-
Notifications
You must be signed in to change notification settings - Fork 176
Expand file tree
/
Copy pathpyproject.toml
More file actions
316 lines (296 loc) · 9.28 KB
/
pyproject.toml
File metadata and controls
316 lines (296 loc) · 9.28 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
[build-system]
requires = ["flit_core >=3.11,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "apache-hamilton"
version = "1.89.0" # NOTE: keep this in sync with hamilton/version.py
# TODO: flip back to dynamic once hamilton version is a string. Flit doesn't handle tuples.
# dynamic = ["version"]
description = "Apache Hamilton (incubating) is a lightweight Python library for directed acyclic graphs (DAGs) of transformations. Your DAG is **portable**; it runs anywhere Python runs, whether it's a script, notebook, Airflow pipeline, FastAPI server, etc. Your DAG is **expressive**; Apache Hamilton has extensive features to define and modify the execution of a DAG (e.g., data validation, experiment tracking, remote execution)."
readme = "README.md"
requires-python = ">=3.10.1, <4"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE", "DISCLAIMER"]
keywords = ["hamilton"]
authors = [
{ name = "Stefan Krawczyk", email = "stefank@cs.stanford.edu" },
{ name = "Elijah ben Izzy", email = "elijah@dagworks.io" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14"
]
dependencies = [
"numpy",
"pandas",
"typing_extensions > 4.0.0",
"typing_inspect",
]
[project.optional-dependencies]
cli = ["typer>=0.16.0"]
dask = ["dask[complete]"] # commonly you'll want everything.
dask-array = ["dask[array]"]
dask-dataframe = ["dask[dataframe]"]
dask-diagnostics = ["dask[diagnostics]"]
dask-distributed = ["dask[distributed]"]
datadog = ["ddtrace<3.0"] # Temporary pin until h_ddog.py import is fixed for >3.0 version
diskcache = ["diskcache"]
experiments = [
"fastapi",
"fastui",
"uvicorn",
]
lsp = ["sf-hamilton-lsp"]
openlineage = ["openlineage-python"]
pandera = ["pandera"]
pydantic = ["pydantic>=2.0"]
pyspark = [
# we have to run these dependencies because Spark does not check to ensure the right target was called
"pyspark[pandas_on_spark,sql] >= 4.0.0",
]
ray = ["ray>=2.0.0; python_version < '3.14'", "pyarrow"]
rich = ["rich"]
sdk = ["sf-hamilton-sdk"]
slack = ["slack-sdk"]
mcp = ["fastmcp>=3.0.0,<4"]
tqdm = ["tqdm"]
ui = ["sf-hamilton-ui"]
# vaex -- on >=py3.11 only core part available https://github.com/vaexio/vaex/pull/2331#issuecomment-2437198176
vaex = [
"vaex; python_version == '3.10'"
]
visualization = ["graphviz", "networkx"]
[dependency-groups]
dev = [
"prek",
"ruff==0.15.0", # this should match `.pre-commit-config.yaml`
]
test = [
"connectorx; python_version < '3.14'",
"dask[complete]",
"dask-expr>=1.1.14",
"datasets>=2.18.0", # huggingface datasets -- https://github.com/huggingface/datasets/issues/6737#issuecomment-2107336816
"diskcache",
"dlt",
"fsspec",
"graphviz",
"kaleido; python_version < '3.14'",
"kedro; python_version < '3.14'",
"lancedb; python_version < '3.14'",
"lightgbm; python_version < '3.14'",
"lxml",
"lz4",
"matplotlib",
"mlflow; python_version <= '3.13'",
"networkx",
"openpyxl", # for excel data loader
"pandera[dask]",
"plotly; python_version < '3.14'",
"polars; python_version < '3.14'",
"pyarrow",
"pydantic >=2.0",
"pyreadstat; python_version < '3.14'", # for SPSS data loader
"pytest",
"pytest-asyncio",
"pytest-cov",
"PyYAML",
"scikit-learn",
"sqlalchemy[asyncio]",
"typer>=0.16.0",
"xgboost; python_version < '3.14'",
"xlsx2csv", # for excel data loader
"xlsxwriter", # Excel export requires 'xlsxwriter'
]
docs = [
{include-group = "dev"},
"alabaster",
"commonmark",
"dask-expr>=1.1.14",
"dask[distributed]",
"ddtrace<3.0",
"diskcache",
# required for all the plugins
"dlt",
"furo",
"gitpython", # Required for parsing git info for generation of data-adapter docs
"grpcio-status",
"lightgbm",
"lxml",
"lz4",
"mlflow",
"mock",
"myst-nb",
"narwhals",
"numpy",
"packaging",
"pandera",
"pillow",
"polars",
"pyarrow >= 1.0.0",
"pydantic >= 2.0",
"pyspark",
"openlineage-python",
"PyYAML",
"ray; python_version < '3.14'",
"readthedocs-sphinx-ext",
"recommonmark",
"scikit-learn",
"slack-sdk",
"sphinx",
"sphinx-autobuild",
"sphinx-llms-txt",
"sphinx-rtd-theme",
"sphinx-simplepdf",
"sphinx-sitemap",
"sphinxcontrib-mermaid",
"tqdm",
"xgboost",
]
[project.scripts]
h_experiments = "hamilton.plugins.h_experiments.__main__:main"
hamilton = "hamilton.cli.__main__:cli"
hamilton-admin-build-ui = "ui.admin:build_ui"
hamilton-admin-build-and-publish = "ui.admin:build_and_publish"
hamilton-mcp = "hamilton.plugins.h_mcp.__main__:main"
hamilton-disable-autoload-extensions = "hamilton.registry:config_disable_autoload"
hamilton-enable-autoload-extensions = "hamilton.registry:config_enable_autoload"
[project.urls]
homepage = "https://www.tryhamilton.dev/"
documentation = "https://hamilton.apache.org/en/latest/"
changelog = "https://github.com/apache/hamilton/releases"
issues = "https://github.com/apache/hamilton/issues"
source = "https://github.com/apache/hamilton"
slack = "https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g"
#[tool.mypy]
#exclude = []
#[tool.pytest.ini_options]
#pythonpath = []
#testpaths = []
[tool.ruff]
line-length = 100
target-version = "py310" # Must include only the earliest supported version
[tool.ruff.format]
docstring-code-format = false
exclude = [
"docs/*",
]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear rules
# "C4", # Helps you write better list/set/dict comprehensions.
"E", # pycodestyle errors
"F", # pyflakes
# "FA", # Verifies files use from __future__ import annotations if a type is used in the module that can be rewritten using PEP 563.
"FURB",# Refurbishing and modernizing Python codebases
# "G", # flake8-logging-format rules
"I", # isort
"ISC", # Encourage correct string literal concatenation.
"LOG", # Checks for issues using the standard library logging module.
# "N", # Check PEP-8 naming conventions
# "NPY", # Linting rules for numpy
# "PERF",# Linting rules for performance
# "PIE", # flake8-pie rules
# "PT", # flake8-pytest-style rules
"PT006",
"PT007",
# "PYI", # Linting rules for type annotations.
"Q", # Linting rules for quites
# "RUF", # Unused noqa directive
# "SIM", # Linting rules for simplicity
# "T20", # Check for Print statements in python files.
"TC", # Move type-only imports to a type-checking block.
"TID", # Helps you write tidier imports.
# "TRY", # Prevent exception handling anti-patterns
"UP006", # pyupgrade
"UP045", # pyupgrade
"W", # pycodestyle warnings
]
extend-ignore = [
"ISC001", # Checks for implicitly concatenated strings on a single line.
"T201",
"TRY003",
"E203", # whitespace before ':'
"E402", # module level import not at top of file
"E501", # line too long
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
"F821", # undefined name
"W605", # invalid escape sequence
"TC001" # TYPE_CHECKING block for first-class imports -- this is a bit ugly for the hamilton codebase
]
exclude = [
"docs/*",
"**/business_logic.py",
]
[tool.ruff.lint.isort]
known-local-folder = ["tests"]
known-first-party = ["hamilton*"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
]
"__init__.py" = ["F401"]
[tool.setuptools.dynamic]
version = { attr = "hamilton.__version__" }
[tool.setuptools.packages.find]
include = ["hamilton", "hamilton.*"]
exclude = ["*tests*"]
[tool.setuptools.package-data]
hamilton = ["*.json", "*.md", "*.txt"]
[tool.flit.module]
name = "hamilton"
[tool.flit.sdist]
include = [
"LICENSE",
"NOTICE",
"DISCLAIMER",
"scripts/**",
]
exclude = [
".git/**",
".github/**",
".gitignore",
"**/.gitignore",
"**/.DS_Store",
"docs/**",
"**/__pycache__/**",
"**/*.pyc",
"dist/**",
"build/**",
"*.egg-info/**",
".venv/**",
"venv/**",
".idea/**",
".vscode/**",
".coverage",
"htmlcov/**",
".tox/**",
".pytest_cache/**",
"ui/**",
"contrib/**",
"dev_tools/**",
]