Skip to content

Conversation

@jvfe
Copy link
Contributor

@jvfe jvfe commented Oct 17, 2020

Adds a logger.info() statement to remind the user to run dvc push after
running dvc repro.

Closes #2359

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Adds a logger.info() statement to remind the user to run dvc push after
running dvc repro.

Fixes #2359
Copy link
Contributor

@pared pared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jvfe I am sorry for such a late response. The change looks good, though I have a suggestion about phrasing. Don't feel obliged to comply, I am not a native speaker.

logger.info(_show_metrics(metrics))

logger.info(
"To save your updates to remote storage, run 'dvc push'."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like "Use 'dvc push' to send your updates to remote storage."?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, done!

@pared pared requested a review from pmrowla October 26, 2020 12:24
@pared pared self-requested a review October 27, 2020 12:27
Comment on lines 38 to 40
logger.info(
"Use 'dvc push' to send your updates to remote storage."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more things:

  1. please use ` instead of ' - to keep consistency with other help messages
  2. I think we should move this message few lines up and log it under if len(stages)==0 in else cause, so that we will not get this message when there is nothing actually reproduced.

What do you think @jvfe?

Copy link
Contributor Author

@jvfe jvfe Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't really understand what you mean by using "instead of" in this context, could you explain further?

Also, sounds good putting an else statement below if len(stages)==0, like this, right?

if len(stages) == 0:
    logger.info(CmdDataStatus.UP_TO_DATE_MSG)
else:
    logger.info(
        "Use 'dvc push' to send your updates to remote storage."
    )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jvfe I mean backticks ( ` ) instead of ticks ( ' ) - sorry its hard to highlit them, due to markdown formatting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for explaining! I've done what you suggested but had to split the message in two lines or the pre-commit hook for flake8 would complain.

@pared
Copy link
Contributor

pared commented Oct 28, 2020

Seems like builds are failing for an unrelated reason.

@pared pared merged commit 4a7bb49 into treeverse:master Oct 30, 2020
@jvfe jvfe deleted the issue_2359 branch October 30, 2020 15:34
@skshetry skshetry added the enhancement Enhances DVC label Nov 12, 2020
Comment on lines +35 to +36
"Use `dvc push` to send your updates to "
"remote storage."
Copy link
Contributor

@jorgeorpinel jorgeorpinel Nov 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Should we update some of the console examples in https://dvc.org/doc/command-reference/repro? Several show the command's output.

p.s. looks like that could fit in a single-line-string in the code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point, but there is a problem:
In the example, in repro we modify code only, without influence on the output of the stage...
Seems to me like we should not display this help message there. So I would say we should not update the command reference but fix the underlying issue.

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

Successfully merging this pull request may close these issues.

add dvc push to the instructions after dvc repro

5 participants