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

Integration tests - how identical? #149

Open
blimlim opened this issue Oct 30, 2024 · 4 comments
Open

Integration tests - how identical? #149

blimlim opened this issue Oct 30, 2024 · 4 comments

Comments

@blimlim
Copy link
Collaborator

blimlim commented Oct 30, 2024

#134 added manual integration tests, which compare the results of converting a ppfile with um2nc against data produced by the original um2netcdf4 script. This has been useful to guard against inadvertent changes that might be missed by the unit tests – it would be great to turn these into CI tests that are run during pull requests!

Up until now the output from um2nc has been bitwise identical to that of um2netcdf4.

However, building a new conda environment for um2nc causes the bitwise integration tests to fail. The cause seems to be a newer version of hdf5 producing some (unclear) difference in the resulting files. See #146 (comment) for details. Meanwhile, nccmp suggests that the data and metadata in the netCDF files are identical.

With the release and future updates, how strictly do we want to adhere to bitwise equivalence?

@blimlim
Copy link
Collaborator Author

blimlim commented Oct 30, 2024

@atteggiani had the idea here of restricting hdf5 for the initial release, so that the very first version is bitwise identical to the original script, and moving to the newer versions in future releases.

@MartinDix
Copy link
Contributor

h5dump shows different versions
(0): "version=2,netcdf=4.9.2,hdf5=1.14.3"
cf
(0): "version=2,netcdf=4.9.2,hdf5=1.14.4"
which must be embedded in the file somewhere.

I'd be happy using nccmp -Bdegm to compare the data and metadata rather than an exact file comparison.

@atteggiani
Copy link
Collaborator

nccmp suggests that the data and metadata in the netCDF files are identical.

If the data and metadata are identical, then I suggest following @MartinDix's advice and use a less-restrictive comparison for the bitwise compatibility.
In that case there is no need to restrict hdf5 in any release.

@blimlim
Copy link
Collaborator Author

blimlim commented Nov 4, 2024

Thanks @MartinDix and @atteggiani, using nccmp for the integration tests sounds like a good plan

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

No branches or pull requests

3 participants