Merge pull request #2331 from kurianbenoy/master

remove show-checksums flag for dvc status commmand
This commit is contained in:
Ruslan Kuprieiev
2019-08-01 20:58:24 +03:00
committed by GitHub
8 changed files with 8 additions and 38 deletions
-9
View File
@@ -24,7 +24,6 @@ class CmdDataPull(CmdDataBase):
targets=self.args.targets,
jobs=self.args.jobs,
remote=self.args.remote,
show_checksums=self.args.show_checksums,
all_branches=self.args.all_branches,
all_tags=self.args.all_tags,
with_deps=self.args.with_deps,
@@ -45,7 +44,6 @@ class CmdDataPush(CmdDataBase):
targets=self.args.targets,
jobs=self.args.jobs,
remote=self.args.remote,
show_checksums=self.args.show_checksums,
all_branches=self.args.all_branches,
all_tags=self.args.all_tags,
with_deps=self.args.with_deps,
@@ -65,7 +63,6 @@ class CmdDataFetch(CmdDataBase):
targets=self.args.targets,
jobs=self.args.jobs,
remote=self.args.remote,
show_checksums=self.args.show_checksums,
all_branches=self.args.all_branches,
all_tags=self.args.all_tags,
with_deps=self.args.with_deps,
@@ -88,12 +85,6 @@ def shared_parent_parser():
shared_parent_parser.add_argument(
"-j", "--jobs", type=int, help="Number of jobs to run simultaneously."
)
shared_parent_parser.add_argument(
"--show-checksums",
action="store_true",
default=False,
help="Show checksums instead of file names.",
)
shared_parent_parser.add_argument(
"targets",
nargs="*",
-1
View File
@@ -47,7 +47,6 @@ class CmdDataStatus(CmdDataBase):
targets=self.args.targets,
jobs=self.args.jobs,
cloud=self.args.cloud,
show_checksums=self.args.show_checksums,
remote=self.args.remote,
all_branches=self.args.all_branches,
all_tags=self.args.all_tags,
-2
View File
@@ -7,7 +7,6 @@ def pull(
jobs=None,
remote=None,
all_branches=False,
show_checksums=False,
with_deps=False,
all_tags=False,
force=False,
@@ -19,7 +18,6 @@ def pull(
remote=remote,
all_branches=all_branches,
all_tags=all_tags,
show_checksums=show_checksums,
with_deps=with_deps,
recursive=recursive,
)
+1 -4
View File
@@ -7,7 +7,6 @@ def push(
jobs=None,
remote=None,
all_branches=False,
show_checksums=False,
with_deps=False,
all_tags=False,
recursive=False,
@@ -23,6 +22,4 @@ def push(
jobs=jobs,
recursive=recursive,
)["local"]
return self.cloud.push(
used, jobs, remote=remote, show_checksums=show_checksums
)
return self.cloud.push(used, jobs, remote=remote)
+3 -8
View File
@@ -34,7 +34,6 @@ def _cloud_status(
targets=None,
jobs=None,
remote=None,
show_checksums=False,
all_branches=False,
with_deps=False,
all_tags=False,
@@ -78,10 +77,8 @@ def _cloud_status(
)["local"]
ret = {}
status_info = self.cloud.status(
used, jobs, remote=remote, show_checksums=show_checksums
)
for md5, info in status_info.items():
status_info = self.cloud.status(used, jobs, remote=remote)
for info in status_info.values():
name = info["name"]
status = info["status"]
if status in [cloud.STATUS_OK, cloud.STATUS_MISSING]:
@@ -100,7 +97,6 @@ def status(
jobs=None,
cloud=False,
remote=None,
show_checksums=False,
all_branches=False,
with_deps=False,
all_tags=False,
@@ -111,10 +107,9 @@ def status(
self,
targets,
jobs,
remote=remote,
show_checksums=show_checksums,
all_branches=all_branches,
with_deps=with_deps,
remote=remote,
all_tags=all_tags,
)
return _local_status(self, targets, with_deps=with_deps)
+4 -4
View File
@@ -23,7 +23,7 @@ _dvc_commit='-f --force -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_config='-u --unset --local --system --global'
_dvc_destroy='-f --force'
_dvc_diff='-t --target'
_dvc_fetch='--show-checksums -j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_fetch='-j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_get_url=''
_dvc_get='-o --out --rev'
_dvc_gc='-a --all-branches -T --all-tags -c --cloud -r --remote -f --force -p --projects -j --jobs'
@@ -41,8 +41,8 @@ _dvc_move='$(compgen -G *)'
_dvc_pipeline='list show'
_dvc_pipeline_list=''
_dvc_pipeline_show='-c --commands -o --outs --ascii --dot --tree -l --locked $(compgen -G *.dvc)'
_dvc_pull='--show-checksums -j --jobs -r --remote -a --all-branches -T --all-tags -f --force -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_push='--show-checksums -j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_pull='-j --jobs -r --remote -a --all-branches -T --all-tags -f --force -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_push='-j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_remote='add default list modify remove'
_dvc_remote_add='--global --system --local -d --default -f --force'
_dvc_remote_default='--global --system --local -u --unset'
@@ -53,7 +53,7 @@ _dvc_remove='-o --outs -p --purge -f --force $(compgen -G *.dvc)'
_dvc_repro='-f --force -s --single-item -c --cwd -m --metrics --dry -i --interactive -p --pipeline -P --all-pipelines --ignore-build-cache --no-commit -R --recursive --downstream $(compgen -G *.dvc)'
_dvc_root=''
_dvc_run='--no-exec -f --file -c --cwd -d --deps -o --outs -O --outs-no-cache --outs-persist --outs-persist-no-cache -m --metrics -M --metrics-no-cache -y --yes --overwrite-dvcfile --ignore-build-cache --remove-outs --no-commit -w --wdir'
_dvc_status='--show-checksums -j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -c --cloud $(compgen -G *.dvc)'
_dvc_status='-j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -c --cloud $(compgen -G *.dvc)'
_dvc_unlock='$(compgen -G *.dvc)'
_dvc_unprotect='$(compgen -G *)'
_dvc_update='$(compgen -G *.dvc)'
-3
View File
@@ -101,7 +101,6 @@ _dvc_diff=(
_dvc_fetch=(
{-j,--jobs}"[Number of jobs to run simultaneously.]:Number of jobs:"
"--show-checksums[Show checksums instead of file names.]"
{-r,--remote}"[Remote repository to fetch from.]:Remote repository:"
{-a,--all-branches}"[Fetch cache for all branches.]"
{-T,--all-tags}"[Fetch cache for all tags.]"
@@ -171,7 +170,6 @@ _dvc_pipeline=(
_dvc_pull=(
{-j,--jobs}"[Number of jobs to run simultaneously.]:Number of jobs:"
"--show-checksums[Show checksums instead of file names.]"
{-r,--remote}"[Remote repository to pull from.]:Remote repository:"
{-a,--all-branches}"[Fetch cache for all branches.]"
{-T,--all-tags}"[Fetch cache for all tags.]"
@@ -183,7 +181,6 @@ _dvc_pull=(
_dvc_push=(
{-j,--jobs}"[Number of jobs to run simultaneously.]:Number of jobs:"
"--show-checksums[Show checksums instead of file names.]"
{-r,--remote}"[Remote repository to push to.]:Remote repository:"
{-a,--all-branches}"[Push cache for all branches.]"
{-T,--all-tags}"[Push cache for all tags.]"
-7
View File
@@ -507,19 +507,14 @@ class TestDataCloudCLIBase(TestDvc):
cache_dir = stage_dir.outs[0].cache_path
# FIXME check status output
self.main(["status", "-c", "--show-checksums"] + args)
self.main(["push"] + args)
self.assertTrue(os.path.exists(cache))
self.assertTrue(os.path.isfile(cache))
self.assertTrue(os.path.isfile(cache_dir))
self.main(["status", "-c", "--show-checksums"] + args)
shutil.rmtree(self.dvc.cache.local.cache_dir)
self.main(["status", "-c", "--show-checksums"] + args)
self.main(["fetch"] + args)
self.assertTrue(os.path.exists(cache))
self.assertTrue(os.path.isfile(cache))
@@ -536,8 +531,6 @@ class TestDataCloudCLIBase(TestDvc):
self.assertEqual(fd.read(), self.FOO_CONTENTS)
self.assertTrue(os.path.isfile(cache_dir))
self.main(["status", "-c", "--show-checksums"] + args)
# NOTE: check if remote gc works correctly on directories
self.main(["gc", "-c", "-f"] + args)
shutil.move(