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

Add disable progress bar option #386

Closed
aflag opened this issue Aug 29, 2018 · 2 comments
Closed

Add disable progress bar option #386

aflag opened this issue Aug 29, 2018 · 2 comments

Comments

@aflag
Copy link

aflag commented Aug 29, 2018

While it's nice to have a progress bar when executing twine interactively, it would be nice to have the option of not displaying the progress bar for those of us who want to redirect twine's output to a file or otherwise use it in a non-interactive way. tqdm has a disable flag: https://github.com/tqdm/tqdm#documentation so it should quite simple to implement.

@sigmavirus24
Copy link
Member

I would happily merge a PR implementing this.

@varunkamath18
Copy link
Contributor

I am interested in making this change if no one else has picked it up.

I checked out the source quickly and I might be wrong but it appears that the following changes will be required:

  • Create new boolean argument in settings.py.
  • repository.py needs to forward the disable flag to the tqdm ProgressBar.
  • There are several ways to send this flag over to the ProgressBar, quickest and the dirtiest being adding the flag to the upload method in the Repository.

Since the ProgressBar is a small part of upload I think it is not that big of a deal to include a disable_progress_bar option in the upload method. We could also expose it in the Repository init if it makes sense.
I don't see any other arguments of tqdm that might need exposing through the command line in the future other than maybe the leave flag which removes the traces of the progress bar upon completion. However, I don't foresee a case where this flag might be needed.

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

No branches or pull requests

3 participants