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 test suite #1314

Merged
merged 14 commits into from
Feb 13, 2024
Merged

Fix test suite #1314

merged 14 commits into from
Feb 13, 2024

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Jan 31, 2024

This fixes the failing tests and removes warnings from the test CI.

Also fixes a problem with Windows not solving the conda environment.

Before this PR: 13 failed, 1581 passed, 62 skipped, 10 xfailed, 13569 warnings
After this PR: 1581 passed, 65 skipped, 11 xfailed

@hoxbro hoxbro changed the title Pin pytest for now. Update tests Jan 31, 2024
@hoxbro hoxbro changed the title Update tests Fix test suite Jan 31, 2024
@hoxbro
Copy link
Member Author

hoxbro commented Jan 31, 2024

Still seems to be problem solving on Windows:

  Install runtime dependencies with: conda install -y   "colorcet" "dask-core" "multipledispatch" "numba" "numpy" "pandas" "param" "pillow" "pyct" "requests" "scipy" "toolz" "xarray" "dask-geopandas" "geopandas" "shapely >=2.0.0" "codecov" "geodatasets" "fastparquet" "flake8" "nbconvert" "nbformat" "nbsmoke >0.5" "netcdf4" "pyarrow" "pytest <8" "pytest-benchmark" "pytest-cov" "rasterio" "rioxarray" "scikit-image" "spatialpandas" "dask-geopandas" "geopandas" "shapely >=2.0.0" "bokeh >3.1" "geodatasets" "holoviews" "matplotlib-base >=3.3" "panel >1.1" "scikit-image" "spatialpandas"
  Install runtime dependencies with: conda install -y   "colorcet" "dask-core" "multipledispatch" "numba" "numpy" "pandas" "param" "pillow" "pyct" "requests" "scipy" "toolz" "xarray" "dask-geopandas" "geopandas" "shapely >=2.0.0" "codecov" "geodatasets" "fastparquet" "flake8" "nbconvert" "nbformat" "nbsmoke >0.5" "netcdf4" "pyarrow" "pytest <8" "pytest-benchmark" "pytest-cov" "rasterio" "rioxarray" "scikit-image" "spatialpandas" "dask-geopandas" "geopandas" "shapely >=2.0.0" "bokeh >3.1" "geodatasets" "holoviews" "matplotlib-base >=3.3" "panel >1.1" "scikit-image" "spatialpandas"
  Channels:
   - pyviz/label/dev
   - numba
   - conda-forge
  Platform: win-64
  Collecting package metadata (repodata.json): ...working... done
  warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE

Took 1.5 hours to solve for one of them....

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (662a0d6) 85.65% compared to head (8d3ada0) 85.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1314      +/-   ##
==========================================
- Coverage   85.65%   85.64%   -0.02%     
==========================================
  Files          52       52              
  Lines       11288    11291       +3     
==========================================
+ Hits         9669     9670       +1     
- Misses       1619     1621       +2     

@hoxbro
Copy link
Member Author

hoxbro commented Feb 1, 2024

Failing tests on Linux are the same reason as holoviz/geoviews#703, will solve it self (likely by the end of the day)

@hoxbro
Copy link
Member Author

hoxbro commented Feb 1, 2024

The slow solve Windows seems to be fixed by removing fastparquet. I don't think it is a culprit by itself, but it is likely caused by some combination with other packages.

@hoxbro
Copy link
Member Author

hoxbro commented Feb 2, 2024

Closed #1308, because numba 0.59 has been released and passed the CI as shown here

image

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

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

Happy for this to be merged; thanks for tracking all that painful stuff down!

@@ -835,6 +835,12 @@ def test_sort_values_frame(self):
def test_where_series(self):
pass

@pytest.mark.xfail(reason="not currently supported")
Copy link
Member

Choose a reason for hiding this comment

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

Should we instead pin to pandas !=2.2, expecting them to fix it in the next release?

Copy link
Member Author

Choose a reason for hiding this comment

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

The line you have commented on is a new test for ExtensionArray, which was added in Pandas 2.2.

I have updated the skip for the upstream regression.

Copy link
Member

Choose a reason for hiding this comment

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

I'm confused, since it says @pytest.mark.xfail(reason="not currently supported") ("currently"), but in any case, sounds like you're on it!

Copy link
Member Author

Choose a reason for hiding this comment

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

duplicated has likely never worked for RaggedArray; I have added a NotImplementedError for it in the class. Before that, this would give a wrong result.
image

import pandas as pd
from datashader.datatypes import RaggedArray

data = RaggedArray([[0, 1], [1, 2, 3, 4], [], [-1, -2], []], dtype='float64')
arr = data.take([0, 1, 0, 1])
arr.duplicated('first')

arr = pd.array([0, 1, 0, 1])
arr.duplicated('first')

Pandas use a hashtable to check if something is duplicated, but it is not designed to work with RaggedArray (which makes sense). I don't think it is impossible to support this, which is why I have added "currently". I hope that clarifies things.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks! Maybe the way to clarify it would be to state what doesn't currently support it, e.g. "not currently supported by Pandas", "not currently supported by RaggedArray", or "not currently supported by Datshader".

@hoxbro hoxbro merged commit 077e95c into main Feb 13, 2024
13 of 14 checks passed
@hoxbro hoxbro deleted the maint_ci branch February 13, 2024 07:48
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.

2 participants