Skip to content

FEAT: Overall progress bar for multi-file downloads  #71

Description

@Prakhar54-byte

Feature Request

**Describe the feature you'd like**                                                                                       
When downloading a group, artifact, or collection — which can contain dozens or                                           
hundreds of files — the CLI currently shows an individual `tqdm` progress bar for                                         
each file but gives no indication of overall progress.                                                                    
                                                                                                                          
Add a second, outer progress bar that tracks overall batch progress:                                                      

Downloading group: dbpedia/mappings
Overall [=====> ] 12/47 files | 340 MiB / 1.2 GiB
Current [=========> ] file.ttl.bz2 87 MiB [12.3 MiB/s]

**Why is this feature important?**                                                                                        
- When downloading a large collection (e.g. `dbpedia-snapshot-2022-12` with 100+                                          
  files and several GiB of data), the user has no way to know how much is left or                                         
  how long it will take.                                                                                                  
- The current experience shows one bar per file that disappears after each download,                                      
  making it feel like an endless sequence with no end in sight.                                                           
- An overall counter (e.g. `12/47 files`) gives users enough context to leave the                                         
  process running with confidence.                                                                                        
                                                                                                                          
**Describe the proposed implementation**                                                                                  
The `_download_files()` function in `download.py` iterates over a list of URLs.                                           
Wrapping that loop with a `tqdm` outer bar requires minimal change:                                                       
                                                                                                                          
```python                                                                                                                 
from tqdm import tqdm                                                                                                     
                                                                                                                          
def _download_files(urls, localDir, ...):                                                                                 
    with tqdm(total=len(urls), desc="Overall", unit="file", position=0) as overall:                                       
        for url in urls:                                                                                                  
            _download_file(url, localDir, ...)                                                                            
            overall.update(1)                                                                                             

The per-file tqdm bar inside _download_file would use position=1 to render
below the overall bar without overwriting it.

Optionally, if file sizes are known upfront (e.g. from JSON-LD byteSize fields),
the overall bar can also show bytes:

Overall  [=====>    ]  12/47 files  |  340 MiB / 1.2 GiB                                                                  

Describe alternatives you've considered

• Printing "Downloading file N of M: ..." as plain text before each file — simple
to implement but less visually clear than a progress bar.
• Suppressing per-file bars and only showing the overall bar — loses per-file speed
and ETA information which is useful for large individual files.

Additional context

• tqdm is already a dependency ( tqdm = "^4.42.1" in pyproject.toml ) so no
new dependencies are needed.
• Affected functions: _download_files() , _download_collection() ,
_download_artifact() , _download_group() — all in download.py .
• The tqdm position parameter supports nested bars natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions