Skip to content

Conversation

@scottstanie
Copy link
Contributor

@scottstanie scottstanie commented Jul 21, 2025

The current implementation only checks for scipy and netCDF4. This adds the necessary check for h5netcdf.
Switches to using importlib.util.find_spec, as recommended by https://docs.python.org/3/library/importlib.html#importlib.util.find_spec

The unit test temporarily removes the other two backend options, then checks that h5netcdf is used.

The current implementation only checks for `scipy` and `netCDF4`.
This adds the necessary check for `h5netcdf`.
Switches to using `importlib.util.find_spec`, as recommended by
https://docs.python.org/3/library/importlib.html#importlib.util.find_spec

The unit test temporarily removes the other two backend options,
then checks that `h5netcdf` is used.
Closes pydata#10401
@dcherian
Copy link
Contributor

LGTM. Can you merge main and add a note to whats-new.rst please?

@dcherian dcherian added the plan to merge Final call for comments label Jul 30, 2025
@dcherian dcherian enabled auto-merge (squash) July 30, 2025 15:33
@dcherian dcherian merged commit c356a40 into pydata:main Jul 30, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

api._get_default_engine_netcdf does not check for h5netcdf

2 participants