-
Notifications
You must be signed in to change notification settings - Fork 86
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
MAINT: replace progressbar
with tqdm
#202
Conversation
- and minor update to `.gitignore`
Codecov Report
@@ Coverage Diff @@
## master #202 +/- ##
==========================================
- Coverage 52.04% 51.85% -0.19%
==========================================
Files 49 45 -4
Lines 7473 7064 -409
==========================================
- Hits 3889 3663 -226
+ Misses 3584 3401 -183
|
CodeCov is complaining that overall test coverage is actually slightly reduced. Apparently, the few additional lines in untested methods outweigh the countless untested lines I removed. Not sure I understand the logic, could add tests of course, but I'd say that's a different issue. |
src/pyunicorn/climate/havlin.py
Outdated
if (i % 10) == 0: | ||
progress.update(i) | ||
# toggle progress bar | ||
silence = self.silence_level > 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would inline this into the trange()
call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This obviously applies equally to the other changes.
This coverage metric ended up slightly lower, because the coverage within the old For the record, the following are the untested methods in which the progress bar was replaced, and which appear not to be used anywhere else in the project. The last one in particular has been replaced by its Cythonized version, so I suggest deleting it.
I would also suggest to start writing the change log for the new release. This PR would be represented by a one-liner there. Otherwise, this looks good to me. |
- inline `silence_level` condition into `trange()` call
- as was unused, in favour of `_cython_calculate_mutual_information()` - lint fix to `104ca9e`
Thanks for the hints! I improved the silencing of the new progressbars accordingly and removed Wouldn't want to decide about the other apparently stale methods myself. Maybe @jdonges can have a quick look? Shouldn't keep us from merging this though. Oh and I started taking notes for the changelog now, good point. |
Thank you. In contrast to |
Deleted the
utils/progressbar
and everything that relates to it. Addedtqdm
dependency and replaced allProgressBar
instances withtqdm
progress bars.@ntfrgl, I'm not entirely sure I added the
tqdm
dependency in all the right places insetup.cfg
and.travis.yml
, could you please double check?