diff --git a/dvc/config.py b/dvc/config.py index cac6c3b8f..7791bcecc 100644 --- a/dvc/config.py +++ b/dvc/config.py @@ -120,7 +120,7 @@ class Config(object): SECTION_REMOTE_URL = 'url' SECTION_REMOTE_USER = 'user' SECTION_REMOTE_SCHEMA = { - SECTION_REMOTE_URL: supported_url, + SECTION_REMOTE_URL: And(supported_url, error="Unsupported URL"), Optional(SECTION_AWS_REGION): str, Optional(SECTION_AWS_PROFILE, default='default'): str, Optional(SECTION_AWS_CREDENTIALPATH, default=''): str, diff --git a/dvc/remote/base.py b/dvc/remote/base.py index f5ef4415b..d9f56dc28 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -41,9 +41,25 @@ class RemoteBase(object): deps_ok = all(cls.REQUIRES.values()) if url_ok and not deps_ok: missing = [k for k, v in cls.REQUIRES.items() if v is None] - msg = "URL \'{}\' is supported but requires " \ - "these missing dependencies: {}" - Logger.warn(msg.format(url, str(missing))) + msg = "URL \'{}\' is supported but requires these missing " \ + "dependencies: {}. If you have installed dvc using pip, " \ + "choose one of these options to proceed: \n" \ + "\n" \ + " 1) Install specific missing dependencies:\n" \ + " pip install {}\n" \ + " 2) Install dvc package that includes those missing " \ + "dependencies: \n" \ + " pip install dvc[{}]\n" \ + " 3) Install dvc package with all possible " \ + "dependencies included: \n" \ + " pip install dvc[all]\n" \ + "\n" \ + "If you have installed dvc from a binary package and you " \ + "are still seeing this message, please report it to us " \ + "using https://github.com/iterative/dvc/issues. Thank you!" + msg = msg.format(url, missing, " ".join(missing), cls.scheme) + Logger.warn(msg) + return url_ok and deps_ok @classmethod