update progress bars - #286
ryanraaschCDC wants to merge 16 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a potentially expensive full materialization of Batch tasks and adds a heavyweight jupyter runtime dependency that likely shouldn’t be required for core library usage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates CLI/Notebook user experience by switching progress reporting in several long-running Azure operations to tqdm.auto and bumps the package version/changelog accordingly.
Changes:
- Replace manual loop progress logging with
tqdm.autoprogress bars for blob downloads/deletes/protection updates and Batch task-stat writing. - Bump project version to
1.0.1and document the change inchangelog.md. - Add notebook-related runtime dependencies to support notebook-friendly progress bars.
File summaries
| File | Description |
|---|---|
| pyproject.toml | Bumps version and adds runtime dependencies intended to support notebook progress bars. |
| changelog.md | Documents the 1.0.1 release notes for progress-bar changes and dependencies. |
| cfa/cloudops/blob.py | Switches to tqdm.auto and wraps blob download/protection loops with progress bars. |
| cfa/cloudops/blob_helpers.py | Adds tqdm.auto progress bars to folder download and delete operations. |
| cfa/cloudops/batch_helpers.py | Adds tqdm.auto progress bar to task-stat writing (and changes task listing behavior). |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
move jupyter and ipywidgets to a dev section of dependencies Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ryanraaschCDC <150935395+ryanraaschCDC@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate findings remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
cfa/cloudops/blob.py:26
tqdm.notebookis selected merely becauseget_ipython()exists, butipywidgetsis not a runtime dependency (it is only in the dev group). In an IPython/Jupyter environment without widgets, constructing this progress bar can raise tqdm's missing-IProgress error and make downloads/protection fail; usetqdm.autohere so it falls back to a console bar, as the other changed modules do.
from tqdm.notebook import tqdm
cfa/cloudops/blob_helpers.py:965
verbose=Falseis documented to suppress download progress and is passed through byCloudClient.download_folder, but this wrapper always creates a visible tqdm bar. Quiet downloads therefore become noisy; passdisable=not verboseto preserve the existing API behavior.
for blob in tqdm(flist, desc="Downloading files", unit="file"):
pyproject.toml:108
- These packages are added under the
devdependency group, but the new notebook branch importstqdm.notebookat runtime. A normalpip install(the documented installation path) will not install these dependencies, so notebook users without an existing widget stack can fail when the progress bar is created. Either expose notebook support as an optional install extra and document it, or keep the import on a gracefultqdm.autofallback instead of describing these as runtime dependencies.
"jupyter>=1.1.1",
"ipywidgets>=8.1.9",
"ipykernel>=7.3.0"
- Files reviewed: 5/6 changed files
- Comments generated: 3
- Review effort level: Lite
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ryanraaschCDC <150935395+ryanraaschCDC@users.noreply.github.com>
No description provided.