Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about pager in the pipeline command #831

Merged
merged 18 commits into from Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions static/docs/command-reference/pipeline/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ instead of stages.
option is specified) of stage outputs instead of paths to DVC-files.

- `--ascii` - visualize pipeline. It will print a graph (ASCII) instead of a
This conversation was marked as resolved.
Show resolved Hide resolved
list of path to DVC-files. (To navigate, use arrows or `W`, `A`, `S`, `D`
keys. To exit, press `Q`.)
list of path to DVC-files. (To navigate, use arrows keys. To exit, press `Q`.)

- `--dot` - show contents of `.dot` files with a DVC pipeline graph. It can be
passed to third party visualization utilities.
Expand All @@ -52,6 +51,29 @@ instead of stages.

- `-v`, `--verbose` - displays detailed tracing information.

## Paging the output

This command's output is automatically pushed to `less` command line tool if
`less` is runnable (installed and can be executed in your shell). To be exact,
the actual command is `less --chop-long-lines --clear-screen`.
This conversation was marked as resolved.
Show resolved Hide resolved

If `less` is not runnable (usually Microsoft Windows), the ouput is simply
printed out.

> Note Microsoft Windows users may also want to read
> [this how-to](/doc/user-guide/running-dvc-on-windows#enabling-paging-with-less).
This conversation was marked as resolved.
Show resolved Hide resolved

### Providing a custom pager

You can also override the default pager via `DVC_PAGER` environemnt variable.

For example
This conversation was marked as resolved.
Show resolved Hide resolved

```
This conversation was marked as resolved.
Show resolved Hide resolved
# one-time change in Bash
This conversation was marked as resolved.
Show resolved Hide resolved
DVC_PAGER=more dvc pipeline show --ascii my-pipeline.dvc
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
```

## Examples

Default mode: show stage files that `output.dvc` recursively depends on:
Expand Down
17 changes: 17 additions & 0 deletions static/docs/user-guide/running-dvc-on-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,20 @@ The performance of NTFS degrades while handling large volumes of files in a
directory.
[Here](https://stackoverflow.com/questions/197162/ntfs-performance-and-large-volumes-of-files-and-directories)
is the resource for reference.

## Enabling paging with `less`

By default DVC uses `less` to page output for some commands. Although, many
This conversation was marked as resolved.
Show resolved Hide resolved
operating systems have `less` preinstalled, there are still platforms where
`less` is not installed. This usually happens for Microsoft Windows.
This conversation was marked as resolved.
Show resolved Hide resolved
Fortunately, there is a easy way of installing `less` via
[Chocolatey](https://chocolatey.org/).
This conversation was marked as resolved.
Show resolved Hide resolved

```
This conversation was marked as resolved.
Show resolved Hide resolved
choco install less
```

If you do not want to use [Chocolatey](https://chocolatey.org/) for some reason,
you can still provide `less` by your own way. However, you must make `less` to
be runnable from `cmd`/`Powershell`. This usually means to add the `less`
installation directory to the `PATH` environement vairable.