Skip to content

Conversation

@DDR0
Copy link
Contributor

@DDR0 DDR0 commented Sep 23, 2020

When there are no stages in the repo, show a friendly message to that effect and display a getting-started URL.

Fixes #4395.

Note: This PR, as well as the incidental #4606, are part of the application process for a job with DVC.

When there are no stages in the repo, show a friendly message to that
effect and display a getting-started URL.

Fixes treeverse#4395.
@DDR0
Copy link
Contributor Author

DDR0 commented Sep 24, 2020

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...

STATUS_LEN = 20
STATUS_INDENT = "\t"
UP_TO_DATE_MSG = "Data and pipelines are up to date."
EMPTY_PROJECT_MSG = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

@skshetry
Copy link
Collaborator

Hi, @DDR0. Thanks for the PR. Looks good, left one suggestion. πŸ™‚

@DDR0
Copy link
Contributor Author

DDR0 commented Sep 24, 2020

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.

@DDR0 DDR0 closed this Sep 24, 2020
@DDR0 DDR0 reopened this Sep 24, 2020
@DDR0
Copy link
Contributor Author

DDR0 commented Sep 24, 2020

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.
@DDR0 DDR0 force-pushed the friendly-status-output-for-empty-project branch from 656efd5 to 26963e4 Compare September 24, 2020 06:00
@DDR0
Copy link
Contributor Author

DDR0 commented Sep 24, 2020

Since restyled deleted its changes, I've just gone back and updated the last commit with them.

@DDR0
Copy link
Contributor Author

DDR0 commented Sep 24, 2020

Ah, looks like it didn't like the formatting in the patch, not of the patch itself. Should be good now. πŸ‘

@DDR0
Copy link
Contributor Author

DDR0 commented Sep 24, 2020 via email

@efiop efiop requested a review from skshetry September 24, 2020 18:57
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thank you! πŸ™

@efiop efiop merged commit a664059 into treeverse:master Sep 25, 2020
@efiop efiop added enhancement Enhances DVC ui user interface / interaction labels Sep 25, 2020
@DDR0
Copy link
Contributor Author

DDR0 commented Sep 30, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhances DVC ui user interface / interaction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

status: special output for empty projects

4 participants