Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow status.progress_bar to be used as a context manager #1308

Merged
merged 4 commits into from
May 3, 2024

Conversation

seantur
Copy link
Contributor

@seantur seantur commented May 3, 2024

Hi! Thanks for all the good work with marimo. I found myself wanting to update the subtitle while the progress bar was running, which is a pattern I've used before with tqdm.

I modified progress_bar to also be usable as a context manager, which exposes the underlying ProgressBar and allows for manual calls to update. This achieves the functionality I'm looking for, and still allows for using the normal iterable method.

Happy to make any changes if needed 😄

Copy link

vercel bot commented May 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2024 8:27pm
marimo-storybook ❌ Failed (Inspect) May 3, 2024 8:27pm

Copy link

github-actions bot commented May 3, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@seantur
Copy link
Contributor Author

seantur commented May 3, 2024

I have read the CLA Document and I hereby sign the CLA

@akshayka akshayka self-requested a review May 3, 2024 20:03
akshayka
akshayka previously approved these changes May 3, 2024
Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

Thanks! Nice API. This is definitely an improvement.

marimo/_plugins/stateless/status/_progress.py Show resolved Hide resolved
marimo/_plugins/stateless/status/_progress.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented May 3, 2024

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.4.11-dev11

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.

None yet

2 participants