Closed tiborsimko closed 4 years ago
For the reana-client list --verbose
case, flags -k
and -b
would only work if --verbose
is there, am I right?
Yeah, right... We could simply add to the help guide something like
-b, --bytes Print workspace disk size in bytes (to be used with --verbose)
But I can see that this can get confusing for people... For the du
command, there is no problem, since the analogy with "du" works perfectly. For the list
command, the analogy works less well, so it could get confusing.
One option is to live with such a documentation and eventually amend the behaviour later based on real-life usage.
Another option is to change the logic for the list
command already now and invent a new, separate and nicely descriptive flag such as --size
that would be decoupled from --verbose
(and from du
, as it were).
Currently,
reana-client du
andreana-client list --verbose
will give information about workspace disk usage. The information is printed in human-friendly way, e.g.The behaviour was modelled after Unix's
du
command.The problem with the current behaviour is that there is no way to get robot-friendly output that would be actionable, as users may be accustomed from Unix analogy e.g. to discover three most consuming subdirectories:
The proposed solution is to enhance
reana-client du
andreana-client list
commands with an option-k
that would print disk usage not in human friendly format, but in kilobytes; or even better-b
that would do the same in bytes; or perhaps even both by analogy with Unixdu
command.(Also, we should enrich the Click docs of the
list
command to better advertise that the--verbose
option will print out disk sizes for all the workflow runs. I think it is pretty hidden right now.)