From f3171e1d47f75a52c64f604de0f5dcb7f1aeebe7 Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Thu, 20 Dec 2018 17:09:53 -0800 Subject: [PATCH 1/3] make updater and analytics URLs human readable --- dvc/analytics.py | 2 +- dvc/updater.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dvc/analytics.py b/dvc/analytics.py index f0604aa88..ecef3dcfb 100644 --- a/dvc/analytics.py +++ b/dvc/analytics.py @@ -7,7 +7,7 @@ from dvc.logger import logger class Analytics(object): - URL = 'https://dddc07bh9f.execute-api.us-east-2.amazonaws.com/production' + URL = 'https://analytics.dvc.org/' TIMEOUT_POST = 5 USER_ID_FILE = 'user_id' diff --git a/dvc/updater.py b/dvc/updater.py index f2f9ebb3c..1cc18eb85 100644 --- a/dvc/updater.py +++ b/dvc/updater.py @@ -11,8 +11,7 @@ from dvc.utils import is_binary class Updater(object): # pragma: no cover - URL = 'https://4ki8820rsf.execute-api.us-east-2.amazonaws.com/' \ - 'prod/latest-version' + URL = 'https://updater.dvc.org/' UPDATER_FILE = 'updater' TIMEOUT = 24 * 60 * 60 # every day TIMEOUT_GET = 10 From 8e73b973749cb64689a96763ce99bf08e52a593f Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Fri, 21 Dec 2018 18:13:50 -0800 Subject: [PATCH 2/3] add an analytics notice on dvc init --- .gitignore | 1 + dvc/analytics.py | 2 +- dvc/cli.py | 2 +- dvc/project.py | 4 ++++ dvc/updater.py | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 92077daad..510e41c83 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ neatlynx/__pycache__ .idea cache *.pyc +.env/ cache .dvc.conf.lock diff --git a/dvc/analytics.py b/dvc/analytics.py index ecef3dcfb..de1a5c513 100644 --- a/dvc/analytics.py +++ b/dvc/analytics.py @@ -7,7 +7,7 @@ from dvc.logger import logger class Analytics(object): - URL = 'https://analytics.dvc.org/' + URL = 'https://analytics.dvc.org' TIMEOUT_POST = 5 USER_ID_FILE = 'user_id' diff --git a/dvc/cli.py b/dvc/cli.py index d515bd208..a503bdc65 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -111,7 +111,7 @@ def parse_args(argv=None): action='store_true', default=False, help="Initiate dvc in directory that is " - "not tracked by any scm tool(e.g. git).") + "not tracked by any scm tool (e.g. git).") init_parser.add_argument( '-f', '--force', diff --git a/dvc/project.py b/dvc/project.py index a48c32a26..dcd4a6ac1 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -1216,6 +1216,10 @@ class Project(object): import colorama self.logger.info( + "\n" + "DVC has enabled anonymous aggregate usage analytics.\n" + "Read the analytics documentation (and how to opt-out) here:\n" + "{blue}https://dvc.org/doc/user-guide/analytics{nc}\n" "\n" "{yellow}What's next?{nc}\n" "{yellow}------------{nc}\n" diff --git a/dvc/updater.py b/dvc/updater.py index 1cc18eb85..c2abb0de5 100644 --- a/dvc/updater.py +++ b/dvc/updater.py @@ -11,7 +11,7 @@ from dvc.utils import is_binary class Updater(object): # pragma: no cover - URL = 'https://updater.dvc.org/' + URL = 'https://updater.dvc.org' UPDATER_FILE = 'updater' TIMEOUT = 24 * 60 * 60 # every day TIMEOUT_GET = 10 From 3840b8fa7591ab304125ed7713ae93b341b07418 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 22 Dec 2018 04:48:54 +0200 Subject: [PATCH 3/3] test: gc: skip if key file does not exist Signed-off-by: Ruslan Kuprieiev --- tests/test_data_cloud.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_data_cloud.py b/tests/test_data_cloud.py index 4b94f6407..35b627de7 100644 --- a/tests/test_data_cloud.py +++ b/tests/test_data_cloud.py @@ -42,6 +42,9 @@ def _should_test_gcp(): if os.getenv("DVC_TEST_GCP") == "true": return True + if not os.path.exists(TestDvc.GCP_CREDS_FILE): + return False + creds = os.getenv("GOOGLE_APPLICATION_CREDENTIALS") if creds and os.getenv("GCP_CREDS"): if os.path.exists(creds):