Skip to content

python(fix): lazy-import h5py and nptdms so base install doesn't require them#547

Merged
wei-qlu merged 1 commit intomainfrom
python/move-import-dependencies
Apr 30, 2026
Merged

python(fix): lazy-import h5py and nptdms so base install doesn't require them#547
wei-qlu merged 1 commit intomainfrom
python/move-import-dependencies

Conversation

@wei-qlu
Copy link
Copy Markdown
Contributor

@wei-qlu wei-qlu commented Apr 30, 2026

Summary

  • v0.14.0 made import sift_client crash with ModuleNotFoundError when installed without the [hdf5] / [tdms] extras, because data_imports imported h5py and nptdms at the module level.
  • Move those imports inside detect_config, with a friendly error pointing at the right extra.

Test plan

  • from sift_client import SiftClient works without extras
  • detect_config("foo.h5") without [hdf5] raises a clear error
  • Existing test_hdf5.py + test_tdms.py (18 tests) pass

@wei-qlu wei-qlu requested review from marc-sift and solidiquis April 30, 2026 20:32
@wei-qlu wei-qlu marked this pull request as ready for review April 30, 2026 20:33
@wei-qlu wei-qlu requested a review from nathan-sift April 30, 2026 20:37
@wei-qlu wei-qlu merged commit 5bb4667 into main Apr 30, 2026
22 checks passed
@wei-qlu wei-qlu deleted the python/move-import-dependencies branch April 30, 2026 20:39
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