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

TEST-#7049: Add some sanity tests with pyarrow-backed pandas dataframes #7199

Merged
merged 8 commits into from
Apr 22, 2024

Conversation

anmyachev
Copy link
Collaborator

@anmyachev anmyachev commented Apr 18, 2024

What do these changes do?

Fixing problematic test cases will be part of the work on #7203.

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Add some sanity tests with pyarrow-backed pandas dataframes to make sure Modin doesn't have any issues with this backend. #7049
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

…ndas dataframes

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
pa = pytest.importorskip("pyarrow")

data = [[Decimal("3.19"), None], [None, Decimal("-1.23")]]
df_equals(*create_test_dfs(data, dtype=pd.ArrowDtype(pa.decimal128(3, scale=2))))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

df_equals function is used specifically since there is no benefit to using eval_general function (because the results of the constructors are tested).

modin/tests/pandas/test_series.py Outdated Show resolved Hide resolved
modin/tests/pandas/test_series.py Outdated Show resolved Hide resolved
modin_series, pandas_series = create_test_series(
[-1.545, 0.211, None], dtype="float32[pyarrow]"
)
df_equals(modin_series.mean(), pandas_series.mean())
Copy link
Collaborator

Choose a reason for hiding this comment

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

eval_general?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mean() returns a floating point number, so I don't see the need for it

Co-authored-by: Iaroslav Igoshev <Poolliver868@mail.ru>
@YarShev YarShev merged commit 3abd961 into modin-project:main Apr 22, 2024
38 checks passed
@anmyachev anmyachev deleted the issue7049 branch April 22, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants