Skip to content

python(feat): add progress indicators for job polling and file downlo…#517

Merged
wei-qlu merged 11 commits into
mainfrom
python/loading-progress-bar
Apr 1, 2026
Merged

python(feat): add progress indicators for job polling and file downlo…#517
wei-qlu merged 11 commits into
mainfrom
python/loading-progress-bar

Conversation

@wei-qlu
Copy link
Copy Markdown
Contributor

@wei-qlu wei-qlu commented Mar 29, 2026

What changed

  • Added progress indicators to wait_until_complete and wait_and_download using alive-progress.
    • Job polling: animated spinner with live status updates (CREATED → RUNNING → FINISHED).
    • File downloads: determinate progress bar with byte counts and speed.
  • New show_progress parameter on both methods — defaults to True for sync, False for async.
  • Global override via sift_client.config.show_progress (None = use defaults, True/False = force everywhere).
  • Added Config dataclass singleton in sift_client/config.py for global settings — typos raise AttributeError.

Validation

  • Existing unit/integration tests pass.
  • Manual export with show_progress=True:

Job status: RUNNING █▆▄▂▂ in 4s

Job 07de79a4-7a55-491f-8ed5-d1497c182fcf (data_export): FINISHED in 5.3s
Downloading |████████████████████████████████████████| 784.6kB/784.6kB [100%] in 0.1s (7.69MB/s)

@wei-qlu wei-qlu marked this pull request as ready for review March 29, 2026 20:02
nathan-sift
nathan-sift previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Contributor

@nathan-sift nathan-sift left a comment

Choose a reason for hiding this comment

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

looks good!

Comment thread python/lib/sift_client/resources/jobs.py Outdated
@alexluck-sift
Copy link
Copy Markdown
Collaborator

Have you done any testing to make sure this behaves as expected with our sync wrapping of async?

Comment thread python/lib/sift_client/resources/jobs.py Outdated
Comment thread python/lib/sift_client/resources/jobs.py Outdated
@wei-qlu wei-qlu requested a review from alexluck-sift March 31, 2026 22:26
@wei-qlu
Copy link
Copy Markdown
Contributor Author

wei-qlu commented Mar 31, 2026

Have you done any testing to make sure this behaves as expected with our sync wrapping of async?

added tests for wait_until_complete / wait_and_download with the sync_wrapper

Comment thread python/lib/sift_client/_internal/sync_wrapper.py
Comment thread python/lib/sift_client/__init__.py Outdated
@wei-qlu wei-qlu requested a review from alexluck-sift March 31, 2026 23:58
@wei-qlu wei-qlu requested a review from nathan-sift April 1, 2026 00:58
@wei-qlu wei-qlu enabled auto-merge (squash) April 1, 2026 17:47
@wei-qlu wei-qlu merged commit d178675 into main Apr 1, 2026
22 checks passed
@wei-qlu wei-qlu deleted the python/loading-progress-bar branch April 1, 2026 17:47
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.

3 participants