googleapis / googleapis/google-cloud-python

Request to improve the `tqdm` progress bar and output

未关闭
#15,511 3 条评论 1 个 reaction 已指派 1 人 已被 @jiaxunwu 认领 在 GitHub 查看
api: bigquery type: feature request
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

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_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。