From 8da7bf663877e0ef0f84513d2568bfd118f29f2c Mon Sep 17 00:00:00 2001 From: Victor Villas Date: Wed, 27 Jun 2018 14:15:09 +0000 Subject: [PATCH] Remove check deps flag and add warning on req miss --- dvc/remote/__init__.py | 2 +- dvc/remote/base.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dvc/remote/__init__.py b/dvc/remote/__init__.py index 1648e1ec8..40a44b5d3 100644 --- a/dvc/remote/__init__.py +++ b/dvc/remote/__init__.py @@ -21,6 +21,6 @@ def supported_url(url): def Remote(project, config): for r in REMOTES: - if r.supported(config, check_dependencies=True): + if r.supported(config): return r(project, config) raise DvcException('Remote \'{}\' is not supported.'.format(config)) diff --git a/dvc/remote/base.py b/dvc/remote/base.py index f526ae1c3..41c5e5637 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -39,10 +39,12 @@ class RemoteBase(object): pass @classmethod - def supported(cls, config, check_dependencies=False): - url = config[Config.SECTION_REMOTE_URL] - deps_ok = not check_dependencies or all(cls.REQUIRES) - return cls.match(url) != None and deps_ok + def supported(cls, config): + url_ok = cls.match(config[Config.SECTION_REMOTE_URL]) + deps_ok = all(cls.REQUIRES) + if url_ok and not deps_ok: + Logger.warning("URL matches but requires missing dependencies") + return url_ok and deps_ok @classmethod def match(cls, url):