exp list: add the new flags (#7153)

fix: #7153
Unify the flags in `exp list` to `exp show`

1. Add new `-A`, `-n` flags to `exp list` command.
2. Add unit test for the flag parse.
3. unify the revs retrive logic to `exp show`.
4. Add functional test for `exp list`
5. Update the documents.

Co-authored-by: Jorge Orpinel <[email protected]>
This commit is contained in:
karajan1001
2022-03-08 16:17:33 +08:00
committed by Gao
co-authored by Jorge Orpinel
parent de390419a6
commit d033345860
10 changed files with 114 additions and 131 deletions
+8 -2
View File
@@ -197,9 +197,11 @@ def test_experiments_list(dvc, scm, mocker):
"experiments",
"list",
"origin",
"--all-commits",
"-n",
"-1",
"--rev",
"foo",
"--all",
"--names-only",
]
)
@@ -211,7 +213,11 @@ def test_experiments_list(dvc, scm, mocker):
assert cmd.run() == 0
m.assert_called_once_with(
cmd.repo, git_remote="origin", rev="foo", all_=True
cmd.repo,
git_remote="origin",
rev="foo",
all_commits=True,
num=-1,
)