Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower minimum pyarrow dependency back to v10 #368

Merged
merged 5 commits into from
Jul 25, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
chrome-version: stable
- name: Install ChromeDriver
run: |
pip install chromedriver-binary-auto==0.2.6
pip install chromedriver-binary-auto
- name: Download vegafusion wheel
uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # pin@v2
with:
Expand Down
362 changes: 183 additions & 179 deletions python/vegafusion-jupyter/conda-linux-64-cp38.lock

Large diffs are not rendered by default.

348 changes: 175 additions & 173 deletions python/vegafusion-jupyter/conda-osx-64-cp38.lock

Large diffs are not rendered by default.

351 changes: 176 additions & 175 deletions python/vegafusion-jupyter/conda-win-64-cp38.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion python/vegafusion-jupyter/dev-environment-3.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ dependencies:
- flaky
- click
- toml
- pyarrow
- pyarrow=10.0.1
- python-duckdb >=0.7.1
- polars
4 changes: 3 additions & 1 deletion python/vegafusion/tests/test_transformed_data.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from pathlib import Path

import pandas as pd
import pytz
import pyarrow as pa
import pytest
from altair.utils.execeval import eval_block
import vegafusion as vf
from vega_datasets import data
import polars as pl
import altair as alt

pa_major_minor = tuple((int(v) for v in pa.__version__.split(".")[:2]))

here = Path(__file__).parent
altair_mocks_dir = here / "altair_mocks"
Expand Down Expand Up @@ -220,6 +221,7 @@ def test_transformed_data_exclude():
assert "mean_wheat" in datasets[1]


@pytest.mark.skipif(pa_major_minor < (11, 0), reason="pyarrow 11+ required")
@pytest.mark.parametrize("connection", get_connections())
def test_gh_286(connection):
# https://github.com/hex-inc/vegafusion/issues/286
Expand Down
5 changes: 2 additions & 3 deletions python/vegafusion/vegafusion/dataset/dataframe.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from abc import ABC, abstractmethod
import pyarrow as pa
from vegafusion.proto.datafusion_pb2 import LogicalExprNode
from pyarrow.interchange.dataframe import _PyArrowDataFrame

from typing import Optional, List, Literal, Union
from typing import Optional, List, Literal, Union, Any


class DataFrameOperationNotSupportedError(RuntimeError):
Expand Down Expand Up @@ -175,7 +174,7 @@ def impute(

def __dataframe__(
self, nan_as_null: bool = False, allow_copy: bool = True, **kwargs
) -> _PyArrowDataFrame:
) -> Any:
"""DataFrame interchange protocol support"""
table = self.collect()
return table.__dataframe__(nan_as_null=nan_as_null, allow_copy=allow_copy)
4 changes: 2 additions & 2 deletions python/vegafusion/vegafusion/dataset/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from duckdb import DuckDBPyRelation
from .sql import SqlDataset
from ..connection.duckdb import duckdb_relation_to_schema
from pyarrow.interchange.dataframe import _PyArrowDataFrame
from typing import Any


class DuckDbDataset(SqlDataset):
Expand Down Expand Up @@ -34,7 +34,7 @@ def fetch_query(self, query: str, schema: pa.Schema) -> pa.Table:

def __dataframe__(
self, nan_as_null: bool = False, allow_copy: bool = True, **kwargs
) -> _PyArrowDataFrame:
) -> Any:
return self._relation.to_arrow_table().__dataframe__(
nan_as_null=nan_as_null, allow_copy=allow_copy
)
Expand Down
4 changes: 2 additions & 2 deletions python/vegafusion/vegafusion/dataset/sql.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABC, abstractmethod
import pyarrow as pa
from pyarrow.interchange.dataframe import _PyArrowDataFrame
from typing import Any


class SqlDataset(ABC):
Expand Down Expand Up @@ -60,6 +60,6 @@ def fallback(self) -> bool:

def __dataframe__(
self, nan_as_null: bool = False, allow_copy: bool = True, **kwargs
) -> _PyArrowDataFrame:
) -> Any:
"""DataFrame interchange protocol support"""
raise NotImplementedError()
Loading