Current dvc version
output is ugly, we could definitely do better:
DVC version: 0.89.0+9e96dd
Python version: 3.7.0
Platform: Linux-4.15.0-88-generic-x86_64-with-debian-buster-sid
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('ext4', '/dev/sda1')
Filesystem type (workspace): ('ext4', '/dev/sda1')
maybe something like this yaml (btw need to look into possibly unifying analytics collection with this):
DVC: 0.89.0+9e96dd
Python: 3.7.0
Platform: Linux-4.15.0-88-generic-x86_64-with-debian-buster-sid
Binary: False
Package: pip
Remotes:
azure: supported
gdrive: supported
gs: supported
hdfs: supported
http: supported
https: supported
s3: not supported
ssh: supported
oss: supported
Links:
reflink: not supported
hardlink: supported
symlink: supported
Cache:
fs: ext4
mnt: /dev/sda1
Workspace:
fs: ext4
mnt: /dev/sda1
easilly greppable and json-compatible.
Could also use some colors to highlight stuff
Hi, Is there anyone working on this issue. if not then can I work on this issue?
@sahilbhosale63 Sure! Let's start by discussing the output format in this ticket, so that we are on the same page and then, once we agree, we could proceed implementing it in the code. Thank you! :pray:
Yes, Let's start.
Can you please provide me with the path to the file where this code resides?
Hi @sahilbhosale63, version command is here: dvc/command/version.py.
@sahilbhosale63, it'd be great to see example output before implementing. What do you have in mind?
Also, feel free to discuss this here and/or in chat on #dev-talk
channel, we'll be happy to help you.
Currently I don't have any ideas in my mind. I think the output format suggested by @efiop will be the best fit. And surely I will try to modify the output format and according let you know if any idea looks good to me and after that we can have a discussion.
@sahilbhosale63 That was just a random suggestion, I admittedly didn't think about it too much. But that could be a good start and it definitely more informative than it is right now. If there are no other suggestions, please feel free to give it a shot.
This is the change which I have made. @efiop What do you think of it? Would you like to give any suggestions on this?
@sahilbhosale63 That looks good! Please feel free to submit a PR. Thank you! :pray:
@sahilbhosale63, @efiop, I think we should try making the output format human-readable rather than longer. For me, and the team, the important use case of dvc version
is to help/debug other users' issues. Making it longer only makes it cumbersome to share/read.
How about something like this:
DVC version: 0.89.0+9e96dd
---------------------------------------
Build Info: Python3.7 on Linux, installed via pip
Supports: All remotes and cache types
Repo: dvc + git, workspace with 'ext4' on '/dev/sda1'
Cache: ext4 on '/dev/sda1'
There's a room for improvement of ^ for sure.
@skshetry Sure, that looks pretty good! @sahilbhosale63 would you be up for changing the output to that new format?
Sure @efiop, I will make the above change to a new format as suggested by @skshetry
can we do something with that ugly warning? can we embed it into the Cache type: (no cache dir)
?
Here, the "Supports" and "Cache" lines highlighted in red in the above img should come in a single line under "Supports"as suggested by @skshetry.
But the thing is some remotes or caches might not be supported in some systems. As in this case, reflink is not supported. So, here we can't just put the msg as "Supports: All remotes and cache types".
So what should be done here?
@sahilbhosale63, most of the times, dvc will either support all of the remotes or any one of them (two or three if there's already some dependencies installed but rare). And, http/https
are always supported by default.
So, we could optimize these for usual scenarios and make it a bit ugly for rare scenarios.
Also, I'm fine with the following:
# Single remote:
Supports: gs remote, and hardlink/symlink cache types
# if it supports all remotes:
Supports: All remotes and reflink/hardlink/symlink cache types
# if it supports most of the remotes, but not all, we can make it a bit ugly as it is a rare scenario:
Supports: gs, azure, hdfs, azure, oss, ssh, gdrive remotes and reflink/hardlink/symlink cache types
As you can see, the last example is a bit lengthy. Also @sahilbhosale63, feel free to change the output format
wherever it does not make sense or if it could be improve further.
Thanks a lot for taking the task. :+1:
I have made the required changes. The only think which I want to ask is there is a line break after the end of this line "Supports: All remotes" because of this line of code logger.info("\n".join(info))
The code adds a line break after every sentence but I don't want a line break after "Supports: All remotes" so that the output would look like this "Supports: All remotes and hardlink/ symlink cache types" in a one single line.
So is there anyway we can achieve that in python??
@skshetry what should we do if we can't test for link type support?
I feel that we should not mix this information. Remotes are remotes, links are links - they are different, not related to each, so why do we show them in a single line?
@efiop @sahilbhosale63 do we need to update docs?
@efiop @sahilbhosale63 do we need to update docs?
Yes @shcheklein, We have to update the docs.
Most helpful comment
Sure @efiop, I will make the above change to a new format as suggested by @skshetry