Repository: iterative/dvc

Issue:
add `dvc push` to the instructions after `dvc repro`
(See description in https://github.com/iterative/dvc/issues/2359#issuecomment-517826724 below.)
add `dvc push` to the instructions after `dvc repro`
(See description in https://github.com/iterative/dvc/issues/2359#issuecomment-517826724 below.)


Discussion:
Some context: 

Users tend to forget to call `dvc push` when `dvc repro` is done, to save the file to the cloud. Probably it affects the most automation scenarios, when you call `dvc repro` from a script.

@Casyfill :

1. Is my assumption about the scenario, correct?
2. Do you call `git commit`, `git push` in your case? Just trying to understand can it be solved by `git hooks` after all?
Solving this https://github.com/iterative/dvc/issues/2362 might solve the problem. I would add the message anyway. It does not hurt.
yes, absolutely. and indeed, does not hurt :-)
@shcheklein solving #2362 won't make pre-commit hook run `dvc push` :) We've talked about it in the original chat and it seems like `dvc push` on `commit` is not a generic enough scenario to be included in our default hooks.
I meant that running `dvc push` on `git push` might be enough in the particular case this topic originates. I totally understand that it's not a replacement for running dvc push after each repro.
Ah, got it @shcheklein .

Btw, this is just a random thought, but this topic makes me think about dvc hooks that dvc would call after some operations :slightly_smiling_face: E.g. you could write `.dvc/hooks/post-repro` to run `dvc push`. I wonder if this mechanism is viable in general and if it would be useful in any other scenarios. 
It's probably viable. But let's implement it in a proper way if we decide to :) Not the way git does (one single executable 🤦‍♂.)
Yep, maybe a yaml config like pre-commit has would be a better choice :slightly_smiling_face: Nice thing about these hooks is that they would be actually stored by git, so you won't have to setup your hooks after each clone. Created https://github.com/iterative/dvc/issues/2363 for that. @Casyfill if you have any thoughts about it, please feel free to share them :slightly_smiling_face: 
I'd like to work on this 
@SRITANU sounds good! let us know if you need any help.
I am extremely busy with my work. If anyone wants to take up the issue, please feel free to do that. If not, I am gonna get back to this issue when I get time.
Hi! Been using DVC for a while and wanted to contribute.
This seems pretty straightforward, if it still needs work, it would mean adding a `logger.info()` to

https://github.com/iterative/dvc/blob/549f342db9a6e77360583b3b0781dce47206c8c8/dvc/command/repro.py#L35-L37

Right?
Hi @jvfe !

Yeah, that's correct. Let us know if you'll have any questions. Thanks for looking into that! :pray: 
Some context: 

Users tend to forget to call `dvc push` when `dvc repro` is done, to save the file to the cloud. Probably it affects the most automation scenarios, when you call `dvc repro` from a script.

@Casyfill :

1. Is my assumption about the scenario, correct?
2. Do you call `git commit`, `git push` in your case? Just trying to understand can it be solved by `git hooks` after all?
Solving this https://github.com/iterative/dvc/issues/2362 might solve the problem. I would add the message anyway. It does not hurt.
yes, absolutely. and indeed, does not hurt :-)
@shcheklein solving #2362 won't make pre-commit hook run `dvc push` :) We've talked about it in the original chat and it seems like `dvc push` on `commit` is not a generic enough scenario to be included in our default hooks.
I meant that running `dvc push` on `git push` might be enough in the particular case this topic originates. I totally understand that it's not a replacement for running dvc push after each repro.
Ah, got it @shcheklein .

Btw, this is just a random thought, but this topic makes me think about dvc hooks that dvc would call after some operations :slightly_smiling_face: E.g. you could write `.dvc/hooks/post-repro` to run `dvc push`. I wonder if this mechanism is viable in general and if it would be useful in any other scenarios. 
It's probably viable. But let's implement it in a proper way if we decide to :) Not the way git does (one single executable 🤦‍♂.)
Yep, maybe a yaml config like pre-commit has would be a better choice :slightly_smiling_face: Nice thing about these hooks is that they would be actually stored by git, so you won't have to setup your hooks after each clone. Created https://github.com/iterative/dvc/issues/2363 for that. @Casyfill if you have any thoughts about it, please feel free to share them :slightly_smiling_face: 
I'd like to work on this 
@SRITANU sounds good! let us know if you need any help.
I am extremely busy with my work. If anyone wants to take up the issue, please feel free to do that. If not, I am gonna get back to this issue when I get time.
Hi! Been using DVC for a while and wanted to contribute.
This seems pretty straightforward, if it still needs work, it would mean adding a `logger.info()` to

https://github.com/iterative/dvc/blob/549f342db9a6e77360583b3b0781dce47206c8c8/dvc/command/repro.py#L35-L37

Right?
Hi @jvfe !

Yeah, that's correct. Let us know if you'll have any questions. Thanks for looking into that! :pray: 

Resolving patch:
diff --git a/dvc/command/repro.py b/dvc/command/repro.py
--- a/dvc/command/repro.py
+++ b/dvc/command/repro.py
@@ -30,6 +30,11 @@ def run(self):
 
                 if len(stages) == 0:
                     logger.info(CmdDataStatus.UP_TO_DATE_MSG)
+                else:
+                    logger.info(
+                        "Use `dvc push` to send your updates to "
+                        "remote storage."
+                    )
 
                 if self.args.metrics:
                     metrics = self.repo.metrics.show()


Test patch: