Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
61f3174
Remove `setup.py`
cswartzvi Aug 10, 2025
0dafc37
Remove requirements files
cswartzvi Aug 10, 2025
15b7e75
Move top-level pngs to `assets`
cswartzvi Aug 10, 2025
b6b7ca1
Move misc MD files to `wirteups`
cswartzvi Aug 10, 2025
9f47900
Move `build_conda.sh` to `scripts`
cswartzvi Aug 10, 2025
3fd27fe
Move `README-DOCS` to `docs`
cswartzvi Aug 10, 2025
fa0496a
Remove legacy style config (us `ruff` instead)
cswartzvi Aug 10, 2025
2290954
Utilize dependency groups (PEP 735) for internal dependencies
cswartzvi Aug 13, 2025
644f3ab
Bump min python to 3.8.1 for uv's universal solver
cswartzvi Aug 14, 2025
5ba470c
Remove flake8 pre-commit
cswartzvi Aug 16, 2025
cb306bd
Add `Selector` to `get_type_hints` namespace
cswartzvi Aug 16, 2025
634cd6b
Fix Python 3.0 dependency on `libconv`
cswartzvi Aug 16, 2025
7b1fd60
Fix formatting
cswartzvi Aug 16, 2025
fd4a47a
Fix Python 3.0 dependency on `libconv-hook`
cswartzvi Aug 16, 2025
2796b6b
Install `build-essential` during action
cswartzvi Aug 17, 2025
4b07177
Only add `Selector` to `PolarsSpreadsheetWriter` type hint check in P…
cswartzvi Aug 17, 2025
6e78f8b
Use `docs` dependency group
cswartzvi Aug 20, 2025
f056f59
Exclude `docs/README.md` from the docs
cswartzvi Aug 20, 2025
38c2884
Add `zlib1g-dev` action Linux dependency
cswartzvi Aug 22, 2025
1766f57
Add `libiconv-dev` as linux action dependency
cswartzvi Aug 24, 2025
aad271c
Pin ; remove build tools
cswartzvi Aug 24, 2025
06825ad
Fix python version in `pyreadstat` pin
cswartzvi Aug 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .flake8

This file was deleted.

26 changes: 13 additions & 13 deletions .github/workflows/hamilton-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,54 +63,54 @@ jobs:
- name: Check linting with pre-commit
if: ${{ runner.os == 'Linux' }}
run: |
uv sync --extra dev
uv sync --dev
uv run pre-commit install
uv run pre-commit run --all-files

- name: Test hamilton main package
run: |
uv sync --extra test
uv sync --group test
uv pip install "kaleido<0.4.0"
uv run pytest tests/ --cov=hamilton --ignore tests/integrations


- name: Test integrations
if: ${{ matrix.python-version == '3.9' }}
run: |
uv sync --extra test --extra pandera
uv sync --group test --extra pandera
uv pip install -r tests/integrations/pandera/requirements.txt
uv pip install dask-expr
uv run pytest tests/integrations

- name: Test integrations
if: ${{ matrix.python-version != '3.9' }}
run: |
uv sync --extra test --extra pandera
uv sync --group test --extra pandera
uv pip install -r tests/integrations/pandera/requirements.txt
uv run pytest tests/integrations

- name: Test pandas
run: |
uv sync --extra test
uv sync --group test
uv run pytest plugin_tests/h_pandas

- name: Test polars
run: |
uv sync --extra test
uv sync --group test
uv pip install polars
uv run pytest plugin_tests/h_polars

- name: Test narwhals
run: |
uv sync --extra test
uv sync --group test
uv pip install polars pandas narwhals
uv run pytest plugin_tests/h_narwhals

- name: Test dask
# Dask supports >= py3.9
if: ${{ matrix.python-version != '3.8' }}
run: |
uv sync --extra test --extra dask
uv sync --group test --extra dask
uv run pytest plugin_tests/h_dask

- name: Test ray
Expand All @@ -119,7 +119,7 @@ jobs:
env:
RAY_ENABLE_UV_RUN_RUNTIME_ENV: 0 # https://github.com/ray-project/ray/issues/53848
run: |
uv sync --extra test --extra ray
uv sync --group test --extra ray
uv run pytest plugin_tests/h_ray

- name: Test pyspark
Expand All @@ -129,7 +129,7 @@ jobs:
PYSPARK_SUBMIT_ARGS: "--conf spark.sql.ansi.enabled=false pyspark-shell"
run: |
sudo apt-get install --no-install-recommends --yes default-jre
uv sync --extra test --extra pyspark
uv sync --group test --extra pyspark
uv pip install 'numpy<2' 'pyspark[connect]' 'grpcio'
uv pip install --no-cache --reinstall --strict 'grpcio-status >= 1.48.1'
uv run pytest plugin_tests/h_spark
Expand All @@ -140,7 +140,7 @@ jobs:
env:
PYSPARK_SUBMIT_ARGS: "--conf spark.sql.ansi.enabled=false pyspark-shell"
run: |
uv sync --extra test --extra pyspark
uv sync --group test --extra pyspark
uv pip install 'numpy<2' 'pyspark[connect]' 'grpcio'
uv pip install --no-cache --reinstall --strict 'grpcio-status >= 1.48.1'
uv run pytest plugin_tests/h_spark
Expand All @@ -150,14 +150,14 @@ jobs:
if: ${{ runner.os == 'Linux' && (matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10') }}
run: |
sudo apt-get install --no-install-recommends --yes libpcre3-dev cargo
uv sync --extra test --extra vaex
uv sync --group test --extra vaex
uv pip install "numpy<2"
uv run pytest plugin_tests/h_vaex

- name: Test vaex
# Vaex supports <= py3.10 and numpy<2
if: ${{ runner.os != 'Linux' && (matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10') }}
run: |
uv sync --extra test --extra vaex
uv sync --group test --extra vaex
uv pip install "numpy<2"
uv run pytest plugin_tests/h_vaex
2 changes: 1 addition & 1 deletion .github/workflows/sphinx-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install Sphinx and dependencies
run: |
python -m pip install --upgrade --no-cache-dir sphinx sphinx-rtd-theme sphinx-simplepdf
python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir .[docs]
python -m pip install --group docs --upgrade --upgrade-strategy only-if-needed --no-cache-dir

- name: Build Sphinx documentation
working-directory: ./docs
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ repos:
- id: requirements-txt-fixer
# valid python file
- id: check-ast
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: local
hooks:
- id: validate-example-notebooks
Expand Down
23 changes: 0 additions & 23 deletions .style.yapf

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include requirements.txt
include requirements-test.txt
include LICENSE
include *.md
include NOTICE
Expand Down
File renamed without changes
Binary file added assets/dag_example_module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file removed dag_example_module.png
Binary file not shown.
2 changes: 1 addition & 1 deletion README-DOCS.md → docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Instructions for managing documentation on read the docs.
To build locally, you need to run the following -- make sure you're in the root of the repo:

```bash
pip install .[docs]
pip install --group docs
```
and then one of the following to build and view the documents:
```bash
Expand Down
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
["simplepdf", "text/plain", 100],
]

exclude_patterns = [
'_build',
'Thumbs.db',
'.DS_Store',
'README.md',
]

# for the sitemap extension ---
# check if the current commit is tagged as a release (vX.Y.Z) and set the version
Expand Down
121 changes: 61 additions & 60 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "sf-hamilton"
dynamic = ["version"]
description = "Hamilton, the micro-framework for creating dataframes."
readme = "README.md"
requires-python = ">=3.8, <4"
requires-python = ">=3.8.1, <4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up, that this PR requires using pip 25.1 which added installing groups, but also dropped support for python 3.8, so we should work towards droppng support for py38.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jernejfrank, thanks for taking a look. I completely agree with you regarding dropping py38 support. Originally, I was going to include that in this PR, but it started to feel like mission creep. Changing the minimum to 3.8.1 was just enough to get uv sync working reliably without using prereleases (which was also causing issues).

I am going to open another PR after this one that drops py38 support - provided there are no objection from the other members of the PMC team.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me, also feel it is better to separate it out into another PR!

license = {text = "Apache-2.0"}
keywords = ["hamilton"]
authors = [
Expand Down Expand Up @@ -41,64 +41,14 @@ 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
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>=1.1.14; python_version >= '3.10'", # Bugfix only available after py3.10 https://github.com/dask/dask-expr/pull/1150
"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==1.0.1", # read the docs pins
"myst-nb",
"narwhals",
"numpy < 2.0.0",
"packaging",
"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 = [
Expand All @@ -109,6 +59,21 @@ ray = ["ray>=2.0.0", "pyarrow"]
rich = ["rich"]
sdk = ["sf-hamilton-sdk"]
slack = ["slack-sdk"]

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 = [
"pre-commit",
"ruff==0.5.7", # this should match `.pre-commit-config.yaml`
]
test = [
"connectorx<=0.3.2; python_version=='3.8'",
"connectorx; python_version!='3.8'",
Expand All @@ -134,7 +99,8 @@ test = [
"polars",
"pyarrow",
"pydantic >=2.0",
"pyreadstat", # for SPSS data loader
"pyreadstat<1.2.8; python_version <= '3.9'", # for SPSS data loader
"pyreadstat; python_version > '3.9'", # for SPSS data loader
"pytest",
"pytest-asyncio",
"pytest-cov",
Expand All @@ -147,14 +113,49 @@ test = [
"xlsx2csv", # for excel data loader
"xlsxwriter", # Excel export requires 'xlsxwriter'
]
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"]
docs = [
{include-group = "dev"},
"alabaster>=0.7,<0.8,!=0.7.5", # read the docs pins
"commonmark==0.9.1", # read the docs pins
"dask-expr>=1.1.14; python_version >= '3.10'", # Bugfix only available after py3.10 https://github.com/dask/dask-expr/pull/1150
"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==1.0.1", # read the docs pins
"myst-nb",
"narwhals",
"numpy < 2.0.0",
"packaging",
"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",
]

[project.entry-points.console_scripts]
h_experiments = "hamilton.plugins.h_experiments.__main__:main"
Expand Down
File renamed without changes.
Loading
Loading