Skip to content
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

Complete the low-level wrapper of all used HDF5 functions. #863

Merged
merged 1 commit into from Dec 12, 2023

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Nov 23, 2023

This wrapper enables us to see more easily notice that an error code is being ignored, makes it very clear how we wrap HDF5 function and encourages us to not ignore unchecked error codes if we see one. It'll make it easier to have uniform error handling. Additionally, it prepares the way towards more interesting features, such as thread-safety or logging each call to HDF5 (for creating pure HDF5 reproducers).

The rules are:

  1. Each HDF5 "function" H5?* is wrapped by detail::h5?_*. We can't reuse the name in a namespace because some of them are macros.
  2. Unless the wrapped function is in the namespace detail::nothrow it'll throw whenever the returned value indicates an error.
  3. The arguments to H5?* and detail::h5?_* are identical.
  4. Outside of the files h5?_wrapper.hpp we don't use any HDF5 functions or function macros.

@1uc 1uc force-pushed the 1uc/expand-lowest-level-wrapper branch from 6ffefcd to 3c92df8 Compare November 23, 2023 18:38
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (2af7cb5) 85.27% compared to head (b3d812b) 85.34%.

Files Patch % Lines
include/highfive/bits/h5i_wrapper.hpp 82.75% 5 Missing ⚠️
include/highfive/bits/H5Object_misc.hpp 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #863      +/-   ##
==========================================
+ Coverage   85.27%   85.34%   +0.06%     
==========================================
  Files          83       84       +1     
  Lines        5482     5508      +26     
==========================================
+ Hits         4675     4701      +26     
  Misses        807      807              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1uc 1uc force-pushed the 1uc/expand-lowest-level-wrapper branch 5 times, most recently from e4d5949 to 03efa93 Compare November 24, 2023 13:03
@1uc 1uc marked this pull request as ready for review November 29, 2023 13:11
@1uc 1uc force-pushed the 1uc/expand-lowest-level-wrapper branch from 03efa93 to 8789038 Compare December 4, 2023 08:05
@1uc 1uc force-pushed the 1uc/expand-lowest-level-wrapper branch from 8789038 to bbc4d7e Compare December 12, 2023 06:52
@1uc 1uc merged commit 29f9a97 into master Dec 12, 2023
36 checks passed
@1uc 1uc deleted the 1uc/expand-lowest-level-wrapper branch December 12, 2023 09:28
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.

None yet

2 participants