mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-05 15:28:27 +01:00
rfc: Move welcome message to a private function
This commit is contained in:
+18
-14
@@ -106,7 +106,6 @@ class Project(object):
|
||||
Raises:
|
||||
KeyError: Raises an exception.
|
||||
"""
|
||||
import colorama
|
||||
import shutil
|
||||
from dvc.scm import SCM, Base
|
||||
from dvc.config import Config
|
||||
@@ -136,19 +135,7 @@ class Project(object):
|
||||
|
||||
logger.info('\nYou can now commit the changes to git.')
|
||||
|
||||
logger.info(
|
||||
"\n"
|
||||
"{yellow}What's next?{nc}\n"
|
||||
"{yellow}------------{nc}\n"
|
||||
"- Check out the documentation: {blue}https://dvc.org/doc{nc}\n"
|
||||
"- Get help and share ideas: {blue}https://dvc.org/chat{nc}\n"
|
||||
"- Star us on GitHub: {blue}https://github.com/iterative/dvc{nc}"
|
||||
|
||||
.format(yellow=colorama.Fore.YELLOW,
|
||||
blue=colorama.Fore.BLUE,
|
||||
green=colorama.Fore.GREEN,
|
||||
nc=colorama.Fore.RESET)
|
||||
)
|
||||
proj._welcome_message()
|
||||
|
||||
return proj
|
||||
|
||||
@@ -1243,3 +1230,20 @@ class Project(object):
|
||||
for G in self.pipelines():
|
||||
stages.extend(list(nx.get_node_attributes(G, 'stage').values()))
|
||||
return stages
|
||||
|
||||
def _welcome_message(self):
|
||||
import colorama
|
||||
|
||||
self.logger.info(
|
||||
"\n"
|
||||
"{yellow}What's next?{nc}\n"
|
||||
"{yellow}------------{nc}\n"
|
||||
"- Check out the documentation: {blue}https://dvc.org/doc{nc}\n"
|
||||
"- Get help and share ideas: {blue}https://dvc.org/chat{nc}\n"
|
||||
"- Star us on GitHub: {blue}https://github.com/iterative/dvc{nc}"
|
||||
|
||||
.format(yellow=colorama.Fore.YELLOW,
|
||||
blue=colorama.Fore.BLUE,
|
||||
green=colorama.Fore.GREEN,
|
||||
nc=colorama.Fore.RESET)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user