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

Adding a note on dvc plots diff --targets with revisions usage #1549

Merged
merged 3 commits into from
Jul 10, 2020
Merged
Changes from 2 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
22 changes: 17 additions & 5 deletions content/docs/command-reference/plots/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,32 @@ file:///Users/dmitry/src/plots/logs.html
Compare two specific versions (commit hashes, tags, or branches):

```dvc
$ dvc plots diff HEAD 0135527 --targets logs.csv
$ dvc plots diff --targets logs.csv -- HEAD 0135527
file:///Users/usr/src/plots/logs.csv.html
```

![](/img/plots_diff.svg)

> Alternatively, you can also run above statement as:
> Please note that when you're specifying `--targets` options with multiple
> `revisions`:
>
> ```dvc
> $ dvc plots diff --targets t1.json t2.csv HEAD v1 v2
> ```
>
> This statement will show an error because argument parser confuses `revisions`
> as arguments for `--targets` option. To avoid this error use `--` after all
> the arguments for `--targets`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this note up to the description as a regular paragraph, and just make a quick reminder in this note (block quote) here in the example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, per #1544 (comment) please move up into the --targets option bullet text instead. Feel free to use several paragraphs and even code blocks or block quote notes in there, but do try to summarize all this a little in both places. Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, let's try to keep it really simple. The problem itself is very simple and clear and one sentence should be enough in the description or option description to my mind.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, by "summarize all this a little" I meant summarize it a lot too 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Continued in #1549 (review)

>
> ```dvc
> $ dvc plots diff --targets logs.csv -- HEAD 0135527
> $ dvc plots diff --targets t1.json t2.csv -- HEAD v1 v2
> ```
>
> When you're specifying multiple revisions after `--targets`, use `--` so that
> argument parser doesn't confuse them as options for `--targets` argument.
> Alternatively, you can also run above statement as:
>
> ```dvc
> $ dvc plots diff HEAD v1 v2 --targets t1.json t2.csv
> ```
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

## Example: Confusion matrix

Expand Down