iterative / example-repos-dev

Source code and generator scripts for example DVC projects
https://dvc.org/doc
21 stars 13 forks source link

example-get-started: fix plot paths #147

Closed 0x2b3bfa0 closed 1 year ago

0x2b3bfa0 commented 1 year ago

dvc plots diff target paths pointed to non-existent locations and caused vl2svg to fail.

shcheklein commented 1 year ago

Thanks @0x2b3bfa0 ! We should probably make sure that it fails if one of the commands fails (and make sure that plots fail in this case, probably CML report also should fail?)

0x2b3bfa0 commented 1 year ago

The vl2svg command exits with code 0 no matter what, so there is no elegant solution on that front. As well, CML doesn't fail when a linked file doesn't exist, because it can also be a remote URL. 😅

Maybe DVC should exit with non-zero status if the --target doesn't exist?

0x2b3bfa0 commented 1 year ago

Alternatively, there are “solutions” like this: 🙃

test -s input.json
vl2svg $_ output.svg