Skip to content

Support calling DVC with output path as alternative to stage path #1403

@prihoda

Description

@prihoda

Hi guys, just an idea, what if you could also use file.txt just like file.txt.dvc when calling all DVC commands?

Since DVC already checks that a single file cannot be an output of multiple stages, its stage is uniquely defined and can be retrieved automatically. Both ways could be supported, the user could call DVC the way they prefer: dvc repro file.txt or dvc repro file.txt.dvc.

The motivation is:

  • file.txt appears before file.txt.dvc when using tab expansion :)
  • when working with files, my focus point is the output file rather than the DVC file

The main problems that come to mind:

  • for stages with multiple outputs, all of them would be reproduced/pushed/pulled. But is that too surprising?
  • it might be confusing when the file is not present yet - you could still use dvc pull file.txt, but you would have to know the filename.
  • it might be confusing that you can call DVC both ways

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions