-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick listing of stages #3743
Comments
Hi @mribeirodantas ! Sorry for the delay. We've changed the defaults in 1.0.0a1 to make Regarding the shell completion, I think we can definitely implement that by doing something like
I'm not sure if this is a good idea, seems like something that repro shouldn't bother with. If you think that shell completion is a more desirable feature, then we should go straight to implementing it, it shouldn't be too hard to do. |
Yeah, I talked to @shcheklein about shell completion and I gave a read in the files for shell completion (bash/zsh). I think that's something I would like to try to implement myself. Is it fine? |
@mribeirodantas that would be really cool and useful! :) btw, does |
For the dvc list, I think it does. |
It looks like
That's how it looks like for me right now:
|
I think we do want to pass them to repro. The argument -p in dvc repro reproduces the stage that contains the specified dvc-tracked file, so it would be nice if dvc repro could also tab-complete the name of files contained in a stage. About the format, we will have to parse it anyway, so whatever it's printed, we can parse that and make sure it's tab-completable. What do you think? |
it's a good feature and I've been thinking about this. e.g. run
I think it actually expects the stage DVC-file, not one one of the outputs. Unless I'm missing something. But even it were the case, I would have expected something like
The usual problem here is that it means the we make this output an API that we'll have to guarantee. Also, parsing will be pretty ad-hoc and weird. It is usually done with a special command. Here is a good guide on how to write a good output - https://devcenter.heroku.com/articles/cli-style-guide#human-readable-output-vs-machine-readable-output . I would say it makes sense to completely redo the default output for this command, as well as introduce:
|
We now have a $ dvc stages
build-us: Builds a US specific model (prepare -> process -> build-us)
build-gb: Builds a UK specific model (prepare -> process -> build-gb) We could even provide a default message, if $ dvc stages
build-us: Produces `model-us.hdf5` (7M), depends on `us-markets.csv` Or, maybe both of those to create a verbose output and maybe even with more fields. $ dvc stages
build-us: Builds a US specific model
Produces model-us.hdf5 (7M)
Depends on: `us-markets.csv`, etc.
build-gb: Builds a UK specific model
Produces model-gb.hdf5 (7M)
Depends on: `gb-markets.csv`, etc. I might have gone over the top here in the suggestion, but the core of it is to list stages and provide a snippet of a helpful message (preferably with beautiful colours). :) |
Let's start with something simple like E.g.
or with target:
We can start with this being a default behavior for now, and we'll change it to something more verbose later as noted by @skshetry . |
This looks a lot like opening dvc.lock (maybe just copy over |
|
Before last release, it was handy to reproduce my stages due to easy filename completion in the command line, due to the stages being files in the directory. All I had to do was to type
dvc repro
, start typing the name and hit TAB.Now, stages are fields in a YAML-formatted single file. If I don't know exactly the stage name, I must open the file, look for the part of the file where the stage name that I am looking for is located at, and check or copy-paste from there. Then leave the file and type.
The ideal feature would be to auto-complete with TAB, just like before, but this can be outside the technical scope of DVC (a dirty fix would be to have empty files with stage names, but I don't think that's a good solution...). Therefore, I think a feature that could improve usability would be listing of stages. There could be a new option in the repro command such as
dvc repro -l
. This command would parse the dvc.yaml and list the stage names so that the user could type them by seeing the desired stage name on the same screen since it has just been printed out.The text was updated successfully, but these errors were encountered: