Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Feb 15, 2014
1 parent 1ec3eb2 commit 397acd2
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 21 deletions.
24 changes: 17 additions & 7 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,10 @@ <h5>Set whether CPU time should be reported or not</h5>
<p><code>my_prbar = pyprind.ProgBar(n, track_time=False) # default = True</code><br/>
<code>my_perc = pyprind.ProgPercent(n, track_time=False) # default = True</code></p>

<p><code>ProgBar</code> objects will print the elapsed time when the computation has finished.<br/>
<p><code>ProgBar</code> objects will print the estimated time left and the total time<br/>
when the computation has finished.<br/>
<code>ProgPercent</code> objects reports the elapsed time during the computation and prints<br/>
the estimated finish time of the loop (see section "Examples - ProgPercent").</p>
the estimated finish time of the loop.</p>

<h5>Selecting an output stream</h5>

Expand Down Expand Up @@ -257,7 +258,7 @@ <h5>Small note on usage in a custom Django management command.</h5>
<h1>Examples</h1>

<p>The following examples shall illustrate the typical usage of the PyPrind package.<br/>
A visualization can be viewed on YouTube: <a href="http://youtu.be/N3CRoB9Uo7Y">http://youtu.be/N3CRoB9Uo7Y</a></p>
A visualization can be viewed on YouTube: <a href="http://youtu.be/Ex05RM9vLKE">http://youtu.be/Ex05RM9vLKE</a></p>

<h2>Example - Progress Bar</h2>

Expand All @@ -275,8 +276,8 @@ <h2>Example - Progress Bar</h2>

<pre>sebastian > python3 ./examples/ex1_progress_bar.py
0% 100%
[########################################]
Total time elapsed: 1.033 sec
[########################################] - ETA [sec]: 0.000 sec
Total time elapsed: 4.481 sec
</pre>


Expand All @@ -295,7 +296,7 @@ <h2>Example - Percentage Indicator</h2>
<p><strong>Screen Output</strong></p>

<pre>sebastian > python3 ./examples/ex1_percentage_indicator.py
[ 17 %] elapsed [sec]: 3.066 | ETA [sec]: 15.000
[ 34 %] elapsed [sec]: 1.377 | ETA [sec]: 2.570
</pre>


Expand All @@ -310,7 +311,16 @@ <h1> Contact</h1>

<h1>Changelog</h1>

<p><strong>VERSION 2.1.0</strong></p>
<p><strong>VERSION 2.2.0</strong></p>

<ul>
<li>added ETA (estimated time until arrival) tracking to progress bar<br/>
by Taylan Aydinli</li>
<li>better support for Python 2.x</li>
</ul>


<p><strong>VERSION 2.1.1</strong></p>

<ul>
<li>changed visuals of the printed progress for percentage indicators</li>
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ The optional `track_time` parameter can be set for both `ProgBar()` and `ProgPer
`my_prbar = pyprind.ProgBar(n, track_time=False) # default = True`
`my_perc = pyprind.ProgPercent(n, track_time=False) # default = True`

`ProgBar` objects will print the elapsed time when the computation has finished.
`ProgBar` objects will print the estimated time left and the total time
when the computation has finished.
`ProgPercent` objects reports the elapsed time during the computation and prints
the estimated finish time of the loop (see section "Examples - ProgPercent").
the estimated finish time of the loop.



Expand Down Expand Up @@ -107,7 +108,7 @@ Examples
=============

The following examples shall illustrate the typical usage of the PyPrind package.
A visualization can be viewed on YouTube: [http://youtu.be/N3CRoB9Uo7Y](http://youtu.be/N3CRoB9Uo7Y)
A visualization can be viewed on YouTube: [http://youtu.be/Ex05RM9vLKE](http://youtu.be/Ex05RM9vLKE)


Example - Progress Bar
Expand Down
23 changes: 16 additions & 7 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ The optional `track_time` parameter can be set for both `ProgBar()` and `ProgPer
`my_prbar = pyprind.ProgBar(n, track_time=False) # default = True`
`my_perc = pyprind.ProgPercent(n, track_time=False) # default = True`

`ProgBar` objects will print the elapsed time when the computation has finished.
`ProgBar` objects will print the estimated time left and the total time
when the computation has finished.
`ProgPercent` objects reports the elapsed time during the computation and prints
the estimated finish time of the loop (see section "Examples - ProgPercent").
the estimated finish time of the loop.



Expand Down Expand Up @@ -107,7 +108,7 @@ Examples
=============

The following examples shall illustrate the typical usage of the PyPrind package.
A visualization can be viewed on YouTube: [http://youtu.be/GC2J0SMmiWQ](http://youtu.be/GC2J0SMmiWQ)
A visualization can be viewed on YouTube: [http://youtu.be/Ex05RM9vLKE](http://youtu.be/Ex05RM9vLKE)


Example - Progress Bar
Expand All @@ -126,8 +127,8 @@ for i in range(n):

<pre>sebastian > python3 ./examples/ex1_progress_bar.py
0% 100%
[########################################]
Total time elapsed: 1.033 sec
[########################################] - ETA [sec]: 0.000 sec
Total time elapsed: 4.481 sec
</pre>


Expand All @@ -146,7 +147,7 @@ for i in range(n):
**Screen Output**

<pre>sebastian > python3 ./examples/ex1_percentage_indicator.py
[ 17 %] elapsed [sec]: 3.066 | ETA [sec]: 15.000
[ 34 %] elapsed [sec]: 1.377 | ETA [sec]: 2.570
</pre>


Expand All @@ -168,10 +169,18 @@ Changelog
==========


**VERSION 2.1.0**
**VERSION 2.2.0**

- added ETA (estimated time until arrival) tracking to progress bar
by Taylan Aydinli
- better support for Python 2.x


**VERSION 2.1.1**

- changed visuals of the printed progress for percentage indicators


**VERSION 2.1.0**

- added ETA (estimated time until arrival) tracking by Taylan Aydinli
Expand Down
1 change: 0 additions & 1 deletion pyprind/progbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class ProgBar(Prog):
def __init__(self, iterations, track_time=True, width=30, stream=2):
Prog.__init__(self, iterations, track_time, stream)
self.bar_width = width
print(self.bar_width)
self._adjust_width()
self.last_progress = 0
self._print_labels()
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from distutils.core import setup

setup(name='PyPrind',
version='2.1.1',
version='2.2.0',
description='Python Progress Indicator Utility',
author='Sebastian Raschka',
author_email='[email protected]',
Expand Down Expand Up @@ -36,8 +36,7 @@
For more details and examples please see the package documentation.
A short video demonstration of the progress tracking can be found on YouTube:
http://youtu.be/N3CRoB9Uo7Y
http://youtu.be/Ex05RM9vLKE
Contact
Expand Down

0 comments on commit 397acd2

Please sign in to comment.