Skip to content

repro: enforce targets (and update desc) when -R is present? [qa] #4292

@jorgeorpinel

Description

@jorgeorpinel

The -R option of dvc repro has no effect when no targets that are directories are also given. For example, dvc repro -R is the same as just dvc repro. For UI and consistency improvement I propose

    • targets are enforced when -R is used, or at least WARN msg is printed otherwise so the user is aware he might be expecting something that's not being done.
    • Even if targets are given, at least one of them should be an existing directory path, or the above enforcement/warning will happen.
  1. (This may already be the case) if the target directory has no .dvc files or dvc.yaml, print a separate warning about that?

UPDATE: See #4292 (comment) below for an alternative solution — maybe easier.


THE REMAINING TEXT HAS BEEN EXTRACTED TO #4393 (so stop reading)

Separately (but related), the targets param accepted by dvc repro is described (in its help output) as Stages to reproduce. 'dvc.yaml' by default. This message is confusing as dvc.yaml is not a stage. In docs we're using Stage or .dvc file to reproduce but that's not correct either because apparently paths to dvc.yaml files are also accepted.

  • Should we use Stage or path to dvc.yaml or .dvc file to reproduce instead?
  • ^ still doesn't cover the case of accepting directory paths with -R, but that we can explain in that argument's description:
-  -R, --recursive       Reproduce all stages in the specified directory.
+  -R, --recursive       Reproduce all stages in the specified directories.
+                        These can be given as `targets` arguments.

and I'll explain this special case further in the cmd ref. Options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionrequires active participation to reach a conclusionenhancementEnhances DVCuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions