Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed May 15, 2024
1 parent e739193 commit 6fab25f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions modin/core/execution/dispatching/factories/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def prepare(cls):
_doc_io_method_template,
source="pandas DataFrame",
params="df : pandas.DataFrame",
method="utils.from_pandas",
method="io.from_pandas",
)
def _from_pandas(cls, df):
return cls.io_cls.from_pandas(df)
Expand All @@ -176,7 +176,7 @@ def _from_pandas(cls, df):
_doc_io_method_template,
source="Arrow Table",
params="at : pyarrow.Table",
method="utils.from_arrow",
method="io.from_arrow",
)
def _from_arrow(cls, at):
return cls.io_cls.from_arrow(at)
Expand All @@ -186,7 +186,7 @@ def _from_arrow(cls, at):
_doc_io_method_template,
source="a non-pandas object (dict, list, np.array etc...)",
params=_doc_io_method_all_params,
method="utils.from_non_pandas",
method="io.from_non_pandas",
)
def _from_non_pandas(cls, *args, **kwargs):
return cls.io_cls.from_non_pandas(*args, **kwargs)
Expand All @@ -196,7 +196,7 @@ def _from_non_pandas(cls, *args, **kwargs):
_doc_io_method_template,
source="a DataFrame object supporting exchange protocol `__dataframe__()`",
params=_doc_io_method_all_params,
method="utils.from_dataframe",
method="io.from_dataframe",
)
def _from_dataframe(cls, *args, **kwargs):
return cls.io_cls.from_dataframe(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion modin/experimental/sql/hdk/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
HdkWorker,
)
from modin.experimental.core.storage_formats.hdk import DFAlgQueryCompiler
from modin.pandas.utils import from_arrow
from modin.pandas.io import from_arrow


def hdk_query(query: str, **kwargs) -> pd.DataFrame:
Expand Down
10 changes: 5 additions & 5 deletions modin/tests/experimental/hdk_on_native/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2370,7 +2370,7 @@ def applier(df, *args, **kwargs):
def test_from_arrow(self):
at = self._get_pyarrow_table(self.bad_for_hdk)
pd_df = pandas.DataFrame(self.bad_for_hdk)
md_df = pd.utils.from_arrow(at)
md_df = pd.io.from_arrow(at)

# force materialization
repr(md_df)
Expand Down Expand Up @@ -2637,19 +2637,19 @@ def test_shape_hint_detection(self, index):

def test_shape_hint_detection_from_arrow(self):
at = pyarrow.Table.from_pydict({"a": [1, 2, 3]})
df = pd.utils.from_arrow(at)
df = pd.io.from_arrow(at)
assert df._query_compiler._shape_hint == "column"

at = pyarrow.Table.from_pydict({"a": [1], "b": [2], "c": [3]})
df = pd.utils.from_arrow(at)
df = pd.io.from_arrow(at)
assert df._query_compiler._shape_hint == "row"

at = pyarrow.Table.from_pydict({"a": [1, 2, 3], "b": [1, 2, 3]})
df = pd.utils.from_arrow(at)
df = pd.io.from_arrow(at)
assert df._query_compiler._shape_hint is None

at = pyarrow.Table.from_pydict({"a": [1]})
df = pd.utils.from_arrow(at)
df = pd.io.from_arrow(at)
assert df._query_compiler._shape_hint == "column"

def test_constructor_from_modin_series(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pandas

import modin.pandas as pd
from modin.pandas.utils import from_dataframe
from modin.pandas.io import from_dataframe
from modin.tests.pandas.utils import df_equals, test_data
from modin.tests.test_utils import warns_that_defaulting_to_pandas

Expand Down
2 changes: 1 addition & 1 deletion modin/tests/pandas/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import modin.pandas as pd
from modin.config import NPartitions, StorageFormat
from modin.pandas.utils import from_pandas
from modin.pandas.io import from_pandas
from modin.utils import get_current_execution

from .utils import (
Expand Down

0 comments on commit 6fab25f

Please sign in to comment.