Skip to content

Commit 10851bf

Browse files
aayushsingh2502isivaselvan
authored andcommitted
func name update in example file
1 parent 4a9097f commit 10851bf

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

examples/query_run.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
You can run specific functions to test individual parts of the API.
77
88
Functions available:
9-
- test_list() - List query runs in a workspace
10-
- test_create() - Create a new query run
11-
- test_read() - Read a specific query run
12-
- test_logs() - Retrieve logs for a query run
13-
- test_cancel() - Cancel a query run
14-
- test_force_cancel() - Force cancel a query run
9+
- run_list() - List query runs in a workspace
10+
- run_create() - Create a new query run
11+
- run_read() - Read a specific query run
12+
- run_logs() - Retrieve logs for a query run
13+
- run_cancel() - Cancel a query run
14+
- run_force_cancel() - Force cancel a query run
1515
1616
Usage:
1717
python query_run.py
@@ -42,7 +42,7 @@ def get_client_and_workspace():
4242
return client, workspace
4343

4444

45-
def test_list():
45+
def run_list():
4646
"""Test 1: List query runs in a workspace."""
4747
print("=== Test 1: List Query Runs ===")
4848

@@ -71,7 +71,7 @@ def test_list():
7171
return []
7272

7373

74-
def test_create():
74+
def run_create():
7575
"""Test 2: Create a new query run."""
7676
print("\n=== Test 2: Create Query Run ===")
7777

@@ -107,7 +107,7 @@ def test_create():
107107
return None
108108

109109

110-
def test_read(query_run_id=None):
110+
def run_read(query_run_id=None):
111111
"""Test 3: Read a specific query run."""
112112
print("\n=== Test 3: Read Query Run ===")
113113

@@ -148,7 +148,7 @@ def test_read(query_run_id=None):
148148
return None
149149

150150

151-
def test_logs(query_run_id=None):
151+
def run_logs(query_run_id=None):
152152
"""Test 4: Retrieve logs for a query run."""
153153
print("\n=== Test 4: Get Query Run Logs ===")
154154

@@ -184,7 +184,7 @@ def test_logs(query_run_id=None):
184184
return None
185185

186186

187-
def test_cancel(query_run_id=None):
187+
def run_cancel(query_run_id=None):
188188
"""Test 5: Cancel a query run."""
189189
print("\n=== Test 5: Cancel Query Run ===")
190190

@@ -194,7 +194,7 @@ def test_cancel(query_run_id=None):
194194
# If no query_run_id provided, create a new one
195195
if not query_run_id:
196196
print("Creating a new query run to cancel...")
197-
new_run = test_create()
197+
new_run = run_create()
198198
if not new_run:
199199
print("ERROR: Could not create query run to cancel")
200200
return False
@@ -218,7 +218,7 @@ def test_cancel(query_run_id=None):
218218
return False
219219

220220

221-
def test_force_cancel(query_run_id=None):
221+
def run_force_cancel(query_run_id=None):
222222
"""Test 6: Force cancel a query run."""
223223
print("\n=== Test 6: Force Cancel Query Run ===")
224224

@@ -228,7 +228,7 @@ def test_force_cancel(query_run_id=None):
228228
# If no query_run_id provided, create a new one
229229
if not query_run_id:
230230
print("Creating a new query run to force cancel...")
231-
new_run = test_create()
231+
new_run = run_create()
232232
if not new_run:
233233
print("ERROR: Could not create query run to force cancel")
234234
return False
@@ -264,26 +264,26 @@ def main():
264264
print("=" * 80)
265265

266266
# Test 1: List query runs
267-
query_runs = test_list()
267+
query_runs = run_list()
268268

269269
# Test 2: Create a query run
270-
new_query_run = test_create()
270+
new_query_run = run_create()
271271

272272
# Test 3: Read a query run
273273
if query_runs:
274-
test_read(query_runs[0].id)
274+
run_read(query_runs[0].id)
275275
elif new_query_run:
276-
test_read(new_query_run.id)
276+
run_read(new_query_run.id)
277277

278278
# Test 4: Get logs (use first query run from list)
279279
if query_runs:
280-
test_logs(query_runs[0].id)
280+
run_logs(query_runs[0].id)
281281

282282
# Test 5: Cancel a query run (creates new one)
283-
test_cancel()
283+
run_cancel()
284284

285285
# Test 6: Force cancel a query run (creates new one)
286-
test_force_cancel()
286+
run_force_cancel()
287287

288288

289289
if __name__ == "__main__":

0 commit comments

Comments
 (0)