-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix sparse dask repr test #10200
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 sparse dask repr test #10200
Conversation
@@ -719,13 +720,17 @@ def test_sparse_dask_dataset_repr(self): | |||
ds = xr.Dataset( | |||
data_vars={"a": ("x", sparse.COO.from_numpy(np.ones(4)))} | |||
).chunk() | |||
if Version(sparse.__version__) >= Version("0.16.0"): | |||
meta = "sparse.numba_backend._coo.core.COO" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be because dask extracts the __module__
which has now moved I guess.
cc @hameerabbasi and @fjetter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be a way to avoid depending on __module__
? Alternatively, would there be a preference about what to keep it constant at? I'm happy to make a post1 release fixing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a suggestion on what else to use. not sure if I understand the proposal for a constant. What kind of constant could you use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. It's about keeping the Dask repr constant, which in turn uses __module__
. I could change the module of all our functions/methods to be just "sparse"
and making a post0 release.
* main: Fix sparse dask repr test (pydata#10200) Apply ruff preview rule RUF046 (pydata#10199) DOC: Remove mention of netcdf pypi package (pydata#10197)
* main: (76 commits) Update how-to-add-new-backend.rst (#10240) Support extension array indexes (#9671) Switch documentation to pydata-sphinx-theme (#8708) Bump codecov/codecov-action from 5.4.0 to 5.4.2 in the actions group (#10239) Fix mypy, min-versions CI, xfail Zarr tests (#10255) Remove `test_dask_layers_and_dependencies` (#10242) Fix: Docs generation create temporary files that are not cleaned up. (#10238) opendap / dap4 support for pydap backend (#10182) Add RangeIndex (#10076) Fix mypy (#10232) Fix doctests (#10230) Fix broken Sphinx Roles (#10225) `DatasetView.map` fix `keep_attrs` (#10219) Add datatree repr asv (#10214) CI: Automatic PR labelling is back (#10201) Fixes dimension order in `xarray.Dataset.to_stacked_array` (#10205) Fix references to core classes in docs (#10207) Update pre-commit hooks (#10208) add `scipy-stubs` as extra `[types]` dependency (#10202) Fix sparse dask repr test (#10200) ...
whats-new.rst
api.rst