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

Show status when downloading assets #41

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Show status when downloading assets #41

merged 3 commits into from
Sep 5, 2024

Conversation

wch
Copy link
Collaborator

@wch wch commented Sep 5, 2024

This change makes it so that the asset download status is printed, and updated every 1 second. This is helpful when on a not-super-fast internet connection so that the user has an idea what is happening and how long they will have to wait.

❯ shinylive assets download
Downloading https://github.com/posit-dev/shinylive/releases/download/v0.7.0/shinylive-0.7.0.tar.gz...
5%, 6604 KB/s, 20.4/343.6 MB

It adds an option --no-status to disable the displaying of the status. However, as of right now, that option is only available when running shinylive assets download. It's not there if you run shinylive export ... and the assets are automatically downloaded. I think that's OK, since I believe it would be an unusual case where someone wants to run shinylive export and suppress the status, and for those use cases, they could just run shinylive assets download --no-status first.

@wch wch requested review from schloerke and gadenbuie September 5, 2024 17:16
Copy link
Contributor

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

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

LGTM! I agree with your choice a about the --no-status flag, although I would have called it --quiet (that would be the flag I'd try before reading the docs).

@wch
Copy link
Collaborator Author

wch commented Sep 5, 2024

I actually initially went with --quiet, but then I realized it wasn't actually quiet because it was still displaying the URL that's being downloaded.

I could be persuaded either way with whether the option should be --quiet or --no-status, but if it were --quiet, then I think it should suppress the URL as well.

@wch wch merged commit e565ddd into main Sep 5, 2024
6 checks passed
@wch wch deleted the download-status branch September 5, 2024 18:37
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.

2 participants