dvc remove: inconsistency between implementation and cmd ref

Created on 23 Jun 2020  ·  6Comments  ·  Source: iterative/dvc

  1. dvc remove -h output is totally different from cmd ref. dvc remove -h: "Remove stage entry and unprotect outputs". cmd ref: "Remove DVC-tracked files or directories from the workspace."
  2. Removing outs in cmd ref is described as default behavior (see --outs desc). The implementation behaves in the opposite way.
  3. dvc remove cleans gitignore entries. This doesn't mentioned neither in code (see #4074), neither in docs.

Information about your setup

Output of dvc version:

DVC version: 1.0.1
Python version: 3.6.8
Platform: Linux-5.3.0-59-generic-x86_64-with-Ubuntu-18.04-bionic
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('ext4', '/dev/sdb')
Repo: dvc, git

OS: Ubuntu 18.04

Python 3.6.8

triage

All 6 comments

The main question I have: which one is correct? Cmd ref or implementation?

@nik123 The implementation is correct. Looks like we missed some stuff in docs while upgrading to 1.0. 🙁

Experience shows that things get messy if code and cmd ref are updated simultaneously. Therefore I decided to resolve p.3 (mention .gitignore for dvc remove -h) first . Once (if) new text is agreed I'll create PR to resolve all the issues mentioned here in the cmd ref.

Yes def. simultaneous work on both sides is messy. Please figure out any updates pending on the core side, perhaps just to the help output (feel free to request my review to check the output strings) and once it's merged we should make a corresponding PR or issue on the docs repo. Thanks!

So is this a problem in the core repo? Otherwise there's already iterative/dvc.org/issues/1490 — only one issue is needed, probably.

OK so I guess points 1 and 3 apply to core:

"Remove stage entry and unprotect outputs" should probably be updated to "Remove stage entry or .dvc file, .gitignore entries, and unprotect outputs."

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kskyten picture kskyten  ·  44Comments

mdekstrand picture mdekstrand  ·  43Comments

shcheklein picture shcheklein  ·  36Comments

JoeyCarson picture JoeyCarson  ·  53Comments

kevin-hanselman picture kevin-hanselman  ·  37Comments