Skip to content

Commit a7669b1

Browse files
authored
[SNOW-1894051]Turn off time consuming test from github actions (#2920)
Please describe how your code solves the related issue. Turn off couple of time consuming tests of snowpark pandas. The test turned off in the github took over miniutes to finish verified with jenkins run https://snowpark-python-001.jenkinsdev1.us-west-2.aws-dev.app.snowflake.com/job/SnowparkPythonSnowPandasDailyRegressRunner/197458/
1 parent 6c24db0 commit a7669b1

File tree

7 files changed

+35
-2
lines changed

7 files changed

+35
-2
lines changed

tests/integ/modin/frame/test_apply.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
eval_snowpark_pandas_result,
3232
)
3333
from tests.integ.utils.sql_counter import SqlCounter, sql_count_checker
34+
from tests.utils import RUNNING_ON_GH
3435

3536
# TODO SNOW-891796: replace native_pd with pd after allowing using snowpandas module/function in UDF
3637

@@ -329,6 +330,7 @@ def test_axis_1_return_not_json_serializable_label():
329330
snow_df.apply(lambda x: native_pd.DataFrame([1, 2]), axis=1).to_pandas()
330331

331332

333+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
332334
def test_axis_1_apply_args_kwargs():
333335
def f(x, y, z=1) -> int:
334336
return x.sum() + y + z

tests/integ/modin/frame/test_apply_axis_0.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
eval_snowpark_pandas_result,
2525
)
2626
from tests.integ.utils.sql_counter import SqlCounter, sql_count_checker
27+
from tests.utils import RUNNING_ON_GH
2728

2829
# test data which has a python type as return type that is not a pandas Series/pandas DataFrame/tuple/list
2930
BASIC_DATA_FUNC_PYTHON_RETURN_TYPE_MAP = [
@@ -352,6 +353,7 @@ def test_axis_0_return_list():
352353
)
353354

354355

356+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
355357
@pytest.mark.parametrize(
356358
"apply_func",
357359
[
@@ -655,6 +657,7 @@ def test_apply_nested_series_negative():
655657
import scipy.stats # noqa: E402
656658

657659

660+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
658661
@pytest.mark.parametrize(
659662
"packages,expected_query_count",
660663
[

tests/integ/modin/frame/test_cache_result.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
create_test_dfs,
1515
)
1616
from tests.integ.utils.sql_counter import SqlCounter
17+
from tests.utils import RUNNING_ON_GH
1718

1819

1920
def assert_empty_snowpark_pandas_equals_to_pandas(snow_df, native_df):
@@ -175,6 +176,7 @@ def test_cache_result_post_pivot(self, inplace, simple_test_data):
175176
cached_snow_df, native_df
176177
)
177178

179+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
178180
def test_cache_result_post_apply(self, inplace, simple_test_data):
179181
# In this test, the caching doesn't aid in the query counts since
180182
# the implementation of apply(axis=1) itself contains intermediate

tests/integ/modin/groupby/test_groupby_apply.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
eval_snowpark_pandas_result as _eval_snowpark_pandas_result,
2727
)
2828
from tests.integ.utils.sql_counter import SqlCounter, sql_count_checker
29+
from tests.utils import RUNNING_ON_GH
2930

3031
# Use the workaround shown below for applying functions that are attributes
3132
# of this module.
@@ -263,11 +264,32 @@ def func(df, num1, str1):
263264
"level",
264265
[
265266
0,
267+
["level_1", "level_0"],
268+
],
269+
)
270+
@sql_count_checker(
271+
query_count=QUERY_COUNT_WITHOUT_TRANSFORM_CHECK,
272+
udtf_count=UDTF_COUNT,
273+
join_count=JOIN_COUNT,
274+
)
275+
def test_group_by_level_basic(
276+
self, grouping_dfs_with_multiindexes, level, include_groups
277+
):
278+
eval_snowpark_pandas_result(
279+
*grouping_dfs_with_multiindexes,
280+
lambda df: df.groupby(level=level).apply(
281+
lambda df: df.iloc[::-1, ::-1], include_groups=include_groups
282+
),
283+
)
284+
285+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
286+
@pytest.mark.parametrize(
287+
"level",
288+
[
266289
[0],
267290
[1, 0],
268291
"level_0",
269292
["level_0"],
270-
["level_1", "level_0"],
271293
[0, "level_1"],
272294
],
273295
)

tests/integ/modin/series/test_apply_and_map.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
eval_snowpark_pandas_result,
3333
)
3434
from tests.integ.utils.sql_counter import SqlCounter, sql_count_checker
35+
from tests.utils import RUNNING_ON_GH
3536

3637
BASIC_DATA_FUNC_RETURN_TYPE_MAP = [
3738
([1, 2, 3, None], lambda x: x + 1, "int"),
@@ -467,6 +468,7 @@ def f(x):
467468
# This import is related to the test below. Do not remove.
468469
import scipy # noqa: E402
469470

471+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
470472
@pytest.mark.parametrize(
471473
"package,expected_query_count",
472474
[

tests/integ/modin/series/test_items.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
eval_snowpark_pandas_result,
1717
)
1818
from tests.integ.utils.sql_counter import SqlCounter, sql_count_checker
19+
from tests.utils import RUNNING_ON_GH
1920

2021
# To generate seeded random data.
2122
rng = np.random.default_rng(12345)
@@ -62,6 +63,7 @@ def test_items(series):
6263
)
6364

6465

66+
@pytest.mark.skipif(RUNNING_ON_GH, reason="Slow test")
6567
def test_items_large_series():
6668
size = PARTITION_SIZE * 2 + 1
6769
data = rng.integers(low=-1500, high=1500, size=size)

tests/integ/modin/window/test_rolling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def test_rolling_corr_unsupported(self, create_function, input_data):
567567
],
568568
)
569569
@pytest.mark.parametrize("agg_func", agg_func_supported_for_timedelta)
570-
@window
570+
@pytest.mark.parametrize("window", [1, 2, 6])
571571
@min_periods
572572
@center
573573
def test_rolling_aggregation_supported(

0 commit comments

Comments
 (0)