diff --git a/cr8/insert_fake_data.py b/cr8/insert_fake_data.py index 7e9ce0e..ad24b34 100644 --- a/cr8/insert_fake_data.py +++ b/cr8/insert_fake_data.py @@ -223,7 +223,8 @@ async def _gen_data_and_insert(q, e, client, stmt, row_fun, size_seq): type=argparse.FileType('r'), help='JSON file with a column to fake provider mapping.') @argh.wrap_errors([KeyboardInterrupt] + clients.client_errors) -def insert_fake_data(hosts=None, +def insert_fake_data(*, + hosts=None, table=None, num_records=1e5, bulk_size=1000, diff --git a/cr8/insert_from_sql.py b/cr8/insert_from_sql.py index 837f669..62ee549 100644 --- a/cr8/insert_from_sql.py +++ b/cr8/insert_from_sql.py @@ -68,7 +68,8 @@ async def async_insert_from_sql(src_uri, @argh.arg('-c', '--concurrency', type=to_int) @argh.arg('-of', '--output-fmt', choices=['json', 'text'], default='text') @argh.wrap_errors([KeyboardInterrupt, BrokenPipeError] + clients.client_errors) -def insert_from_sql(src_uri=None, +def insert_from_sql(*, + src_uri=None, query=None, fetch_size=100, concurrency=25, diff --git a/cr8/insert_json.py b/cr8/insert_json.py index e955534..b0a6134 100755 --- a/cr8/insert_json.py +++ b/cr8/insert_json.py @@ -54,7 +54,8 @@ def print_only(lines, table): @argh.arg('-i', '--infile', type=FileType('r', encoding='utf-8'), default=sys.stdin) @argh.arg('-of', '--output-fmt', choices=['json', 'text'], default='text') @argh.wrap_errors([KeyboardInterrupt, BrokenPipeError] + clients.client_errors) -def insert_json(table=None, +def insert_json(*, + table=None, bulk_size=1000, concurrency=25, hosts=None, diff --git a/cr8/reindex.py b/cr8/reindex.py index 5dd5538..b780f6b 100644 --- a/cr8/reindex.py +++ b/cr8/reindex.py @@ -106,7 +106,7 @@ async def _async_reindex(client): @argh.arg('--hosts', help='crate hosts', type=str, required=True) -def reindex(hosts=None): +def reindex(*, hosts=None): with clients.client(hosts) as client: run(_async_reindex, client) diff --git a/cr8/run_crate.py b/cr8/run_crate.py index a94d91d..27fc6e2 100644 --- a/cr8/run_crate.py +++ b/cr8/run_crate.py @@ -748,6 +748,7 @@ def create_node( @argh.wrap_errors([ArgumentError]) def run_crate( version, + *, env=None, setting=None, crate_root=None, diff --git a/cr8/run_spec.py b/cr8/run_spec.py index b23ec60..d3f0d37 100644 --- a/cr8/run_spec.py +++ b/cr8/run_spec.py @@ -273,7 +273,6 @@ def do_run_spec(spec, executor.exec_instructions(spec.teardown) -@argh.arg('benchmark_hosts', type=str) @argh.arg('-r', '--result_hosts', type=str) @argh.arg('-of', '--output-fmt', choices=['json', 'text'], default='text') @argh.arg('--action', @@ -287,6 +286,7 @@ def do_run_spec(spec, @argh.wrap_errors([KeyboardInterrupt, BrokenPipeError] + clients.client_errors) def run_spec(spec, benchmark_hosts, + *, result_hosts=None, output_fmt=None, logfile_info=None, diff --git a/cr8/run_track.py b/cr8/run_track.py index 29cae42..c70571b 100644 --- a/cr8/run_track.py +++ b/cr8/run_track.py @@ -114,6 +114,7 @@ def execute(self, track): help='Method used for sampling', default='reservoir') @argh.wrap_errors([KeyboardInterrupt, BrokenPipeError] + client_errors) def run_track(track, + *, result_hosts=None, crate_root=None, output_fmt=None, diff --git a/cr8/timeit.py b/cr8/timeit.py index 3e2392b..2399676 100755 --- a/cr8/timeit.py +++ b/cr8/timeit.py @@ -25,7 +25,8 @@ @argh.arg('--sample-mode', choices=('all', 'reservoir'), help='Method used for sampling', default='reservoir') @argh.wrap_errors([KeyboardInterrupt, BrokenPipeError] + client_errors) -def timeit(hosts=None, +def timeit(*, + hosts=None, stmt=None, warmup=30, repeat=None, diff --git a/tests/test_reindex.py b/tests/test_reindex.py index 64d0798..49e8990 100644 --- a/tests/test_reindex.py +++ b/tests/test_reindex.py @@ -51,7 +51,7 @@ def test_reindex(self): ) self._to_stop.append(crate_v4) crate_v4.start() - reindex(crate_v4.http_url) + reindex(hosts=crate_v4.http_url) with client(crate_v4.http_url) as c: result = aio.run(c.execute, "SELECT version FROM information_schema.tables WHERE table_name = 't'") version = result['rows'][0][0]