From 9a88e654781f5366ea47a7cac33ae50d8a5f2f1f Mon Sep 17 00:00:00 2001 From: Brandon Kaplan Date: Thu, 15 Feb 2024 20:30:37 -0600 Subject: [PATCH 1/2] add configuration to init --- sync/cli/__init__.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sync/cli/__init__.py b/sync/cli/__init__.py index 17e74e0..0ef70b3 100644 --- a/sync/cli/__init__.py +++ b/sync/cli/__init__.py @@ -1,6 +1,7 @@ """ Basic Sync CLI """ + import logging import click @@ -9,7 +10,7 @@ from sync.cli import awsdatabricks, azuredatabricks, projects, workspaces from sync.cli.util import OPTIONAL_DEFAULT from sync.clients.sync import get_default_client -from sync.config import API_KEY, DB_CONFIG, APIKey, DatabricksConf, init +from sync.config import API_KEY, CONFIG, DB_CONFIG, APIKey, Configuration, DatabricksConf, init LOG_FORMAT = "%(asctime)s %(levelname)s [%(name)s] %(message)s" @@ -77,11 +78,14 @@ def configure( init( APIKey(api_key_id=api_key_id, api_key_secret=api_key_secret), - DatabricksConf(host=dbx_host, token=dbx_token, aws_region_name=dbx_region) - if dbx_host != OPTIONAL_DEFAULT - and dbx_token != OPTIONAL_DEFAULT - and dbx_region != OPTIONAL_DEFAULT - else None, + Configuration(api_url=CONFIG.api_url if CONFIG else "https://api.synccomputing.com"), + ( + DatabricksConf(host=dbx_host, token=dbx_token, aws_region_name=dbx_region) + if dbx_host != OPTIONAL_DEFAULT + and dbx_token != OPTIONAL_DEFAULT + and dbx_region != OPTIONAL_DEFAULT + else None + ), ) From bbcf517161b4c75df50f3077a0e9f1bf349e4e40 Mon Sep 17 00:00:00 2001 From: Brandon Kaplan Date: Thu, 15 Feb 2024 20:31:31 -0600 Subject: [PATCH 2/2] version bump --- sync/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/__init__.py b/sync/__init__.py index 510dcb0..974f2cd 100644 --- a/sync/__init__.py +++ b/sync/__init__.py @@ -1,4 +1,4 @@ """Library for leveraging the power of Sync""" -__version__ = "1.0.1" +__version__ = "1.0.2" TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"