Skip to content

Commit b7d05ae

Browse files
committed
feat: more user feedback from fetch
1 parent ddb4d5e commit b7d05ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyhdx/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,22 @@ def fetch(num: int = typer.Option(10, min=1, help="Maximum number of datasets to
7373
missing_datasets = [data_id for data_id in missing_datasets if data_id]
7474

7575
failed = []
76+
success = []
7677
if missing_datasets:
7778
todo = list(missing_datasets)[:num]
7879
for data_id in tqdm(todo):
7980
try:
8081
vault.fetch_dataset(data_id)
82+
success.append(data_id)
8183
except Exception:
8284
failed.append(data_id)
85+
else:
86+
print("All datasets already downloaded")
8387

8488
if failed:
8589
print(f"Failed to download: {' ,'.join(failed)}")
90+
if success:
91+
print(f"Downloaded: {' ,'.join(success)}")
8692

8793

8894
@datasets_app.command()

0 commit comments

Comments
 (0)