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 to disable tqdm. #427

Merged

Conversation

Projects
None yet
2 participants
@varunkamath18
Copy link
Contributor

commented Nov 24, 2018

  • Add a disable_progress_bar option to settings.

  • Add a disable_progress_bar argument to init method of the repository.

  • Forward repository's disable_progress_bar property to
    tqdm ProgressBar as disable kwarg.

  • update README with help options for upload command.

[x] ran tox -e lint
[x] ran tox against versions: 2.7, 3.6
[x] ran tox -e docs
[x] Added test to make sure tqdm is initialized with disable flag when repository is
initialized with disable_progress_bar parameter.

Closes #386

add disable_progress_bar option to disable tqdm.
* Add a disable_progress_bar option to settings.

* Add a disable_progress_bar argument to init method of the repository.

* Forward repository's disable_progress_bar property to
tqdm ProgressBar as disable kwarg.

* update README with help options for upload command.
@codecov

This comment has been minimized.

Copy link

commented Nov 24, 2018

Codecov Report

Merging #427 into master will increase coverage by 1.81%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #427      +/-   ##
=========================================
+ Coverage   78.29%   80.1%   +1.81%     
=========================================
  Files          14      14              
  Lines         751     754       +3     
  Branches      108     108              
=========================================
+ Hits          588     604      +16     
+ Misses        130     113      -17     
- Partials       33      37       +4
Impacted Files Coverage Δ
twine/repository.py 73.33% <100%> (+12.75%) ⬆️
twine/settings.py 93.33% <100%> (+0.22%) ⬆️
twine/wininst.py 31.57% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89a35dc...51464a3. Read the comment docs.

Use mock for py27
* use mock instead of  unittest.mock for python2.7
* Update tox.ini to depend on mock for py27 and pypy.
@@ -16,7 +16,13 @@
from twine import repository
from twine.utils import DEFAULT_REPOSITORY

try:
from unittest import mock

This comment has been minimized.

Copy link
@sigmavirus24

sigmavirus24 Nov 25, 2018

Member

This project doesn't use mock. Instead we use pretend which is already imported below and used throughout the test file. Please update your test to use that instead.

This comment has been minimized.

Copy link
@varunkamath18

varunkamath18 Nov 25, 2018

Author Contributor

Turns out I didn't need mock after all. Just replaced ProgressBar with a context manager and it did the trick. Thanks!

varunkamath18 added some commits Nov 25, 2018

Remove dependency on mock
replace ProgressBar with a contextmanager and assert on the args.
No need for a mock object.

@sigmavirus24 sigmavirus24 merged commit 81ee303 into pypa:master Jan 12, 2019

3 checks passed

codecov/patch 100% of diff hit (target 78.29%)
Details
codecov/project 80.1% (+1.81%) compared to 89a35dc
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.