Skip to content

Commit

Permalink
list: polish its cmd ref and mention in data registry use case, links
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Mar 15, 2020
1 parent 29b0dfc commit 9c3fc81
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 31 deletions.
33 changes: 11 additions & 22 deletions public/static/docs/command-reference/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,35 +88,26 @@ train.dvc
```

If you open the
[example-get-started project's page](https://github.com/iterative/example-get-started)
you will see something like:
[example-get-started project's page](https://github.com/iterative/example-get-started),
you will see a similar list, except that `model.pkl` will be missing. That's
because its tracked by DVC and not visible to Git. You can find it specified as
an output if you open
[`train.dvc`](https://github.com/iterative/example-get-started/blob/master/train.dvc).

```dvc
.gitignore
README.md
auc.metric
data
evaluate.dvc
featurize.dvc
prepare.dvc
src
train.dvc
```

The difference is the `model.pkl` binary file that is DVC-tracked and is not
visible in second listing (which is actually controlled by the `train.dvc`).

We can now, for example, run:
We can now, for example, run

```dvc
$ dvc get https://github.com/iterative/example-get-started model.pkl
```

to download the model file.
to download the model file (see `dvc get`).

## Example: List all files and directories in a data registry

We can do this recursively, using `-R` option:
Let's imagine a DVC repo used as a
[data registry](/doc/use-cases/data-registries#using-registries), structured
with different datasets in separate directories. We can do this recursively,
using `-R` option:

```dvc
$ dvc list -R https://github.com/iterative/dataset-registry
Expand All @@ -129,7 +120,5 @@ images/.gitignore
images/dvc-logo-outlines.png
images/dvc-logo-outlines.png.dvc
images/owl_sticker.png
images/owl_sticker.png.dvc
images/owl_sticker.svg
...
```
5 changes: 2 additions & 3 deletions public/static/docs/command-reference/pipeline/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ usage: dvc pipeline list [-h] [-q | -v]

## Description

`dvc list` displays a list of all existing stages in the <abbr>project</abbr>,
grouped in their corresponding [pipeline](/doc/command-reference/pipeline), when
connected.
Displays a list of all existing stages in the <abbr>project</abbr>, grouped in
their corresponding [pipeline](/doc/command-reference/pipeline), when connected.

> Note that the stages in these lists are in ascending order, that is, from last
> to first.
Expand Down
17 changes: 11 additions & 6 deletions public/static/docs/use-cases/data-registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,24 @@ files and directories.

### Listing data (list)

`dvc list` is analogous to using `aws s3 ls` or `ls`:
You may want to explore the contents of a data DVC repo before trying to reuse
its artifacts. The `dvc list` command is analogous to `ls`, or 3rd party tools
like `aws s3 ls`:

```dvc
$ dvc list -R https://github.com/iterative/dataset-registry
...
.gitignore
README.md
train.dvc
model.pkl
images/faces/
images/songs/
get-started/.gitignore
get-started/data.xml
get-started/data.xml.dvc
images/.gitignore
images/dvc-logo-outlines.png
...
```

> Note that both Git-tracked files and DVC-tracked data/models are listed.
### Simple download (get)

This is analogous to using direct download tools like
Expand Down

0 comments on commit 9c3fc81

Please sign in to comment.