Skip to content

Commit

Permalink
Merge pull request #29 from rasbt/2.9.6
Browse files Browse the repository at this point in the history
2.9.7
  • Loading branch information
rasbt committed Apr 14, 2016
2 parents 37668fa + 202aaca commit f914dff
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 2.9.7
================
- requirements.txt for `psutil`, now supports `pip install pyprind -r requirements.txt`


Version 2.9.5
================
- new `update_interval` parameter to control the update frequency in seconds
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include LICENSE
include README.md
include CONTRIBUTING.md
include CHANGELOG.md
include requirements.txt
include tests/*
2 changes: 1 addition & 1 deletion pyprind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
from .generator_factory import prog_bar


__version__ = '2.9.5'
__version__ = '2.9.7'
11 changes: 6 additions & 5 deletions pyprind/prog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ def _get_time(self, _time):
if (_time < 86400):
return time.strftime("%H:%M:%S", time.gmtime(_time))
else:
s = (str(int(_time//3600)) + ':' +
s = (str(int(_time // 3600)) + ':' +
time.strftime("%M:%S", time.gmtime(_time)))
return s

def _finish(self):
""" Determines if maximum number of iterations (seed) is reached. """
if self.cnt == self.max_iter:
if self.cnt >= self.max_iter:
self.total_time = self._elapsed()
self.end = time.time()
self.last_progress -= 1 # to force a refreshed _print()
Expand Down Expand Up @@ -168,9 +168,10 @@ def __repr__(self):
time_info = 'Title: {}\n'\
' Started: {}\n'\
' Finished: {}\n'\
' Total time elapsed: '.format(
self.title, str_start,
str_end) + self._get_time(self.total_time)
' Total time elapsed: '.format(self.title,
str_start,
str_end)\
+ self._get_time(self.total_time)
if self.monitor:
try:
cpu_total = self.process.cpu_percent()
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
psutil>=3.2.0
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
packages=find_packages(),
package_data={'': ['LICENSE',
'README.md',
'requirements.txt',
'CHANGELOG.md',
'CONTRIBUTING.md'],
'tests': ['tests/test_percentage_indicator.py',
Expand Down

0 comments on commit f914dff

Please sign in to comment.