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

test_dask_da_groupby_quantile not passing #9860

Open
5 tasks done
QuLogic opened this issue Dec 6, 2024 · 4 comments
Open
5 tasks done

test_dask_da_groupby_quantile not passing #9860

QuLogic opened this issue Dec 6, 2024 · 4 comments
Labels
bug needs triage Issue that has not been reviewed by xarray team member

Comments

@QuLogic
Copy link
Contributor

QuLogic commented Dec 6, 2024

What happened?

The test fails because the expected ValueError is not raised:

________________________ test_dask_da_groupby_quantile _________________________
[gw2] linux -- Python 3.13.0 /usr/bin/python3

    @requires_dask
    def test_dask_da_groupby_quantile() -> None:
        # Only works when the grouped reduction can run blockwise
        # Scalar quantile
        expected = xr.DataArray(
            data=[2, 5], coords={"x": [1, 2], "quantile": 0.5}, dims="x"
        )
        array = xr.DataArray(
            data=[1, 2, 3, 4, 5, 6], coords={"x": [1, 1, 1, 2, 2, 2]}, dims="x"
        )
>       with pytest.raises(ValueError):
E       Failed: DID NOT RAISE <class 'ValueError'>

/builddir/build/BUILD/python-xarray-2024.11.0-build/BUILDROOT/usr/lib/python3.13/site-packages/xarray/tests/test_groupby.py:295: Failed

What did you expect to happen?

Test pass.

Minimal Complete Verifiable Example

pytest 'tests/test_groupby.py::test_dask_da_groupby_quantile'

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.
  • Recent environment — the issue occurs with the latest version of xarray and its dependencies.

Relevant log output

No response

Anything else we need to know?

No response

Environment

INSTALLED VERSIONS ------------------ commit: None python: 3.13.0 (main, Oct 8 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-4)] python-bits: 64 OS: Linux OS-release: 6.11.5-200.fc40.x86_64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: C.UTF-8 LOCALE: ('C', 'UTF-8') libhdf5: 1.14.5 libnetcdf: 4.9.2

xarray: 2024.11.0
pandas: 2.2.1
numpy: 1.26.4
scipy: 1.14.1
netCDF4: 1.7.2
pydap: None
h5netcdf: None
h5py: None
zarr: 2.18.3
cftime: 1.6.4
nc_time_axis: None
iris: None
bottleneck: 1.3.7
dask: 2024.11.2
distributed: None
matplotlib: 3.9.1
cartopy: None
seaborn: 0.13.2
numbagg: None
fsspec: 2024.10.0
cupy: None
pint: 0.24.4
sparse: None
flox: None
numpy_groupies: None
setuptools: 74.1.3
pip: 24.3.1
conda: None
pytest: 8.3.3
mypy: None
IPython: None
sphinx: 7.3.7

@QuLogic QuLogic added bug needs triage Issue that has not been reviewed by xarray team member labels Dec 6, 2024
@max-sixty
Copy link
Collaborator

Does it fail in CI?

@QuLogic
Copy link
Contributor Author

QuLogic commented Dec 9, 2024

It's not clear to me whether that test runs in CI, and your codecov results haven't updated in 10 months, so it doesn't have that new test.

max-sixty added a commit to max-sixty/xarray that referenced this issue Dec 9, 2024
Without this, we can't upload on `main`, I think. I added a token into our Actions Secrets.

ref pydata#9860
@max-sixty
Copy link
Collaborator

Yeah, good spot. Hopefully #9865 should fix that. I think it still works on non-main branchs fwiw

max-sixty added a commit that referenced this issue Dec 9, 2024
Without this, we can't upload on `main`, I think. I added a token into our Actions Secrets.

ref #9860
@QuLogic
Copy link
Contributor Author

QuLogic commented Dec 20, 2024

Looking at the origin of the test, the commit says it's optimized by flox; I don't know what flox is, but I know I don't have it installed, since it's not in any requirements fille. So is it possible that a) no CI runs without flox or b) this test should be tagged with requires_flox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue that has not been reviewed by xarray team member
Projects
None yet
Development

No branches or pull requests

2 participants