Skip to content

GEOPY-2756: H5 flags to optimize performances#900

Open
domfournier wants to merge 4 commits into
release/GA_4.8from
GEOPY-2756B
Open

GEOPY-2756: H5 flags to optimize performances#900
domfournier wants to merge 4 commits into
release/GA_4.8from
GEOPY-2756B

Conversation

@domfournier
Copy link
Copy Markdown
Contributor

@domfournier domfournier commented May 25, 2026

GEOPY-2756 - H5 flags to optimize performances

Copilot AI review requested due to automatic review settings May 25, 2026 22:13
@github-actions github-actions Bot changed the title GEOPY-2756 GEOPY-2756: H5 flags to optimize performances May 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how new .geoh5 files are created to use specific HDF5 library version bounds (libver) as part of a performance-optimization effort, and adds a regression test to validate the new creation settings.

Changes:

  • Set libver=("v110", "v114") when creating new on-disk workspaces via h5py.File(...).
  • Update test_empty_workspace to use a context manager and assert the created file’s libver bounds.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
geoh5py/workspace/workspace.py Adds explicit HDF5 libver bounds when creating new on-disk .geoh5 files.
tests/workspace_test.py Adjusts workspace creation test and asserts the new libver behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread geoh5py/workspace/workspace.py Outdated
Comment thread tests/workspace_test.py
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.24%. Comparing base (0f3a0d9) to head (51db7ea).

Additional details and impacted files
@@               Coverage Diff               @@
##           release/GA_4.8     #900   +/-   ##
===============================================
  Coverage           91.23%   91.24%           
===============================================
  Files                 113      113           
  Lines               10508    10507    -1     
  Branches             1944     1943    -1     
===============================================
  Hits                 9587     9587           
  Misses                486      486           
+ Partials              435      434    -1     
Files with missing lines Coverage Δ
geoh5py/workspace/workspace.py 91.45% <100.00%> (+0.14%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@sebhmg sebhmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see feedback from copilot: same options must be passed when creating as BytesIO

@domfournier
Copy link
Copy Markdown
Contributor Author

See response

Copy link
Copy Markdown
Contributor

@sebhmg sebhmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see more parameters to pass when creating h5 on BytesIO

Comment thread geoh5py/workspace/workspace.py Outdated
"""
if isinstance(self.h5file, BytesIO):
self._geoh5 = h5py.File(self.h5file, "a")
self._geoh5 = h5py.File(self.h5file, "a", libver=("v110", "v114"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would need the other options too.

Suggested change
self._geoh5 = h5py.File(self.h5file, "a", libver=("v110", "v114"))
self._geoh5 = h5py.File(
self.h5file,
"a",
fs_strategy="page",
page_buf_size=DEFAULT_PAGE_BUF_SIZE,
libver=("v110", "v114"),
)

or just merge both case together:

Suggested change
self._geoh5 = h5py.File(self.h5file, "a", libver=("v110", "v114"))
if isinstance(self.h5file, (BytesIO, Path)):
self._geoh5 = h5py.File(
self.h5file,
"a" if isinstance(self.h5file, BytesIO) else "x",
fs_strategy="page",
page_buf_size=DEFAULT_PAGE_BUF_SIZE,
libver=("v110", "v114"),
)

self._geoh5 = h5py.File(self.h5file, "a", libver=("v110", "v114"))

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.

3 participants