Skip to content

Commit

Permalink
commands: remove --show-json/--show-md/--show-csv flags (iterative#9475)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored May 18, 2023
1 parent 45c5c83 commit 90aaf5a
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 46 deletions.
1 change: 0 additions & 1 deletion dvc/commands/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ def add_parser(subparsers, parent_parser):
)
dag_parser.add_argument(
"--md",
"--show-md",
action="store_true",
default=False,
dest="markdown",
Expand Down
8 changes: 0 additions & 8 deletions dvc/commands/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,6 @@ def add_parser(subparsers, parent_parser):
default=False,
help="Show output in JSON format.",
)
data_status_parser.add_argument(
"--show-json",
action="store_true",
default=False,
dest="json",
help=argparse.SUPPRESS,
)
data_status_parser.add_argument(
"--granular",
action="store_true",
Expand Down Expand Up @@ -269,7 +262,6 @@ def add_parser(subparsers, parent_parser):
)
data_ls_parser.add_argument(
"--md",
"--show-md",
dest="markdown",
action="store_true",
default=False,
Expand Down
1 change: 0 additions & 1 deletion dvc/commands/data_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ def add_parser(subparsers, _parent_parser):
)
status_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Show status in JSON format.",
Expand Down
2 changes: 0 additions & 2 deletions dvc/commands/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def add_parser(subparsers, parent_parser):
)
diff_parser.add_argument(
"--json",
"--show-json",
help="Format the output into a JSON",
action="store_true",
default=False,
Expand All @@ -197,7 +196,6 @@ def add_parser(subparsers, parent_parser):
)
diff_parser.add_argument(
"--md",
"--show-md",
help="Show tabulated output in the Markdown format (GFM).",
action="store_true",
dest="markdown",
Expand Down
2 changes: 0 additions & 2 deletions dvc/commands/experiments/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ def add_parser(experiments_subparsers, parent_parser):
)
experiments_diff_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Show output in JSON format.",
)
experiments_diff_parser.add_argument(
"--md",
"--show-md",
action="store_true",
default=False,
dest="markdown",
Expand Down
1 change: 0 additions & 1 deletion dvc/commands/experiments/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def add_parser(experiments_subparsers, parent_parser):
)
save_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Show output in JSON format.",
Expand Down
3 changes: 0 additions & 3 deletions dvc/commands/experiments/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,21 +316,18 @@ def add_parser(experiments_subparsers, parent_parser):
)
experiments_show_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Print output in JSON format instead of a human-readable table.",
)
experiments_show_parser.add_argument(
"--csv",
"--show-csv",
action="store_true",
default=False,
help="Print output in csv format instead of a human-readable table.",
)
experiments_show_parser.add_argument(
"--md",
"--show-md",
action="store_true",
default=False,
dest="markdown",
Expand Down
1 change: 0 additions & 1 deletion dvc/commands/ls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def add_parser(subparsers, parent_parser):
)
list_parser.add_argument(
"--json",
"--show-json",
action="store_true",
help="Show output in JSON format.",
)
Expand Down
4 changes: 0 additions & 4 deletions dvc/commands/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ def add_parser(subparsers, parent_parser):
)
metrics_show_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Show output in JSON format.",
)
metrics_show_parser.add_argument(
"--md",
"--show-md",
action="store_true",
default=False,
dest="markdown",
Expand Down Expand Up @@ -223,14 +221,12 @@ def add_parser(subparsers, parent_parser):
)
metrics_diff_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Show output in JSON format.",
)
metrics_diff_parser.add_argument(
"--md",
"--show-md",
action="store_true",
default=False,
dest="markdown",
Expand Down
2 changes: 0 additions & 2 deletions dvc/commands/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ def add_parser(subparsers, parent_parser):
)
params_diff_parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help="Show output in JSON format.",
)
params_diff_parser.add_argument(
"--md",
"--show-md",
action="store_true",
default=False,
dest="markdown",
Expand Down
1 change: 0 additions & 1 deletion dvc/commands/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ def _add_ui_arguments(parser):
)
parser.add_argument(
"--json",
"--show-json",
action="store_true",
default=False,
help=argparse.SUPPRESS,
Expand Down
20 changes: 0 additions & 20 deletions tests/unit/command/test_compat_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,8 @@ def _id_gen(val) -> str:
@pytest.mark.parametrize(
"args, key",
[
(["dag", "--show-md"], "markdown"),
(["data", "ls", "--show-md"], "markdown"),
(["diff", "--show-json"], "json"),
(["diff", "--show-md"], "markdown"),
(["experiments", "diff", "--show-json"], "json"),
(["experiments", "diff", "--show-md"], "markdown"),
(["experiments", "show", "--show-json"], "json"),
(["experiments", "show", "--show-csv"], "csv"),
(["experiments", "show", "--show-md"], "markdown"),
(["ls", "--show-json", "."], "json"),
(["metrics", "diff", "--show-json"], "json"),
(["metrics", "diff", "--show-md"], "markdown"),
(["metrics", "show", "--show-json"], "json"),
(["metrics", "show", "--show-md"], "markdown"),
(["params", "diff", "--show-json"], "json"),
(["params", "diff", "--show-md"], "markdown"),
(["status", "--show-json"], "json"),
(["plots", "show", "--show-json"], "json"),
(["plots", "diff", "--show-json"], "json"),
(["exp", "list", "--names-only"], "name_only"),
(["stage", "list", "--names-only"], "name_only"),
(["data", "status", "--json"], "json"),
],
ids=_id_gen,
)
Expand Down

0 comments on commit 90aaf5a

Please sign in to comment.