From 85d043088f6094404b22c1c91e1f31a1dd2b27b5 Mon Sep 17 00:00:00 2001 From: HJewkes Date: Tue, 4 May 2021 13:03:18 -0700 Subject: [PATCH 1/7] Fixing call to get Split definitions --- setup.py | 2 +- splitcli/accounts/user.py | 1 - splitcli/experiment/batch_client.py | 1 - splitcli/splitio_selectors/definition_selectors.py | 6 +++--- splitcli/splitio_selectors/segment_selectors.py | 1 - splitcli/splitio_selectors/split_selectors.py | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 02d15cd..0913386 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='splitcli', - version='0.0.9', + version='0.0.10', description='Use Split.io from the command line', long_description=long_description, long_description_content_type='text/markdown', diff --git a/splitcli/accounts/user.py b/splitcli/accounts/user.py index b5aff83..6e6ab3b 100644 --- a/splitcli/accounts/user.py +++ b/splitcli/accounts/user.py @@ -21,7 +21,6 @@ def load_user(): try: with open(config.config_file, 'r') as f: dictionary = json.load(f) - print(dictionary) return User(dictionary["adminapi"], dictionary["orgID"], dictionary["userID"], dictionary["firstname"], dictionary["lastname"], dictionary["email"]) except: return None diff --git a/splitcli/experiment/batch_client.py b/splitcli/experiment/batch_client.py index 474206c..64c7db4 100644 --- a/splitcli/experiment/batch_client.py +++ b/splitcli/experiment/batch_client.py @@ -44,7 +44,6 @@ def track(self, key, traffic_type, event_type, value, properties): while not success: success = self.split_client.track(key, traffic_type, event_type, value, properties) if not success: - print(key, traffic_type, event_type, value, properties) time.sleep(.1) def destroy(self): diff --git a/splitcli/splitio_selectors/definition_selectors.py b/splitcli/splitio_selectors/definition_selectors.py index be0662c..010354a 100644 --- a/splitcli/splitio_selectors/definition_selectors.py +++ b/splitcli/splitio_selectors/definition_selectors.py @@ -6,7 +6,7 @@ def manage_definition(workspace, split, environment): while True: - definition = get_definition_operator(workspace["name"], environment["name"], split["name"]) + definition = get_definition_operator(workspace["id"], environment["name"], split["name"]) if definition == None: (treatments, baseline) = select_treatments() create_definition_operator(workspace["id"], environment["name"], split["name"], treatments, baseline) @@ -158,8 +158,8 @@ def get_definition_operator(workspace_id, environment_name, split_name, expected try: return definitions_api.get(workspace_id, environment_name, split_name) except Exception as exc: - if expected: - menu.error_message("Definition does not exist:" + str(exc)) + # if expected: + menu.error_message("Definition does not exist:" + str(exc)) return None def create_definition_operator(workspace_id, environment_name, split_name, treatments=["on", "off"], baseline="off"): diff --git a/splitcli/splitio_selectors/segment_selectors.py b/splitcli/splitio_selectors/segment_selectors.py index 42ae807..1023855 100644 --- a/splitcli/splitio_selectors/segment_selectors.py +++ b/splitcli/splitio_selectors/segment_selectors.py @@ -103,7 +103,6 @@ def show_keys(segment_name, environment): page = 0 while True: keys = segments_api.get_segment_keys(segment_name, environment["name"], page) - print(keys) def add_keys(segment_name, environment): pass diff --git a/splitcli/splitio_selectors/split_selectors.py b/splitcli/splitio_selectors/split_selectors.py index ae8287a..216cb73 100644 --- a/splitcli/splitio_selectors/split_selectors.py +++ b/splitcli/splitio_selectors/split_selectors.py @@ -48,7 +48,7 @@ def manage_split(workspace, split): options = [] for environment in environments: - definition = definition_selectors.get_definition_operator(workspace, split, environment) + definition = definition_selectors.get_definition_operator(workspace["id"], environment["name"], split["name"]) option = environment if definition == None: option["option_name"] = "Create in " + option["name"] From 8fac363e3092cbe20fdc8c3d27076fb141759db0 Mon Sep 17 00:00:00 2001 From: HJewkes Date: Tue, 4 May 2021 13:05:03 -0700 Subject: [PATCH 2/7] Update logging --- splitcli/splitio_selectors/definition_selectors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/splitcli/splitio_selectors/definition_selectors.py b/splitcli/splitio_selectors/definition_selectors.py index 010354a..1d9a289 100644 --- a/splitcli/splitio_selectors/definition_selectors.py +++ b/splitcli/splitio_selectors/definition_selectors.py @@ -158,8 +158,8 @@ def get_definition_operator(workspace_id, environment_name, split_name, expected try: return definitions_api.get(workspace_id, environment_name, split_name) except Exception as exc: - # if expected: - menu.error_message("Definition does not exist:" + str(exc)) + if expected: + menu.error_message("Definition does not exist:" + str(exc)) return None def create_definition_operator(workspace_id, environment_name, split_name, treatments=["on", "off"], baseline="off"): From dbea56c4655bfe25d6614fff935141c9d192354a Mon Sep 17 00:00:00 2001 From: HJewkes Date: Tue, 4 May 2021 13:42:17 -0700 Subject: [PATCH 3/7] Fixing multi-variant creation --- splitcli/splitio_selectors/definition_selectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splitcli/splitio_selectors/definition_selectors.py b/splitcli/splitio_selectors/definition_selectors.py index 1d9a289..4ab1045 100644 --- a/splitcli/splitio_selectors/definition_selectors.py +++ b/splitcli/splitio_selectors/definition_selectors.py @@ -41,7 +41,7 @@ def select_treatments(): def input_treatments(): treatments = menu.input_list("Add treatment name", treatments_validator) - baseline,_ = menu.select("Select baseline treatment", treatments) + baseline = menu.select("Select baseline treatment", treatments) return (treatments, baseline) def treatments_validator(treatments): From ff0c4f6e28449cbec1bd7b2d794aeae761f4d952 Mon Sep 17 00:00:00 2001 From: HJewkes Date: Wed, 19 May 2021 11:50:38 -0700 Subject: [PATCH 4/7] Updating split logo --- splitcli/ux/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splitcli/ux/text.py b/splitcli/ux/text.py index 255e5f0..11d6388 100644 --- a/splitcli/ux/text.py +++ b/splitcli/ux/text.py @@ -38,7 +38,7 @@ def split_logo(): ///// ///////// @@@ @@ @@@ /////////// @@@ @@ @@@ - ///////////,,,,, @@@@@@ @@ @@@@@@@ @@@ @@ @@@@@@@ + ///////////,,,,, @@@@@@ @@ @@@@@@@ @@@ @@@@@@@ /////// ,,,,,,,,,,, @@ @@ @@@@ @@@ @@@ @@ @@@ ///////// ,,,,,,,,,,, @@@@@ @@ @@ @@@ @@ @@@ /////////// ,,,,,,,, @@@@ @@ @@ @@@ @@ @@@ From fa29058ec1505bdd5f7d4e59ada1a779b2eba295 Mon Sep 17 00:00:00 2001 From: Micah Silverman Date: Tue, 17 Aug 2021 15:44:49 -0400 Subject: [PATCH 5/7] changed backend to do. version bump. --- setup.py | 2 +- splitcli/config/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0913386..1e09b2b 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='splitcli', - version='0.0.10', + version='0.1.0', description='Use Split.io from the command line', long_description=long_description, long_description_content_type='text/markdown', diff --git a/splitcli/config/__init__.py b/splitcli/config/__init__.py index 152c3d1..5110bee 100644 --- a/splitcli/config/__init__.py +++ b/splitcli/config/__init__.py @@ -3,7 +3,7 @@ from os.path import expanduser from splitcli.ux import text -SPLIT_CLI_BACKEND_URI = "https://split-cli-backend.herokuapp.com" +SPLIT_CLI_BACKEND_URI = "https://cli-backend.afitnerd.com" SPLIT_CLI_BACKEND_API_URI = "/api/v1" SPLIT_CLI_BACKEND_BASE_URL = f"{SPLIT_CLI_BACKEND_URI}{SPLIT_CLI_BACKEND_API_URI}" From 1a61ad4c7fadc0418f8768de658e6fbfa7a30898 Mon Sep 17 00:00:00 2001 From: Micah Silverman Date: Fri, 24 Sep 2021 13:37:15 -0400 Subject: [PATCH 6/7] updated for deprecation --- README.md | 6 ++++++ setup.py | 2 +- splitcli/__main__.py | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35369d3..0640441 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Welcome to the Split CLI 👋 +------------------- + +**NOTE**: 9/24/2021 - A few months ago Split Skunkworks (aka developer advocacy) embarked on an experiment to create a command line interface (CLI) tool to provision and interact with Split accounts. The experiment was a success and we are now assessing putting formal engineering muscle behind it. For now, we are taking it offline until such time as we are ready to release a fully supported version. + +-------------------- + The Split CLI is a Command Line Interface built to simplify onboarding, and make it easy to manage your entire feature flag lifecycle. The changes and updates you make to your splits through the CLI will be reflected immediately in the Split UI. --- diff --git a/setup.py b/setup.py index 1e09b2b..d995bfd 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='splitcli', - version='0.1.0', + version='0.2.0', description='Use Split.io from the command line', long_description=long_description, long_description_content_type='text/markdown', diff --git a/splitcli/__main__.py b/splitcli/__main__.py index 4392ad6..a9ee34a 100644 --- a/splitcli/__main__.py +++ b/splitcli/__main__.py @@ -7,6 +7,15 @@ from splitcli.ux import menu, text from splitcli import config +def initial_prompt_deprecate(): + print(''' +A few months ago Split Skunkworks (aka developer advocacy) embarked on an +experiment to create a command line interface (CLI) tool to provision and +interact with Split accounts. The experiment was a success and we are now +assessing putting formal engineering muscle behind it. For now, we are taking +it offline until such time as we are ready to release a fully supported version. + ''') + exit() def initial_prompt(): # Infinite loop is stopped by exit option @@ -51,6 +60,6 @@ def main(): exit() menu.print_logo() - initial_prompt() + initial_prompt_deprecate() main() From 4b65d700551f0f7da4dafc301da77d358d9938ff Mon Sep 17 00:00:00 2001 From: Micah Silverman Date: Fri, 24 Sep 2021 13:38:08 -0400 Subject: [PATCH 7/7] highlighted deprecation in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0640441..b31cd12 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ------------------- -**NOTE**: 9/24/2021 - A few months ago Split Skunkworks (aka developer advocacy) embarked on an experiment to create a command line interface (CLI) tool to provision and interact with Split accounts. The experiment was a success and we are now assessing putting formal engineering muscle behind it. For now, we are taking it offline until such time as we are ready to release a fully supported version. +**NOTE**: 9/24/2021 - A few months ago Split Skunkworks (aka developer advocacy) embarked on an experiment to create a command line interface (CLI) tool to provision and interact with Split accounts. The experiment was a success and we are now assessing putting formal engineering muscle behind it. **For now, we are taking it offline until such time as we are ready to release a fully supported version.** --------------------