Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/workflows/hamilton-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ jobs:
- name: Test hamilton main package
run: |
uv sync --group test
uv pip install "kaleido<0.4.0"
uv run pytest tests/ --cov=hamilton --ignore tests/integrations


Expand Down
2 changes: 1 addition & 1 deletion hamilton/plugins/plotly_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PlotlyStaticWriter(DataSaver):
height: int | None = None
scale: int | float | None = None
validate: bool = True
engine: str = "auto"
engine: str | None = None

def _get_saving_kwargs(self) -> dict:
kwargs = {}
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ test = [
"dlt",
"fsspec",
"graphviz",
"kaleido; python_version < '3.14'",
"kaleido",
"kedro; python_version < '3.14'",
"lancedb; python_version < '3.14'",
"lightgbm; python_version < '3.14'",
Expand All @@ -119,7 +119,7 @@ test = [
"networkx",
"openpyxl", # for excel data loader
"pandera[dask]",
"plotly; python_version < '3.14'",
"plotly",
"polars; python_version < '3.14'",
"pyarrow",
"pydantic >=2.0",
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"plugins/test_polars_extensions.py",
"plugins/test_polars_lazyframe_extensions.py",
"resources/narwhals_example.py",
# plotly - no Python 3.14 support yet
"plugins/test_plotly_extensions.py",
# xgboost - no Python 3.14 support yet
"plugins/test_xgboost_extensions.py",
# lightgbm - no Python 3.14 support yet
Expand Down
8 changes: 8 additions & 0 deletions tests/plugins/test_plotly_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,20 @@ def test_plotly_static_writer(figure: go.Figure, tmp_path: pathlib.Path) -> None
file_path = tmp_path / "figure.png"

writer = PlotlyStaticWriter(path=file_path)
assert "engine" not in writer._get_saving_kwargs()

metadata = writer.save_data(figure)

assert file_path.exists()
assert metadata[FILE_METADATA]["path"] == str(file_path)


def test_plotly_static_writer_preserves_explicit_engine(tmp_path: pathlib.Path) -> None:
writer = PlotlyStaticWriter(path=tmp_path / "figure.png", engine="kaleido")

assert writer._get_saving_kwargs()["engine"] == "kaleido"


def test_plotly_interactive_writer(figure: go.Figure, tmp_path: pathlib.Path) -> None:
file_path = tmp_path / "figure.html"

Expand Down
Loading