Skip to content

Commit

Permalink
rename cli group to make it more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorov committed Oct 30, 2024
1 parent b5a4865 commit 0151ee2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ api/idc_index

## Command line tools

```{click} idc_index.cli:main
:prog: main
```{click} idc_index.cli:idc
:prog: idc
:nested: full
```
12 changes: 6 additions & 6 deletions idc_index/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@


@click.group()
def main():
"""Idc is a command line client to help download data from Imaging Data Commons."""
def idc():
"""Idc is a command line interface to the API functionality available in idc-index."""


def set_log_level(log_level):
Expand All @@ -42,7 +42,7 @@ def set_log_level(log_level):
logger_cli.setLevel(logging_level)


@main.command()
@idc.command()
@click.option(
"--download-dir",
required=True,
Expand Down Expand Up @@ -199,7 +199,7 @@ def download_from_selection(
)


@main.command()
@idc.command()
@click.option(
"--manifest-file",
required=True,
Expand Down Expand Up @@ -291,7 +291,7 @@ def download_from_manifest(
)


@main.command()
@idc.command()
@click.argument(
"generic_argument",
type=str,
Expand Down Expand Up @@ -371,4 +371,4 @@ def check_and_download(column_name, item_ids, download_dir, kwarg_name):


if __name__ == "__main__":
main()
idc()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ docs = [
]

[project.scripts]
idc = 'idc_index.cli:main'
idc = 'idc_index.cli:idc'

[project.urls]
Homepage = "https://github.com/ImagingDataCommons/idc-index"
Expand Down

0 comments on commit 0151ee2

Please sign in to comment.