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 -R dir #1026

Closed
tdeboissiere opened this issue Aug 20, 2018 · 3 comments
Closed

dvc add -R dir #1026

tdeboissiere opened this issue Aug 20, 2018 · 3 comments
Assignees
Labels
enhancement Enhances DVC
Milestone

Comments

@tdeboissiere
Copy link

Thanks for the great project !

Let's say I have the following workflow:

data/dataset1/dataset1.csv
data/dataset2/dataset2.csv

dvc add data/dataset1 && git add data/dataset1.dvc --> creates data/dataset1.dvc and tracks with git
dvc add data/dataset2 && git add data/dataset2.dvc --> creates data/dataset2.dvc and tracks with git

Now let's say I modify both dataset1.csv and dataset2.csv I want to add both updates to dvc in a single command
dvc add data --> this fails because data contains files tracked by git.

Would it be possible to support that use case (i.e. ignore the git-tracked files when running dvc add)

@efiop
Copy link
Contributor

efiop commented Aug 20, 2018

Hi @tdeboissiere !

This happens because dvc add data tries to track the directory as a whole and not as a set of files. We should definitely implement something like dvc add -R dir which will recursively walk through the directory and add each file in it that is not tracked by git. Turning this issue into a feature request, will be sure to implement this shortly.

Thanks,
Ruslan

@efiop efiop self-assigned this Aug 20, 2018
@efiop efiop added this to the Queue milestone Aug 20, 2018
@efiop efiop added the enhancement Enhances DVC label Aug 20, 2018
@efiop efiop changed the title dvc add: Ignore .dvc files dvc add -R dir Aug 20, 2018
efiop added a commit to efiop/dvc that referenced this issue Aug 21, 2018
Fixes iterative#1026

Signed-off-by: Ruslan Kuprieiev <[email protected]>
@efiop
Copy link
Contributor

efiop commented Aug 21, 2018

Hi @tdeboissiere !

Just wanted to let you know that I've merged the patch that implements this feature and I am going to release it in 0.18 today.

Thanks,
Ruslan

@tdeboissiere
Copy link
Author

Awesome, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC
Projects
None yet
Development

No branches or pull requests

2 participants