@@ -117,10 +117,9 @@ def cli(ctx: Context, verbose: bool):
117117@click .option (
118118 "-tg" ,
119119 "--table-group-id" ,
120- required = False ,
120+ required = True ,
121121 type = click .STRING ,
122122 help = "The identifier for the table group used during a profile run. Use a table_group_id shown in list-table-groups." ,
123- default = None ,
124123)
125124def run_profile (configuration : Configuration , table_group_id : str ):
126125 click .echo (f"run-profile with table_group_id: { table_group_id } " )
@@ -136,16 +135,15 @@ def run_profile(configuration: Configuration, table_group_id: str):
136135 "-tg" ,
137136 "--table-group-id" ,
138137 help = "The identifier for the table group used during a profile run. Use a table_group_id shown in list-table-groups." ,
139- required = False ,
138+ required = True ,
140139 type = click .STRING ,
141- default = None ,
142140)
143141@click .option (
144142 "-ts" ,
145143 "--test-suite-key" ,
146144 help = "The identifier for a test suite. Use a test_suite_key shown in list-test-suites." ,
147- required = False ,
148- default = settings . DEFAULT_TEST_SUITE_KEY ,
145+ required = True ,
146+ type = click . STRING ,
149147)
150148@click .option (
151149 "-gs" ,
@@ -339,27 +337,6 @@ def list_test_runs(configuration: Configuration, project_key: str, test_suite_ke
339337
340338
341339@cli .command ("quick-start" , help = "Use to generate sample target database, for demo purposes." )
342- @click .option (
343- "--delete-target-db" ,
344- help = "Will delete the current target database, if it exists" ,
345- is_flag = True ,
346- default = False ,
347- )
348- @click .option (
349- "--iteration" ,
350- "-i" ,
351- default = 0 ,
352- required = False ,
353- help = "The monthly data increment snapshot. Can be 0, 1, 2 or 3. 0 is the initial data." ,
354- )
355- @click .option (
356- "--simulate-fast-forward" ,
357- "-s" ,
358- default = False ,
359- is_flag = True ,
360- required = False ,
361- help = "For demo purposes, simulates that some time pass by and the target data is changing. This will call the iterations in order." ,
362- )
363340@click .option (
364341 "--observability-api-url" ,
365342 help = "Observability API url to be able to export TestGen data to Observability using the command 'export-observability'" ,
@@ -375,11 +352,10 @@ def list_test_runs(configuration: Configuration, project_key: str, test_suite_ke
375352 default = "" ,
376353)
377354@pass_configuration
355+ @click .pass_context
378356def quick_start (
357+ ctx : Context ,
379358 configuration : Configuration ,
380- delete_target_db : bool ,
381- iteration : int ,
382- simulate_fast_forward : bool ,
383359 observability_api_url : str ,
384360 observability_api_key : str ,
385361):
@@ -388,19 +364,32 @@ def quick_start(
388364 if observability_api_key :
389365 settings .OBSERVABILITY_API_KEY = observability_api_key
390366
391- # Check if this is an increment or the initial state
392- if iteration == 0 and not simulate_fast_forward :
393- click .echo ("quick-start command" )
394- run_quick_start (delete_target_db )
367+ click .echo ("quick-start command" )
368+ run_quick_start (delete_target_db = True )
369+
370+ click .echo ("loading initial data" )
371+ run_quick_start_increment (0 )
372+ minutes_offset = - 30 * 24 * 60 # 1 month ago
373+ table_group_id = "0ea85e17-acbe-47fe-8394-9970725ad37d"
395374
396- if not simulate_fast_forward :
375+ click .echo (f"run-profile with table_group_id: { table_group_id } " )
376+ spinner = None
377+ if not configuration .verbose :
378+ spinner = MoonSpinner ("Processing ... " )
379+ message = run_profiling_queries (table_group_id , spinner = spinner , minutes_offset = minutes_offset )
380+ click .echo ("\n " + message )
381+
382+ LOG .info (f"run-test-generation with table_group_id: { table_group_id } test_suite: { settings .DEFAULT_TEST_SUITE_KEY } " )
383+ message = run_test_gen_queries (table_group_id , settings .DEFAULT_TEST_SUITE_KEY )
384+ click .echo ("\n " + message )
385+
386+ run_execution_steps (settings .PROJECT_KEY , settings .DEFAULT_TEST_SUITE_KEY , minutes_offset = minutes_offset )
387+
388+ for iteration in range (1 , 4 ):
389+ click .echo (f"Running iteration: { iteration } / 3" )
390+ minutes_offset = - 10 * 24 * 60 * (3 - iteration )
397391 run_quick_start_increment (iteration )
398- else :
399- for iteration in range (1 , 4 ):
400- click .echo (f"Running iteration: { iteration } / 3" )
401- minutes_offset = 2 * iteration
402- run_quick_start_increment (iteration )
403- run_execution_steps (settings .PROJECT_KEY , settings .DEFAULT_TEST_SUITE_KEY , minutes_offset = minutes_offset )
392+ run_execution_steps (settings .PROJECT_KEY , settings .DEFAULT_TEST_SUITE_KEY , minutes_offset = minutes_offset )
404393
405394 click .echo ("Quick start has successfully finished." )
406395
0 commit comments