| # 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"] |
| 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", |
| "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/**", |
| ] |