Skip to content
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

dvc add is too verbose #2565

Closed
dmpetrov opened this issue Oct 2, 2019 · 7 comments
Closed

dvc add is too verbose #2565

dmpetrov opened this issue Oct 2, 2019 · 7 comments
Labels
enhancement Enhances DVC p1-important Important, aka current backlog of things to do research ui user interface / interaction

Comments

@dmpetrov
Copy link
Member

dmpetrov commented Oct 2, 2019

$ dvc -V
0.60.1+39104a

$ vi sea_ice.csv # Modify a data file

$ dvc add sea_ice.csv # Update the data file
WARNING: Output 'sea_ice.csv' of 'sea_ice.csv.dvc' changed because it is 'modified'
Saving 'sea_ice.csv' to '.dvc/cache/c9/3f5350dae07d4fbbbade828c805f93'.
Saving information to 'sea_ice.csv.dvc'.

To track the changes with git, run:

	git add sea_ice.csv.dvc

3 lines - it is too much. At least the 2nd line (about cache) is not needed.

@dmpetrov dmpetrov added enhancement Enhances DVC ui user interface / interaction labels Oct 2, 2019
@mazzma12
Copy link

mazzma12 commented Oct 4, 2019

+1 for this, IMO the quite option should be the default.
Also related, the section about tracking to git is not often easy to copy paster from the terminal, especially on remote servers with file names running on multilines. An option like --git to stage automatically would be great

@dashohoxha
Copy link
Contributor

An option like --git to stage automatically would be great

Maybe staging to Git should be the default behavior for dvc add, because this is what you want and what you do in 99% of the cases. If someone does not want .dvc files to be tracked by Git, he can unstage them.

This is what dvc init already does. Maybe dvc run should do it too.
In general, all the commands that output a suggestion like git add ..., they should actually do it, instead of suggesting it, and then inform the user that they staged those files to git (the same way that they inform that they saved the data files to cache).

@mazzma12
Copy link

mazzma12 commented Oct 6, 2019

Maybe staging to Git should be the default behavior for dvc add, because this is what you want and what you do in 99% of the cases. If someone does not want .dvc files to be tracked by Git, he can unstage them.

+1, Default makes more sense from what I have experienced. And just git reset if you don't want it

@algomaster99
Copy link
Contributor

algomaster99 commented Oct 12, 2019

@efiop Can I take up this issue? To summarize the tasks here:

  • Explicitly add --verbose to display all 3 lines.
  • Make dvc add stage files to git too.

Am I correct?

@pared
Copy link
Contributor

pared commented Oct 13, 2019

@algomaster99
Definitely, point nr 1 makes sense.
Having said that, second point should probably be discussed in a separate issue. It is definitely not logging problem and also it indicates changing behaviour of one of our commands.

@efiop efiop added p1-important Important, aka current backlog of things to do research labels Oct 15, 2019
@dmpetrov dmpetrov mentioned this issue Jan 3, 2020
10 tasks
@dmpetrov
Copy link
Member Author

It was solved already. Closing.

$ dvc add fffff
100% Add|██████████████████████████████████████████████|1/1 [00:00,  1.40file/s]

To track the changes with git, run:

	git add .gitignore fffff.dvc

@mazzma12
Copy link

@algomaster99
Definitely, point nr 1 makes sense.
Having said that, second point should probably be discussed in a separate issue. It is definitely not logging problem and also it indicates changing behaviour of one of our commands.

For the record, this was discussed here (#4330) and was merged already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC p1-important Important, aka current backlog of things to do research ui user interface / interaction
Projects
None yet
Development

No branches or pull requests

6 participants