-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add support for nc_set_alignment and nc_get_alignment #1183
Conversation
a typo is causing the tests to fail |
do you want some kind of test here? |
if you can point me to where to write it, i'm glad to write one, I've written similar ones in our libraries that consume netcdf4 |
a test would be nice yes - you can perhaps just set the alignment, close the file and re-open, check the alignment matches what you expect. example at test/tst_shape.py |
also please add a Changelog entry |
This "passes" locally, but only in the sense that I don't know how to run the test with the netcdf4 API only. I have written the test with the h5py API as a placeholder. Honestly, I'm not sure netcdf4 exposes the required features of the hdf5 API. So maybe we can remove the assert statements at the end of the test? |
one more time. |
still failing to import h5py, and import of set_alignment failing with netcdf-c 4.8.1 |
I'm not sure how best to handle this. I could skip these tests on your CI, but this is the only way, to my knowledge, to test the HDF5 alignment. |
Ok new tests will fail with something like:l if alignment isn't set (i removed the set alignment call from the test setup to generate this error message)
using only h5ls and not h5py |
9c55cde
to
130981c
Compare
And with 4.8.1:
|
you can leave the h5py test but we will have to update the github actions workflows to install h5py |
Correct. I can likely find how to do that. I can also "skip" those tests if Do you want me to skip the test, or fail the test if h5py isn't installed/ |
hdf5 is already as an ubuntu package, so there a good chance h5ls will be found. But, if not skipping that test with a warning is fine. EDIT: I see you are right, and hdf5 is installed via conda for some of the workflows. But using h5ls instead of h5py is preferable if it works, since it doesn't add another dependency. |
So conda(-forge) will install the binary tools for hdf5 when one install the hdf5 package. However, ubuntu will require you to install
Ultimately, I need some other kind of dependency to run this test. I can add the tools to ubuntu, we can see how far the tests go. I am weary to add yet an other (mandatory) test dependency without documenting it thoroughly. |
i'm happy to make the dependency optional after we test this one last round with your CI (it is hard to tell exactly what tests are skipped without running tests in verbose mode) |
just adding to the ubuntu test should be sufficient (and have the test be skipped if h5ls is not available) |
Sigh, I don't really understand why this is failing. Maybe some strange MPICH bug. I'm investigating hmaarrfk#1 no need to bother restarting the CIs all the time. |
6c5b29a
to
015477e
Compare
ok, i believe i've fixed most tests, but windows seems to be failing even without this PR:hmaarrfk#2 |
windows tests are failing on master right now too, so that's not your problem. |
Looks good now @hmaarrfk - thanks for seeing this through. Will the tests starting failing when conda updates to netcdf-c 4.9.0 (since the tests will no longer be skipped and h5ls may not be found)? |
jswhit:
|
@hmaarrfk I can merge now if you think this is done |
1 more change ;) |
Ok i added the test skipping logic if h5ls is not found. less than "ideal" but for this tiny feature, I think it is ok. For what its worth, even if h5ls is not found, calls to Before merging, I would like to remove the two commits where I change, and then unchange, your ci files. Do you want me to remove |
4bd25eb
to
90d2ec3
Compare
0001-Disable-fail-fast.patch.txt Patch to disable fail fast |
90d2ec3
to
3a81994
Compare
If you are happy with this state, then feel free to merge. |
FYI: locally i deleted the
|
These functions were added in 4.9.0 in Unidata/netcdf-c#2206
I'm not sure how you want to handle the error cases. Feedback is appreciated.