Skip to content

dvc: replace pipeline with dag#3905

Merged
efiop merged 1 commit into
treeverse:masterfrom
efiop:fix-2392
May 31, 2020
Merged

dvc: replace pipeline with dag#3905
efiop merged 1 commit into
treeverse:masterfrom
efiop:fix-2392

Conversation

@efiop
Copy link
Copy Markdown
Contributor

@efiop efiop commented May 28, 2020

pipeline list is no more, it had some very questionable applications
(none to be precise) and was duplicating old pipeline show functionality.
We might introduce a different command to assist in listing (e.g. for
shell completion) in the future.

New dvc dag replaces dvc pipeline show and by-default will show
all pipelines in the project in ASCII (so there is no more --ascii)
and also --dot support, just like before. When given a target,
dvc dag (in any mode) will show DAG that leads to the target,
skipping the descendants, unless --full is specified.

Example commands:

dvc dag  # shows all pipelines in the project in ascii format
dvc dag --dot
dvc dag --vega (not implemented, just an idea on how it could be expanded in the future if we need to)
dvc dag mystage
dvc dag mystage --full

Fixes #3661
Fixes #2392

treeverse/dvc.org#1383

  • ❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@efiop efiop changed the title pipeline: redesign list and show [WIP] pipeline: redesign list and show May 28, 2020
Comment thread dvc/command/pipeline.py Outdated
Comment thread dvc/command/pipeline.py Outdated
Comment thread dvc/command/pipeline.py Outdated
@efiop
Copy link
Copy Markdown
Contributor Author

efiop commented May 28, 2020

Had a discussion with @shcheklein and we came up with an idea to maybe rename it to dvc dag. E.g.

dvc dag
dvc dag --tree
dvc dag --dot
dvc dag --vega (theoretically in the future)
dvc dag mystage
dvc dag mystage --full
dvc dag --commands
dvc dag --outs

@efiop efiop changed the title [WIP] pipeline: redesign list and show [WIP] dvc: replace pipeline with dag May 29, 2020
Comment thread dvc/command/dag.py Outdated
@drorata
Copy link
Copy Markdown

drorata commented May 29, 2020

I have two questions:

  • What's the role of Dvcfile in the context of dvc dag?
  • Is dvc dag mystage --full the same as dvc dag --full? And what about simply dvc dag? In this context, what about the case where the DAG have multiple connected components? I would argue that dvc dag and dvc dag --full would both return all components while dvc dag mystage --full should return the whole connected component containing mystage.

@efiop
Copy link
Copy Markdown
Contributor Author

efiop commented May 29, 2020

@drorata Thank you for the questions!

What's the role of Dvcfile in the context of dvc dag?

None, it is no longer the default target.

Is dvc dag mystage --full the same as dvc dag --full?

If you only have 1 pipeline in your project, then yes, those will be the same and would be the same as dvc dag(no arguments).

And what about simply dvc dag?

It will show you all the pipelines you have in your project in ASCII format.

In this context, what about the case where the DAG have multiple connected components? I would argue that dvc dag and dvc dag --full would both return all components while dvc dag mystage --full should return the whole connected component containing mystage.

Correct, dvc dag and dvc dag --full will show the same thing: your whole DAG (all pipelines). And dvc dag mystage --full will show the whole pipeline that this stage belongs too.

Here is an example with two pipelines in the project: asciicast

@efiop efiop force-pushed the fix-2392 branch 2 times, most recently from 53bada4 to 97949f1 Compare May 29, 2020 15:41
@efiop efiop requested a review from dmpetrov May 29, 2020 21:49
`pipeline list` is no more, it had some very questionable applications
(none to be precise) and was duplicating old `pipeline show` functionality.
We might introduce a different command to assist in listing (e.g. for
shell completion) in the future.

New `dvc dag` replaces `dvc pipeline show` and by-default will show
all pipelines in the project in ASCII (so there is no more --ascii)
and also `--dot` support, just like before. When given a target,
`dvc dag` (in any mode) will show DAG that leads to the target,
skipping the descendants, unless `--full` is specified.
@efiop efiop changed the title [WIP] dvc: replace pipeline with dag dvc: replace pipeline with dag May 31, 2020
@efiop efiop merged commit d1e08b6 into treeverse:master May 31, 2020
@efiop efiop deleted the fix-2392 branch May 31, 2020 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipeline show for all a project pipeline: show: doesn't show all DAGs in the projects when ran without arguments

2 participants