diff --git a/README.md b/README.md index 35369d3..b31cd12 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 02d15cd..d995bfd 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='splitcli', - version='0.0.9', + 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() 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/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}" 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..4ab1045 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) @@ -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): 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"] 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(): ///// ///////// @@@ @@ @@@ /////////// @@@ @@ @@@ - ///////////,,,,, @@@@@@ @@ @@@@@@@ @@@ @@ @@@@@@@ + ///////////,,,,, @@@@@@ @@ @@@@@@@ @@@ @@@@@@@ /////// ,,,,,,,,,,, @@ @@ @@@@ @@@ @@@ @@ @@@ ///////// ,,,,,,,,,,, @@@@@ @@ @@ @@@ @@ @@@ /////////// ,,,,,,,, @@@@ @@ @@ @@@ @@ @@@