Skip to content

feat(download): add overall progress bar for multi-file downloads#76

Open
Prakhar54-byte wants to merge 1 commit into
dbpedia:mainfrom
Prakhar54-byte:feature/overall-progress-bar
Open

feat(download): add overall progress bar for multi-file downloads#76
Prakhar54-byte wants to merge 1 commit into
dbpedia:mainfrom
Prakhar54-byte:feature/overall-progress-bar

Conversation

@Prakhar54-byte

@Prakhar54-byte Prakhar54-byte commented Jul 5, 2026

Copy link
Copy Markdown

Resolves #71 the requested feature for an overall progress bar.

This PR wraps the URL iteration list in _download_files() with a tqdm progress bar (with position=0) to display the overall completion progress across all files, which complements the existing per-file byte-level progress bars.

Summary by CodeRabbit

  • New Features
    • Added an overall progress indicator for multi-file downloads, making it easier to track total download progress at a glance.
    • Individual file progress display remains available during each download.

Wraps the URL iteration list in _download_files with a tqdm progress bar
to display overall completion progress, which complements the existing
per-file byte-level progress bars.

Closes #<FEATURE-PROGRESS-BAR>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The _download_files function in databusclient/api/download.py now wraps its URL iteration loop with a tqdm progress bar labeled "Overall Progress", displaying aggregate download progress across multiple files at a fixed console position.

Changes

Overall Progress Bar

Layer / File(s) Summary
Add overall progress indicator to multi-file download loop
databusclient/api/download.py
The for url in urls loop in _download_files is replaced with for url in tqdm(urls, desc="Overall Progress", unit="file", position=0), adding an aggregate progress bar for multi-file downloads.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Related issues: #71 (Overall progress bar for multi-file downloads)

Suggested labels: enhancement

Suggested reviewers:

Poem:
A rabbit hops with bar in tow,
"Overall Progress" starts to show,
One file, then two, then more downloads,
No longer lost on winding roads,
Tqdm ticks—hooray, we know! 🐰📊

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding an overall progress bar for multi-file downloads.
Description check ✅ Passed The description states the change and links issue #71, but it omits the template's type and checklist sections.
Linked Issues check ✅ Passed The PR implements the requested outer progress bar for multi-file downloads, satisfying issue #71's main objective.
Out of Scope Changes check ✅ Passed The change appears narrowly scoped to the requested progress-bar enhancement with no unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Prakhar54-byte

Copy link
Copy Markdown
Author

@coderabbitai help

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai rate limit to show your current review rate limit status.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
  • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
  • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai emit path instructions to emit generated path-specific review instructions for this repository.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues identified in unresolved review comments.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@Prakhar54-byte

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
databusclient/api/download.py (1)

544-547: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Inner per-file bar not updated to position=1; may conflict with outer position=0 bar.

Issue #71's suggested design pins the outer bar to position=0 and the per-file bar to position=1. This PR only sets position=0 here; the per-file tqdm call in _download_file (line 470) still omits position and keeps the default leave=True. With an explicitly pinned outer bar, tqdm's automatic position allocation for the inner bar may not coordinate correctly, and since leave=True leaves each closed file-bar printed, the overall bar could end up interleaved/overwritten as multiple leftover lines accumulate during a large batch download.

♻️ Suggested fix
     progress_bar = tqdm(total=total_size_in_bytes, unit="iB", unit_scale=True)
+    progress_bar = tqdm(total=total_size_in_bytes, unit="iB", unit_scale=True, position=1, leave=False)

Please verify this doesn't cause visual glitches (overlapping/duplicated lines) when running against a real multi-file download.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@databusclient/api/download.py` around lines 544 - 547, The progress bar
layout is only partially pinned, which can cause the outer and per-file `tqdm`
bars to overlap or leave duplicated lines during multi-file downloads. Update
`_download_file`’s inner `tqdm` call to explicitly use `position=1` and set it
to not persist after completion, while keeping the outer loop in `download` at
`position=0`. Make sure the `tqdm` usage in both `download` and `_download_file`
follows the intended two-line layout consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@databusclient/api/download.py`:
- Around line 544-547: The progress bar layout is only partially pinned, which
can cause the outer and per-file `tqdm` bars to overlap or leave duplicated
lines during multi-file downloads. Update `_download_file`’s inner `tqdm` call
to explicitly use `position=1` and set it to not persist after completion, while
keeping the outer loop in `download` at `position=0`. Make sure the `tqdm` usage
in both `download` and `_download_file` follows the intended two-line layout
consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1761aa0c-0f2d-47c3-a2fe-fc46cf57d08f

📥 Commits

Reviewing files that changed from the base of the PR and between ca7ac2d and 922bed3.

📒 Files selected for processing (1)
  • databusclient/api/download.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Overall progress bar for multi-file downloads

1 participant