-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
status: Show friendly message for empty project. #4609
status: Show friendly message for empty project. #4609
Conversation
When there are no stages in the repo, show a friendly message to that effect and display a getting-started URL. Fixes iterative#4395.
Hm, apparently the message line is two characters too long. I had formatted with black which didn't complain, so I had assumed I was good to go. Let me just update things here... |
@@ -10,6 +12,10 @@ class CmdDataStatus(CmdDataBase): | |||
STATUS_LEN = 20 | |||
STATUS_INDENT = "\t" | |||
UP_TO_DATE_MSG = "Data and pipelines are up to date." | |||
EMPTY_PROJECT_MSG = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use format_link
?
Line 382 in 46bc893
def format_link(link): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't argue with that. Fixed in 656efd5.
Hi, @DDR0. Thanks for the PR. Looks good, left one suggestion. π |
Restyled didn't like my imports. I've incorporated its PR at #4610. However, I'm not sure why the python lint is failing - it claims it doesn't like my patch format, but this is not something I really have control over here. Github rather hides patch format from me, but I can provide it via a traditional email if desired. |
Unclosed this PR, as restyled-bot closed its PR too when I did so. |
Since I'd pulled the old syntax out of repo/init.py, I've fixed that up as well so no one makes that mistake again. Note that this adds <>s around the link text, unlike before: +---------------------------------------------------------------------+ | | | DVC has enabled anonymous aggregate usage analytics. | | Read the analytics documentation (and how to opt-out) here: | | <https://dvc.org/doc/user-guide/analytics> | | | +---------------------------------------------------------------------+ This is probably fine, since if we're going to have a standard link format we might as well stick with it consistently. If we don't like it, we can change format_link() I guess.
656efd5
to
26963e4
Compare
Since |
Ah, looks like it didn't like the formatting in the patch, not of the patch itself. Should be good now. π |
Sounds good to me.
I had only mentioned data because I'm not quite sure what the condition is
checking. I was guessing it was just for data, and I didn't want to print a
misleading message.
β¦On Thu., Sep. 24, 2020, 11:43 a.m. Ruslan Kuprieiev, < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dvc/command/status.py
<#4609 (comment)>:
> + "There is no data tracked in this project yet.\n"
+ "See {link} to get started!"
+ ).format(link=format_link("https://dvc.org/doc/start/data-versioning"))
How about
β¬οΈ Suggested change
- "There is no data tracked in this project yet.\n"
- "See {link} to get started!"
- ).format(link=format_link("https://dvc.org/doc/start/data-versioning"))
+ "There are no data or pipelines tracked in this project yet.\n"
+ "See {link} to get started!"
+ ).format(link=format_link("https://dvc.org/doc/start"))
? Since it is about both.
β
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#4609 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGSTIYU22I5L375LSP7PGTSHOHN3ANCNFSM4RXTWGDQ>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! π
Excellent to hear. I've made a note here for future reference to check this.
β¦On Wed., Sep. 30, 2020, 12:33 p.m. Jorge Orpinel, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dvc/command/status.py
<#4609 (comment)>:
> + elif not self.repo.stages:
+ logger.info(self.EMPTY_PROJECT_MSG)
else:
logger.info(self.UP_TO_DATE_MSG)
OK never mind. I checked all the instances and none seem to be for this
case (no data/pipelines in the project yet). All good here!
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4609 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGSTI3FLKHGYHFW7MQ5GP3SIN2YBANCNFSM4RXTWGDQ>
.
|
When there are no stages in the repo, show a friendly message to that effect and display a getting-started URL.
Fixes #4395.
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Note: This PR, as well as the incidental #4606, are part of the application process for a job with DVC.