Skip to content

Add filters() method to variables - #307

Merged
kmuehlbauer merged 5 commits into
h5netcdf:mainfrom
hmaarrfk:add_more_info_in_filters
Jan 7, 2026
Merged

kmuehlbauer merged 5 commits into
h5netcdf:mainfrom
hmaarrfk:add_more_info_in_filters

Conversation

@hmaarrfk

@hmaarrfk hmaarrfk commented Jan 3, 2026 •

Copy link
Copy Markdown
Contributor

In an attempt to build up parity with netCDF4, i'm proposing we add the filters() method to Variable.

It is used by xarray in
https://github.com/pydata/xarray/blob/8d271fb393372bcd2ed6ab60c9f469a1625a4aed/xarray/backends/netCDF4_.py#L555

I'm hoping to get better cross engine support

  • Closes Issue #xxxx
  • Tests added
  • Changes are documented in CHANGELOG.rst

hmaarrfk added a commit to hmaarrfk/xarray that referenced this pull request Jan 3, 2026
We were trying to figure why certain compression features were not
included in our h5netcdf backend.

This PR to h5netcdf should provide the filters variable, but I
understand that it is too bleeding edge for you all to pin to
h5netcdf/h5netcdf#307
@hmaarrfk
hmaarrfk force-pushed the add_more_info_in_filters branch 3 times, most recently from f07d297 to e895b96 Compare January 3, 2026 03:03
hmaarrfk added a commit to hmaarrfk/xarray that referenced this pull request Jan 3, 2026
We were trying to figure why certain compression features were not
included in our h5netcdf backend.

This PR to h5netcdf should provide the filters variable, but I
understand that it is too bleeding edge for you all to pin to
h5netcdf/h5netcdf#307
hmaarrfk added a commit to hmaarrfk/xarray that referenced this pull request Jan 4, 2026
We were trying to figure why certain compression features were not
included in our h5netcdf backend.

This PR to h5netcdf should provide the filters variable, but I
understand that it is too bleeding edge for you all to pin to
h5netcdf/h5netcdf#307
In an attempt to build up parity with netCDF4, i'm proposing we add the
filters() method to Variable.

It is used by xarray in
https://github.com/pydata/xarray/blob/8d271fb393372bcd2ed6ab60c9f469a1625a4aed/xarray/backends/netCDF4_.py#L555

I'm hoping to get better cross engine support
@hmaarrfk
hmaarrfk force-pushed the add_more_info_in_filters branch from aa10ef3 to 389dbc4 Compare January 4, 2026 20:04
@hmaarrfk
hmaarrfk force-pushed the add_more_info_in_filters branch from 389dbc4 to eae6712 Compare January 4, 2026 20:41
@hmaarrfk

hmaarrfk commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

Are you ok with dropping python 3.11?

Personally, i could fix the failing test somehow, but the whole point of SPEC0 is to shed this maintenance burden to allow us to get back to the fun stuff that motivated us to write this software in the first place.

https://scientific-python.org/specs/spec-0000/

As a volunteer, i'm very tempted to stop here, and to code less.

  • Delete the future proof test.
  • Delete the CI for python 3.11 and H5Py old...

@kmuehlbauer

Copy link
Copy Markdown
Collaborator

@hmaarrfk I'm currently still off-line (no, not really, but time is limited). Back in two days.

The h5py3 hdf5 1.10 tests (3.11, 3.11, 1.10.*, 1) CI run is for keeping testing still used by debian packaging.

Let's just deactivate your test for the old platform for now.

@hmaarrfk

hmaarrfk commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the note

it seems that you have an idea on how to simplify this in a straightforward manner. I'll let you execute on this when you get back to OSS.

hmaarrfk added a commit to hmaarrfk/xarray that referenced this pull request Jan 5, 2026
We were trying to figure why certain compression features were not
included in our h5netcdf backend.

This PR to h5netcdf should provide the filters variable, but I
understand that it is too bleeding edge for you all to pin to
h5netcdf/h5netcdf#307
@kmuehlbauer kmuehlbauer changed the title Add fitlers() method to variables Add filters() method to variables Jan 7, 2026
Comment thread h5netcdf/tests/test_h5netcdf.py Resolved
@kmuehlbauer

Copy link
Copy Markdown
Collaborator

@hmaarrfk Can you please have a look here? The issue was older netcdf4-python. I've added a fix, which should get us go for now.

@hmaarrfk

hmaarrfk commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Good enough for me.

@kmuehlbauer
kmuehlbauer merged commit a57d912 into h5netcdf:main Jan 7, 2026
31 checks passed
@kmuehlbauer

Copy link
Copy Markdown
Collaborator

Thanks @hmaarrfk!

@hmaarrfk

hmaarrfk commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

Do keep in mind that the tests that failed are for Debian which hasn’t updated the version of h5netcdf in years. They are very unlikely to do so after this update.

@kmuehlbauer

Copy link
Copy Markdown
Collaborator

Yes, they will probably create an issue here, if there is anything bad happening on their side.

@hmaarrfk

Copy link
Copy Markdown
Contributor Author

Not sure if it is possible to have a new release for this.

I’m trying to test this with xarray to get closer to parity with netcdf4

@kmuehlbauer

Copy link
Copy Markdown
Collaborator

@hmaarrfk Yes, this is on the list for this very week.

@hmaarrfk

Copy link
Copy Markdown
Contributor Author

Awesome thanks!

@kmuehlbauer

Copy link
Copy Markdown
Collaborator

hmaarrfk added a commit to hmaarrfk/xarray that referenced this pull request Jan 19, 2026
We were trying to figure why certain compression features were not
included in our h5netcdf backend.

This PR to h5netcdf should provide the filters variable, but I
understand that it is too bleeding edge for you all to pin to
h5netcdf/h5netcdf#307
hmaarrfk added a commit to hmaarrfk/xarray that referenced this pull request Mar 24, 2026
We were trying to figure why certain compression features were not
included in our h5netcdf backend.

This PR to h5netcdf should provide the filters variable, but I
understand that it is too bleeding edge for you all to pin to
h5netcdf/h5netcdf#307
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