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

REFACTOR-#7008: Remove check_exception_type argument of eval_general function #7009

Merged
merged 5 commits into from Mar 6, 2024

Conversation

anmyachev
Copy link
Collaborator

@anmyachev anmyachev commented Mar 5, 2024

What do these changes do?

  • 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 Remove check_exception_type argument of eval_general function #7008
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

…f 'eval_general' function

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>
@@ -643,7 +655,22 @@ def test_pivot(data, index, columns, values):
pytest.param("nunique", id="full_axis_func"),
],
)
def test_pivot_table_data(data, index, columns, values, aggfunc):
def test_pivot_table_data(data, index, columns, values, aggfunc, request):
if (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It’s not pretty, but it’s difficult to select the desired condition through parameters. It is also possible that there are several problems that will need to be investigated separately.

Comment on lines -894 to -895
if check_exception_type is None:
return None
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the source of hidden problems.

Comment on lines +898 to +902
assert isinstance(
md_e, type(pd_e)
), "Got Modin Exception type {}, but pandas Exception type {} was expected".format(
type(md_e), type(pd_e)
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

By default, the exception type is assumed to be the same. Situations where this is not the case should be handled using pytest.xfail.

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
"index", [lambda df: df.columns[0], lambda df: df[df.columns[0]].values, None]
"index",
[lambda df: df.columns[0], lambda df: df.columns[:2], lib.no_default],
ids=["one_column_index", "several_columns_index", "default"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ids=["one_column_index", "several_columns_index", "default"],
ids=["one_column_index", "several_columns_index", "no_default"],

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can see your point, but I'm using default word here to make it clearer that this is the default value that pandas uses.

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense

modin/pandas/test/dataframe/test_default.py Show resolved Hide resolved
modin/pandas/test/dataframe/test_default.py Show resolved Hide resolved
@YarShev YarShev merged commit 8cd2bba into modin-project:master Mar 6, 2024
37 checks passed
@anmyachev anmyachev deleted the issue7008 branch March 6, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove check_exception_type argument of eval_general function
2 participants