diff --git a/docs/command_line.rst b/docs/command_line.rst index 51d6bf70..0d84f651 100644 --- a/docs/command_line.rst +++ b/docs/command_line.rst @@ -13,13 +13,11 @@ Common command line arguments: | F | Long | What it does | | lag | Flag | | +=====+==========+=====================================================+ -| -u | –url | The url of the serviceX ingress | -+-----+----------+-----------------------------------------------------+ | -b | –backend | Named backend from the .servicex file endpoints | | | | list | +-----+----------+-----------------------------------------------------+ -If neither url nor backend are specified then the client will attempt to +If no backend is specified then the client will attempt to use the ``default_endpoint`` value to determine who to talk to. codegens diff --git a/servicex/app/cli_options.py b/servicex/app/cli_options.py index 75aef22f..ae09cf84 100644 --- a/servicex/app/cli_options.py +++ b/servicex/app/cli_options.py @@ -28,7 +28,6 @@ import typer -url_cli_option = typer.Option(None, "-u", "--url", help="URL of ServiceX server") backend_cli_option = typer.Option(None, "-b", "--backend", help="Name of backend server from .servicex file") config_file_option = typer.Option(None, "-c", "--config", diff --git a/servicex/app/codegen.py b/servicex/app/codegen.py index 5b41f235..e4c41d20 100644 --- a/servicex/app/codegen.py +++ b/servicex/app/codegen.py @@ -29,7 +29,7 @@ import rich import typer -from servicex.app.cli_options import url_cli_option, backend_cli_option, config_file_option +from servicex.app.cli_options import backend_cli_option, config_file_option from servicex.servicex_client import ServiceXClient from typing import Optional @@ -38,13 +38,12 @@ @codegen_app.command(no_args_is_help=False) def flush( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, config_path: Optional[str] = config_file_option): """ Flush the available code generators from the cache """ - sx = ServiceXClient(url=url, backend=backend, config_path=config_path) + sx = ServiceXClient(backend=backend, config_path=config_path) cache = sx.query_cache cache.delete_codegen_by_backend(backend) rich.print("Deleted cached code generators.") @@ -52,11 +51,10 @@ def flush( @codegen_app.command(no_args_is_help=False) def list( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, config_path: Optional[str] = config_file_option): """ List the available code generators """ - sx = ServiceXClient(url=url, backend=backend, config_path=config_path) + sx = ServiceXClient(backend=backend, config_path=config_path) rich.print_json(data=sx.get_code_generators()) diff --git a/servicex/app/datasets.py b/servicex/app/datasets.py index 0ee9ee29..76a38778 100644 --- a/servicex/app/datasets.py +++ b/servicex/app/datasets.py @@ -30,7 +30,7 @@ import rich -from servicex.app.cli_options import url_cli_option, backend_cli_option +from servicex.app.cli_options import backend_cli_option import typer @@ -42,7 +42,6 @@ @datasets_app.command(no_args_is_help=True) def list( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, did_finder: Optional[str] = typer.Option( None, @@ -58,7 +57,7 @@ def list( """ List the datasets. """ - sx = ServiceXClient(url=url, backend=backend) + sx = ServiceXClient(backend=backend) table = Table(title="ServiceX Datasets") table.add_column("ID") table.add_column("Name") @@ -90,11 +89,10 @@ def list( @datasets_app.command(no_args_is_help=True) def get( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, dataset_id: int = typer.Argument(..., help="The ID of the dataset to get") ): - sx = ServiceXClient(url=url, backend=backend) + sx = ServiceXClient(backend=backend) table = Table(title=f"Dataset ID {dataset_id}") table.add_column("Paths") dataset = asyncio.run(sx.get_dataset(dataset_id)) @@ -114,11 +112,10 @@ def get( @datasets_app.command(no_args_is_help=True) def delete( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, dataset_id: int = typer.Argument(..., help="The ID of the dataset to delete") ): - sx = ServiceXClient(url=url, backend=backend) + sx = ServiceXClient(backend=backend) result = asyncio.run(sx.delete_dataset(dataset_id)) if result: typer.echo(f"Dataset {dataset_id} deleted") diff --git a/servicex/app/transforms.py b/servicex/app/transforms.py index 12ee0dbc..063e5964 100644 --- a/servicex/app/transforms.py +++ b/servicex/app/transforms.py @@ -37,7 +37,7 @@ from rich.progress import Progress from rich.table import Table -from servicex.app.cli_options import url_cli_option, backend_cli_option +from servicex.app.cli_options import backend_cli_option from servicex.minio_adapter import MinioAdapter from servicex.models import Status, ResultFile from servicex.servicex_client import ServiceXClient @@ -55,7 +55,6 @@ def transforms(): @transforms_app.command(no_args_is_help=True) def list( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, complete: Optional[bool] = typer.Option( None, "--complete", help="Only show successfully completed transforms" @@ -64,7 +63,7 @@ def list( """ List the transforms that have been run. """ - sx = ServiceXClient(url=url, backend=backend) + sx = ServiceXClient(backend=backend) table = Table(title="ServiceX Transforms") table.add_column("Transform ID") table.add_column("Title") @@ -82,7 +81,6 @@ def list( @transforms_app.command(no_args_is_help=True) def files( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, transform_id: str = typer.Option(None, "-t", "--transform-id", help="Transform ID"), ): @@ -94,7 +92,7 @@ async def list_files(sx: ServiceXClient, transform_id: str) -> List[ResultFile]: minio = MinioAdapter.for_transform(transform) return await minio.list_bucket() - sx = ServiceXClient(url=url, backend=backend) + sx = ServiceXClient(backend=backend) result_files = asyncio.run(list_files(sx, transform_id)) table = rich.table.Table(title=f"Files from {transform_id}") table.add_column("filename") @@ -107,7 +105,6 @@ async def list_files(sx: ServiceXClient, transform_id: str) -> List[ResultFile]: @transforms_app.command(no_args_is_help=True) def download( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, transform_id: str = typer.Option(None, "-t", "--transform-id", help="Transform ID"), local_dir: str = typer.Option(".", "-d", help="Local dir to download to"), @@ -136,7 +133,7 @@ async def download_with_progress(filename) -> Path: with Progress() as progress: download_progress = progress.add_task("Downloading", start=False, total=None) - sx = ServiceXClient(url=url, backend=backend) + sx = ServiceXClient(backend=backend) result_files = asyncio.run(download_files(sx, transform_id, local_dir)) for path in result_files: @@ -200,7 +197,6 @@ def create_kibana_link_parameters(log_url, transform_id=None, log_level=None, ti @transforms_app.command(no_args_is_help=True) def logs( - url: Optional[str] = url_cli_option, backend: Optional[str] = backend_cli_option, transform_id: str = typer.Option(None, "-t", "--transform-id", help="Transform ID"), log_level: Optional[LogLevel] = typer.Option("ERROR", "-l", "--log-level", @@ -213,7 +209,7 @@ def logs( """ Open the URL to the Kibana dashboard of the logs of a tranformer """ - sx = ServiceXClient(backend=backend, url=url) + sx = ServiceXClient(backend=backend) transforms = sx.get_transform_status(transform_id) if transforms and transforms.request_id == transform_id: kibana_link = create_kibana_link_parameters(transforms.log_url,