You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The contributing guides tell that users should run git push then dvc push.
The problem is, when someone pushes changes to github (git push), the dvc-diff.yml workflow will be triggered immediately.
After the workflow starts, it will take about 45 seconds to set up everything and starts to pull images from DagsHub (i.e., running the dvc pull command). So it means that users must run dvc push quickly after running git push, otherwise the dvc-diff.yml workflow will fail.
From the commit message of e30c708, it seems that the order of dvc push and git push doesn't matter. I think running dvc push before git push is a better and safer option.
Do you have any idea what's the difference between dvc status and dvc status --remote upstream? They give different outputs for me and we use dvc status many times in the contributing guides.
$ dvc status
Data and pipelines are up to date.
$ dvc status --remote upstream
Cache and remote 'upstream' are in sync.
dvc status will tell you if there are differences between the "workspace" files and your local files in .dvc/cache while dvc status --remote upstream will tell you if there are differences between the files in your local .dvc/cache and the .dvc/cache of the remote repository set as upstream.
For example, if you start with an up-to-date repository and run dvc status and dvc status --remote upstream you'll see the report that you mentioned above. If you were to then replace one of the dvc tracked image files inside pygmt/tests/baseline with a new file, the output from dvc status would change but the output from dvc status --remote upstream would not change (because the new file has not yet been added to your cache). If you were to then do dvc add following by committing the changed .dvc file to git, you would get Data and pipelines are up to date from dvc status and new information that the file is missing from the remote repository fromdvc status --remote upstream.
As an aside, I generally find dvc diff more informative than dvc status. It does not matter as much for PyGMT with its 1:1 matching of .dvc files to images, but for GMT it reports much more helpful information about which specific files were changed.
Activity
maxrjones commentedon Mar 1, 2022
I think we should also add
dvc status --remote upstreambeforedvc pushas an option for checking that the appropriate files will be pushed.seisman commentedon Mar 1, 2022
Sounds good.
seisman commentedon Mar 1, 2022
Do you have any idea what's the difference between
dvc statusanddvc status --remote upstream? They give different outputs for me and we usedvc statusmany times in the contributing guides.maxrjones commentedon Mar 1, 2022
dvc statuswill tell you if there are differences between the "workspace" files and your local files in.dvc/cachewhiledvc status --remote upstreamwill tell you if there are differences between the files in your local.dvc/cacheand the.dvc/cacheof the remote repository set asupstream.For example, if you start with an up-to-date repository and run
dvc statusanddvc status --remote upstreamyou'll see the report that you mentioned above. If you were to then replace one of the dvc tracked image files insidepygmt/tests/baselinewith a new file, the output fromdvc statuswould change but the output fromdvc status --remote upstreamwould not change (because the new file has not yet been added to your cache). If you were to then dodvc addfollowing by committing the changed.dvcfile to git, you would getData and pipelines are up to datefromdvc statusand new information that the file is missing from the remote repository fromdvc status --remote upstream.As an aside, I generally find
dvc diffmore informative thandvc status. It does not matter as much for PyGMT with its 1:1 matching of.dvcfiles to images, but for GMT it reports much more helpful information about which specific files were changed.