Dvc: address `dvc list` review from Jorge

Created on 22 Feb 2020  路  10Comments  路  Source: iterative/dvc

p1-important refactoring

All 10 comments

Awesome! Please also check the latest state of the changes in iterative/dvc.org/pull/967 so both sides are in sync when this is addressed 馃檪

Also, should the file name be list.py? its ls.py now.

And not sure about the target name for the last param... Why not path like in dvc get/import?
UPDATE: Investigating in https://github.com/iterative/dvc.org/pull/1021#pullrequestreview-368410823

Another question here: is there an easy way to tell which files in the list are tracked by DVC and which ones by Git? This is kind of important for finding paths that can be sent to dvc import/get.

@jorgeorpinel At this moment only coloring is supported as a way of the differentiating types of the files.
You may read more in the comment

@JIoJIaJIu I think that link is just somewhat relevant. We have two things to colorize in a different way:

  1. DVC tracked files - e.g. we need to use a different color for a directory we did dvc add data\ with. Or the same for dvc add data\data.xml. And we should have a flag (--outs?) to filter DVC "outputs" only.
  2. DVC-files - we can use a color scheme for links, for example (since they serve to some extent as a link)
  3. Git-traked .dvcignored files.

That link it probably relevant to 3 only, but most likely @jorgeorpinel was asking about 1.

That link it probably relevant to 3 only

In the comment I provided info about 1 and 2 scenarios, but the main issue relates to 3, right
Let me summarize it here then

We color output as out=color

LS_COLORS="out=01;37" dvc list ...

will color outs only

OK thanks for the info guys, that's great to know. But since colorizing is not enabled by default (I assume) nor supported in every system, would it make sense to add another way to tell them apart? It can be as simple as a 2nd column in the output that has either git or dvc, or maybe only out for DVC outputs (stuff that you can dvc import/get). After all this was one of the main motivations for dvc list in the first place.

@jorgeorpinel what is the motivation for you to distinguish DVC-tracked and Git-tracked files by default? The whole point is to make the whole experience with get/import/list the same for all files as much as possible.

True, I forgot you can get/import Git-tracked files now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danfischetti picture danfischetti  路  41Comments

JoeyCarson picture JoeyCarson  路  53Comments

ChrisHowlin picture ChrisHowlin  路  35Comments

gvyshnya picture gvyshnya  路  36Comments

ynop picture ynop  路  41Comments