asdf icon indicating copy to clipboard operation
asdf copied to clipboard

asdftools info --help not very informative

Open pllim opened this issue 2 years ago • 5 comments

$ asdftool info --help
usage: asdftool info [-h] [--max-rows MAX_ROWS] [--max-cols MAX_COLS] [--show-values] [--no-show-values] filename

Print a rendering of an ASDF tree.

positional arguments:
  filename             ASDF file to render

options:
  -h, --help           show this help message and exit
  --max-rows MAX_ROWS  maximum number of lines
  --max-cols MAX_COLS  maximum length of line
  --show-values
  --no-show-values

I have no idea what any of the options really mean. I don't see any option to only list the tree one level down.

p.s. Why can't --show-values and --no-show-values be combined into a single flag? They sound mutually exclusive.

pllim avatar Apr 10 '23 20:04 pllim

It looks like those options correspond to options for the asdf._convenience.info function which contains slightly more information: https://github.com/asdf-format/asdf/blob/a9e3ad714453c7cd3e3671c860db8b8c3e19f89a/asdf/_convenience.py#L24-L40

Suggestions and/or PRs to improve this are appreciated. I'm not familiar with nor do I use asdftool and it's not high on my list of priorities. If it's use is required for something you're doing please let me know and I can reassess.

braingram avatar Apr 11 '23 13:04 braingram

I agree that the help on this tool should be improved. As for the last line of your comment, did you mean "can" instead of "can't"?

perrygreenfield avatar Apr 11 '23 13:04 perrygreenfield

If it's use is required for something you're doing

I just wanted a quick glance at the file structure like fitsinfo you get to use for FITS files. But I also don't need to see all the way down the tree. I just wanted the extension names (data, err, etc).

did you mean "can" instead of "can't"?

Now that I see the docstring, I think one of them should not exist at all.

pllim avatar Apr 11 '23 13:04 pllim

Would an option like show-all-big-data be useful, where it just shows the path to arrays or tables that are sizable (e.g., not arrays that are 40 elements long)?

perrygreenfield avatar Apr 11 '23 17:04 perrygreenfield

show-all-big-data

Not really, what if my data is actually small subarray or dummy test data that is very small?

pllim avatar Apr 11 '23 17:04 pllim