HDFGroup / HDFGroup/hdf5

h5ls: Ability to print attribute values without printing dataset values

Open
#4,755 1 comment 2 reactions 1 assignee Assigned to @jhendersonHDF View on GitHub
Component - Tools
Dominant language
C
Stars
988
Forks
355
Avg merge
4d 2h
Merged PRs (30d)
12

Description

When using h5ls, I would like to be able to print attribute values without printing other data values.

In some earlier versions of h5ls (maybe the one that was included in Ubuntu 20.04 repositories), the attribute values were printed whenever the `--verbose` flag was given, even if the `--data` flag was not given. However, it seems that current version of h5ls prints attribute values only if `--data` flag is given. Was this change in behavior intentional?

In almost all of my use cases, the attributes are either scalars or small arrays, whereas the datasets can contain millions of values. In situations like these, it is usually not a good idea to print all the dataset values, but printing attribute values might provide useful information to the user. Currently, it is not possible to print attribute values without printing dataset values as well.

I think reverting back to the previous behavior (i.e., printing attribute values if verbose) would be an improvement. A probably better alternative would be to define a new flag, acting independently of the existing verbose and data flags, which specifies whether the attribute values should be printed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.