Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Iaroslav Igoshev <[email protected]>
  • Loading branch information
arunjose696 and YarShev committed Jul 4, 2024
1 parent 3585c74 commit c748be6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modin/config/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ class NativeDataframeMode(EnvironmentVariable, type=str):
"""

varname = "MODIN_NATIVE_DATAFRAME_MODE"
choices = ("Pandas",)
choices = ("Default", "Pandas",)
default = "Default"


Expand Down
10 changes: 6 additions & 4 deletions modin/core/storage_formats/pandas/native_query_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -63,7 +63,7 @@ def _set_axis(axis):
Returns
-------
callable(PandasQueryCompiler)
callable(NativeQueryCompiler)
"""
if axis == 0:

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion modin/tests/pandas/dataframe/test_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion modin/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down

0 comments on commit c748be6

Please sign in to comment.