kevin-hanselman / dud

A lightweight CLI tool for versioning data alongside source code and building data pipelines.
https://kevin-hanselman.github.io/dud/
BSD 3-Clause "New" or "Revised" License
183 stars 8 forks source link

How do you add a directory? #153

Closed ezhang7423 closed 1 year ago

ezhang7423 commented 1 year ago
ubuntu@base ~/d/runs (main) [1]> dud stage add 2023-07-24 
Error: 2023-07-24: yaml: input error: read 2023-07-24: is a directory

If this isn't supported, it seems like a pretty essential feature...

thorstenwagner commented 1 year ago

Mh, it works different:

  1. Add your directory to stage file

    dud stage gen -o my/dir/ | tee my_dir.yaml 
  2. Add stage

dud stage add my_dir.yaml 

Do the rest:

dud commit
dud push
git add .
git commit -m "Added dir"
git push
kevin-hanselman commented 1 year ago

Thanks for the question, @ezhang7423! Sorry for the late response; I was away on vacation for a while.

@thorstenwagner has shown how this is done in Dud; thanks a bunch, @thorstenwagner!

TLDR: stage gen generates/creates a stage file, and stage add adds a stage file to Dud's index.