From c748be677d2a5f0f73cdccb3e8f36ab5d14259fd Mon Sep 17 00:00:00 2001 From: Arun Jose <40291569+arunjose696@users.noreply.github.com> Date: Thu, 4 Jul 2024 21:37:09 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Iaroslav Igoshev --- .github/workflows/ci.yml | 2 +- modin/config/envvars.py | 2 +- .../storage_formats/pandas/native_query_compiler.py | 10 ++++++---- modin/tests/pandas/dataframe/test_iter.py | 3 ++- modin/tests/test_utils.py | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08da1d664c0..f0fc8437480 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -214,7 +214,7 @@ jobs: unidist: ${{ steps.filter.outputs.unidist }} engines: ${{ steps.engines.outputs.engines }} experimental: ${{ steps.experimental.outputs.experimental }} - test-small-query-compiler: ${{ steps.filter.outputs.test-small-query-compiler }} + test-native-dataframe-mode: ${{ steps.filter.outputs.test-native-dataframe-mode }} steps: - uses: actions/checkout@v4 - uses: dorny/paths-filter@v3 diff --git a/modin/config/envvars.py b/modin/config/envvars.py index 59f3dab1d03..f39f4a79ea2 100644 --- a/modin/config/envvars.py +++ b/modin/config/envvars.py @@ -926,7 +926,7 @@ class NativeDataframeMode(EnvironmentVariable, type=str): """ varname = "MODIN_NATIVE_DATAFRAME_MODE" - choices = ("Pandas",) + choices = ("Default", "Pandas",) default = "Default" diff --git a/modin/core/storage_formats/pandas/native_query_compiler.py b/modin/core/storage_formats/pandas/native_query_compiler.py index bd89ec4775e..39733724a35 100644 --- a/modin/core/storage_formats/pandas/native_query_compiler.py +++ b/modin/core/storage_formats/pandas/native_query_compiler.py @@ -44,7 +44,7 @@ def _get_axis(axis): Returns ------- - callable(PandasQueryCompiler) -> pandas.Index + callable(NativeQueryCompiler) -> pandas.Index """ if axis == 0: return lambda self: self._modin_frame.index @@ -63,7 +63,7 @@ def _set_axis(axis): Returns ------- - callable(PandasQueryCompiler) + callable(NativeQueryCompiler) """ if axis == 0: @@ -607,7 +607,8 @@ def set_frame_dtypes_cache(self, dtypes): Notes ----- - This function is for consistency with other QCs, dtypes should be assigned directly on the frame. + This function is for consistency with other QCs, + dtypes should be assigned directly on the frame. """ pass @@ -621,7 +622,8 @@ def set_frame_index_cache(self, index): Notes ----- - This function is for consistency with other QCs, dtypes should be assigned directly on the frame. + This function is for consistency with other QCs, + index should be assigned directly on the frame. """ pass diff --git a/modin/tests/pandas/dataframe/test_iter.py b/modin/tests/pandas/dataframe/test_iter.py index ccd6e632d10..e420f154a0f 100644 --- a/modin/tests/pandas/dataframe/test_iter.py +++ b/modin/tests/pandas/dataframe/test_iter.py @@ -142,7 +142,8 @@ def test_display_options_for___repr__(max_rows_columns, expand_frame_repr, frame def test___finalize__(): data = test_data_values[0] - # Using force for warns_that_defaulting_to_pandas as the warnings are raised in Dataframe layer, before geting into QueryCompiler layer. + # Using `force` for `NativeDataframeMode` as the warnings are raised at the API layer, + # before geting into the Query Compiler layer. with warns_that_defaulting_to_pandas(force=True): pd.DataFrame(data).__finalize__(None) diff --git a/modin/tests/test_utils.py b/modin/tests/test_utils.py index 55075f3a743..1597b052853 100644 --- a/modin/tests/test_utils.py +++ b/modin/tests/test_utils.py @@ -263,7 +263,7 @@ def warns_that_defaulting_to_pandas(prefix=None, suffix=None, force=False): If specified, checks that the end of the warning message matches this argument after "[Dd]efaulting to pandas". force : Optional[bool] - If true return the pytest.recwarn.WarningsChecker irrespective of ``NativeDataframeMode`` + If ``True``, return the ``pytest.recwarn.WarningsChecker`` irrespective of ``NativeDataframeMode``. Returns -------