-
Notifications
You must be signed in to change notification settings - Fork 124
/
pyproject.toml
251 lines (237 loc) · 7.08 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools>=72.1"]
build-backend = "setuptools.build_meta"
[project]
name = "sf-hamilton"
dynamic = ["version"]
description = "Hamilton, the micro-framework for creating dataframes."
readme = "README.md"
requires-python = ">=3.8, <4"
license = {text = "BSD-3-Clause"}
keywords = ["hamilton"]
authors = [
{ name = "Stefan Krawczyk", email = "stefan@dagworks.io" },
{ name = "Elijah ben Izzy", email = "elijah@dagworks.io" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"numpy",
"pandas",
"typing_extensions > 4.0.0",
"typing_inspect",
]
[project.optional-dependencies]
cli = ["typer"]
dask = ["dask[complete]"] # commonly you'll want everything.
dask-array = ["dask[array]"]
dask-core = ["dask-core"]
dask-dataframe = ["dask[dataframe]"]
dask-diagnostics = ["dask[diagnostics]"]
dask-distributed = ["dask[distributed]"]
datadog = ["ddtrace"]
dev = [
"pre-commit",
"ruff==0.5.7", # this should match `.pre-commit-config.yaml`
]
diskcache = ["diskcache"]
docs = [
"sf-hamilton[dev]",
"alabaster>=0.7,<0.8,!=0.7.5", # read the docs pins
"commonmark==0.9.1", # read the docs pins
"dask-expr",
"dask[distributed]",
"ddtrace",
"diskcache",
# required for all the plugins
"dlt",
# furo -- install from main for now until the next release is out:
"furo @ git+https://github.com/pradyunsg/furo@main",
"gitpython", # Required for parsing git info for generation of data-adapter docs
"grpcio-status",
"lightgbm",
"lxml",
"lz4",
"mlflow",
"mock==1.0.1", # read the docs pins
"myst-nb",
"narwhals",
"numpy < 2.0.0",
"pandera",
"pillow",
"polars",
"pyarrow >= 1.0.0",
"pydantic >=2.0",
"pyspark",
"openlineage-python",
"PyYAML",
"ray",
"readthedocs-sphinx-ext<2.3", # read the docs pins
"recommonmark==0.5.0", # read the docs pins
"scikit-learn",
"slack-sdk",
"sphinx", # unpinned because myst-parser doesn't break anymore
"sphinx-autobuild",
"sphinx-rtd-theme", # read the docs pins
"sphinx-simplepdf",
"sphinx-sitemap",
"tqdm",
"xgboost",
]
experiments = [
"fastapi",
"fastui",
"uvicorn",
]
lsp = ["sf-hamilton-lsp"]
openlineage = ["openlineage-python"]
packaging = [
"build",
]
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]"
]
ray = ["ray>=2.0.0", "pyarrow"]
sdk = ["sf-hamilton-sdk"]
slack = ["slack-sdk"]
test = [
"connectorx",
"dask",
"dask-expr; python_version >= '3.9'",
"datasets", # huggingface datasets
"diskcache",
"dlt",
"fsspec",
"graphviz",
"kaleido",
"kedro",
"lancedb",
"lightgbm",
"lxml",
"lz4",
"matplotlib",
"mlflow",
"networkx",
"openpyxl", # for excel data loader
"pandera",
"plotly",
"polars",
"pyarrow",
"pydantic >=2.0",
"pyreadstat", # for SPSS data loader
"pytest",
"pytest-asyncio",
"pytest-cov",
"PyYAML",
"scikit-learn",
"sqlalchemy==1.4.49; python_version == '3.7.*'",
"sqlalchemy; python_version >= '3.8'",
"typer",
"xgboost",
"xlsx2csv", # for excel data loader
"xlsxwriter", # Excel export requires 'xlsxwriter'
]
tqdm = ["tqdm"]
ui = ["sf-hamilton-ui"]
vaex = ["vaex"]
visualization = ["graphviz", "networkx"]
[project.entry-points.console_scripts]
h_experiments = "hamilton.plugins.h_experiments.__main__:main"
hamilton = "hamilton.cli.__main__:cli"
hamilton-admin-build-ui = "hamilton.admin:build_ui"
hamilton-admin-build-and-publish = "hamilton.admin:build_and_publish"
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.dagworks.io/en/latest/"
changelog = "https://github.com/DAGWorks-Inc/hamilton/releases"
issues = "https://github.com/dagworks-inc/hamilton/issues"
source = "https://github.com/dagworks-inc/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 = "py38" # 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
# "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.
"TCH", # Move type-only imports to a type-checking block.
"TID", # Helps you write tidier imports.
# "TRY", # Prevent exception handling anti-patterns
# "UP", # 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
"W605", # invalid escape sequence
"TCH001" # 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"]