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

fix tests failing due to unsorted results #479

Merged
merged 3 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- cuspatial=23.06
- dask-cuda=23.06
- dask-cudf=23.06
- datashader>=0.14,<=0.14.4
- datashader>=0.15
- geopandas>=0.11.0
- holoviews>=1.15.0,<=1.15.4
- ipython
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cuxfilter/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ requirements:
- cuspatial ={{ minor_version }}
- dask-cuda ={{ minor_version }}
- dask-cudf ={{ minor_version }}
- datashader >=0.14,<=0.14.4
- datashader >=0.15
- geopandas >=0.11.0
- holoviews>=1.15.0,<=1.15.4
- jupyter-server-proxy
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ dependencies:
- output_types: [conda, requirements]
packages:
- bokeh>=2.4.2,<=2.5
- datashader>=0.14,<=0.14.4
- datashader>=0.15
- geopandas>=0.11.0
- holoviews>=1.15.0,<=1.15.4
- jupyter-server-proxy
Expand Down
2 changes: 1 addition & 1 deletion python/cuxfilter/tests/assets/test_gpu_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ def test_aggregated_column_unique():
bc.min_value = df["key"].min()

assert np.array_equal(
gpu_histogram.aggregated_column_unique(bc, df),
np.sort(np.array(gpu_histogram.aggregated_column_unique(bc, df))),
np.array([0, 4, 9, 10, 14, 21, 22, 24, 26, 29, 34, 38, 98, 103, 108]),
)
2 changes: 1 addition & 1 deletion python/cuxfilter/tests/charts/core/test_core_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_box_selection_callback(
self.result = None

def t_function(data, edges=None, patch_update=False):
self.result = data.reset_index(drop=True)
self.result = data.sort_values(by="vertex").reset_index(drop=True)

bg.reload_chart = t_function

Expand Down
12 changes: 10 additions & 2 deletions python/cuxfilter/tests/charts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ def initialize_df(type, *df_args):


def df_equals(df1, df2):
df1 = df1.compute() if isinstance(df1, dask_cudf.DataFrame) else df1
df2 = df2.compute() if isinstance(df2, dask_cudf.DataFrame) else df2
df1 = (
df1.compute().reset_index(drop=True)
if isinstance(df1, dask_cudf.DataFrame)
else df1.reset_index(drop=True)
)
df2 = (
df2.compute().reset_index(drop=True)
if isinstance(df2, dask_cudf.DataFrame)
else df2.reset_index(drop=True)
)

return df1.equals(df2)

Expand Down