hdf5 icon indicating copy to clipboard operation
hdf5 copied to clipboard

[Feature Request] h5diff mode for just printing the differences

Open adayton1 opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. The output from h5diff includes groups that have no differences, which makes it hard to actually see where the differences are. The following is a small scale example, but you can imagine if I have dozens more fields and the actual difference is somewhere in the middle or near the end, it's hard to see what actually changed.

dataset: </domain0/Cells/Field1> and </domain0/Cells/Field1>
0 differences found
dataset: </domain0/Cells/Field2> and </domain0/Cells/Field2>
0 differences found
dataset: </domain0/Cells/Field3> and </domain0/Cells/Field3>
0 differences found
dataset: </domain0/Cells/Field4> and </domain0/Cells/Field4>
0 differences found
dataset: </domain0/Cells/Field5> and </domain0/Cells/Field5>
0 differences found
dataset: </domain0/Cells/Field6> and </domain0/Cells/Field6>
0 differences found
dataset: </domain0/Cells/Field7> and </domain0/Cells/Field7>
size:           [64896]           [64896]
position       Field7       Field7  difference
------------------------------------------------------------
[ 0 ]          961.25          919.25          42
1 differences found
dataset: </domain0/Cells/Field8> and </domain0/Cells/Field8>
0 differences found
dataset: </domain0/Cells/Field9> and </domain0/Cells/Field9>
0 differences found
dataset: </domain0/Cells/Field10> and </domain0/Cells/Field10>
0 differences found
dataset: </domain0/Cells/Field11> and </domain0/Cells/Field11>
0 differences found
dataset: </domain0/Cells/Field12> and </domain0/Cells/Field12>
0 differences found

Describe the solution you'd like Could you add an output mode that only prints the differences?

dataset: </domain0/Cells/Field7> and </domain0/Cells/Field7>
size:           [64896]           [64896]
position       Field7       Field7  difference
------------------------------------------------------------
[ 0 ]          961.25          919.25          42
1 differences found

Describe alternatives you've considered At the moment, I think the only workaround is to write a wrapper script that filters the output.

Additional context I'm trying to add h5diff as a step to a testing framework built on top of ATS (which is also developed by LLNL). When there are differences, we want it to be easy for users to see exactly what is different.

adayton1 avatar Oct 31 '22 17:10 adayton1