Skip to content

Conversation

lrq3000
Copy link
Member

@lrq3000 lrq3000 commented Aug 28, 2016

... + Deprecation warning test to get 100% coverage again + Update readme and docstrings to provide more details about these parameters.

Fix regressions spotted in #249 (maxinterval fixing miniters too high) and in #258 (smoothing=0 breaks dynamic_miniters, also old calculation made tqdm faster, so it was reinstated).

Maxinterval would sometimes fix miniters to a value higher than it should, because it was adjusting miniters according to maxinterval instead of mininterval (the other conditions for dynamic_miniters are ok and adjusted better than maxinterval).

Also updated the readme and docstring to give more details on the various interval parameters (mininterval, maxinterval, miniters). They are critical for lots of people and define most of the somewhat weird behaviors of tqdm, so I think they ought to have extensive documentation both in the readme and the docstring.

TODO:

  • Fix miniters calculation by maxinterval
  • Fix unit test
  • Flake8
  • Add coverage unit test for deprecation exception (100% unit test again for tqdm core)

@lrq3000 lrq3000 added the p0-bug-critical ☢ Exception rasing label Aug 28, 2016
@coveralls
Copy link

coveralls commented Aug 28, 2016

Coverage Status

Coverage decreased (-0.3%) to 90.437% when pulling 295a2a2 on maxinterval-fix into 4b3d916 on master.

@codecov-io
Copy link

codecov-io commented Aug 28, 2016

Current coverage is 91.86% (diff: 100%)

Merging #250 into master will increase coverage by 0.09%

@@             master       #250   diff @@
==========================================
  Files             7          7          
  Lines           535        541     +6   
  Methods           0          0          
  Messages          0          0          
  Branches         97         99     +2   
==========================================
+ Hits            491        497     +6   
  Misses           43         43          
  Partials          1          1          

Powered by Codecov. Last update 86292e5...a3bcc8a

@lrq3000 lrq3000 added the to-review 🔍 Awaiting final confirmation label Sep 2, 2016
@coveralls
Copy link

coveralls commented Sep 2, 2016

Coverage Status

Coverage increased (+0.3%) to 91.079% when pulling 5fa3f40 on maxinterval-fix into 4b3d916 on master.

@lrq3000 lrq3000 changed the title Fix maxinterval to adjust miniters to mininterval + Update readme and docstring Fix maxinterval to adjust miniters to mininterval + fix dynamic_miniters when smoothing Sep 5, 2016
@coveralls
Copy link

coveralls commented Sep 5, 2016

Coverage Status

Coverage increased (+0.3%) to 91.079% when pulling 80f1086 on maxinterval-fix into 4b3d916 on master.

@casperdcl
Copy link
Member

@lrq3000 how does this fit in with #251 ? Can you update 251 to include whatever additional changes that may be in this PR?

@lrq3000
Copy link
Member Author

lrq3000 commented Oct 29, 2016

@casperdcl There is no interaction between both, the maxinterval fix is related to its interaction with mininterval, not with the monitor thread.

I will update this PR here to fit with the monitor thread.

@lrq3000
Copy link
Member Author

lrq3000 commented Oct 30, 2016

Ok I'm done with this PR :)

@lrq3000
Copy link
Member Author

lrq3000 commented Oct 31, 2016

Also you noticed that in the docstring and readme, it was still specifying this about miniters:

If specified, will set mininterval to 0.

Which is false since a long time. So I deleted this line.

@lrq3000
Copy link
Member Author

lrq3000 commented Oct 31, 2016

Rebased. Didn't take the time to do the asv test yet.

@lrq3000
Copy link
Member Author

lrq3000 commented Nov 1, 2016

Cool @casperdcl , I saw you made a fast version python setup.py make testasv for quick testing, good idea. I get results that are agreeing with my previous homemade benchmarking, but you should benchmark it yourself because I don't trust my machine's stability currently.

/EDIT: I think on only one commit it's hard to detect a regression using asv...

Copy link
Member

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

thanks. slight performance hit is just about measurable but we can live with it

@casperdcl casperdcl merged commit a3bcc8a into master Nov 12, 2016
@casperdcl casperdcl deleted the maxinterval-fix branch November 12, 2016 14:42
@lrq3000
Copy link
Member Author

lrq3000 commented Nov 12, 2016

Ah really? I expected no perf hit since it's only two new conditinals (with one being never evaluated except if smoothing=0).
Maybe it's because i merged 2 dynamic_miniters calculations in 1? I should try to separate them to see if it fixes the perf hit.

@casperdcl
Copy link
Member

yes, you're right. no perf hit. was looking at the wrong thing

@casperdcl casperdcl added p2-bug-warning ⚠ Visual output bad and removed p0-bug-critical ☢ Exception rasing labels Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-bug-warning ⚠ Visual output bad to-review 🔍 Awaiting final confirmation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants