Skip to content

Add help text for codegen and datasets CLI #639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions servicex/app/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
codegen_app = typer.Typer(name="codegen", no_args_is_help=True)


@codegen_app.callback()
def codegen() -> None:
"""Sub-commands for interacting with available backend code generators."""
pass


@codegen_app.command(no_args_is_help=False)
def list(
backend: Optional[str] = backend_cli_option,
Expand Down
24 changes: 22 additions & 2 deletions servicex/app/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
from rich.table import Table

datasets_app = typer.Typer(name="datasets", no_args_is_help=True)


@datasets_app.callback()
def datasets() -> None:
"""Sub-commands for interacting with the list of looked-up datasets on the server."""
pass


did_finder_opt = typer.Option(
None,
help="Filter datasets by DID finder. Some useful values are 'rucio' or 'user'",
Expand All @@ -60,7 +68,9 @@ def list(
show_deleted: Optional[bool] = show_deleted_opt,
):
"""
List the datasets. Use fancy formatting if printing to a terminal.
List the datasets on the server.

Use fancy formatting if printing to a terminal.
Output as plain text if redirected.
"""
sx = ServiceXClient(backend=backend, config_path=config_path)
Expand Down Expand Up @@ -104,7 +114,11 @@ def get(
dataset_id: int = dataset_id_get_arg,
):
"""
Get the details of a dataset. Output as a pretty, nested table if printing to a terminal.
List the files in a dataset.

Known replicas on the GRID are listed.

Output as a pretty, nested table if printing to a terminal.
Output as json if redirected.
"""
sx = ServiceXClient(backend=backend, config_path=config_path)
Expand Down Expand Up @@ -147,6 +161,12 @@ def delete(
config_path: Optional[str] = config_file_option,
dataset_id: int = dataset_id_delete_arg,
):
"""
Remove a dataset from the ServiceX.

The next time it is queried, it will have to be looked up again. This command should only be
used when debugging.
"""
sx = ServiceXClient(backend=backend, config_path=config_path)
result = sx.delete_dataset(dataset_id)
if result:
Expand Down
Loading