googleapis / googleapis/google-cloud-python

Request to improve the `tqdm` progress bar and output

Ouverte
#15,511 3 commentaires 1 réaction 1 personne assignée Réclamée par @jiaxunwu Voir sur GitHub
api: bigquery type: feature request
Langage dominant
Python
Étoiles
5.4k
Forks
1.8k
Merge moyen
2 j 23 h
PR mergées (30 j)
123

Description

hi @aribray, looks like the issue is now solved! Thank you very much for that.

I only have one nitpick regarding the new progress bar setup: it's a bit weird to have two progress bars, and one of them is pushed to the right when the job ID appears:

![image](https://user-images.githubusercontent.com/5601876/200286260-fca6cba9-905b-4f8e-8ed5-46989d38f09f.png)

I suppose it would be better to have just a single progress bar on its own line (job ID should be its own line too).

If you want to make the output more complete, I've been also showing the data processed at the very end in my own bigquery magic like this:
```
from humanize.filesize import naturalsize
...
if args.info:
processed = naturalsize(query.total_bytes_processed)
display(ipywidgets.HTML(value='Data processed: ' + (
f'{processed}' if not query.cache_hit
else 'none (returned from cache)'
)))
```

With this addition the output looks like this:

![image](https://user-images.githubusercontent.com/5601876/200287992-5da8d1b9-511c-4fec-b7f2-297994cbb3ca.png)

It might look better if you add a colon after the "Job ID" too, but that's just my subjective preference.

_Originally posted by @GergelyKalmar in https://github.com/googleapis/python-bigquery/issues/1146#issuecomment-1305399150_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.