Skip to content

Commit

Permalink
more Readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Jan 27, 2014
1 parent 6a5a159 commit 16c87cd
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 96 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
VERSION 1.0.3
===============
- Reformatting of README files
- minor updates in setup.py file

VERSION 1.0.2
===============
Expand Down
99 changes: 30 additions & 69 deletions README.html
Original file line number Diff line number Diff line change
@@ -1,72 +1,38 @@
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<meta name="format" content="complete">
</head>
<body>

<h1>PyPrind</h1>

<p>The PyPrind (Python Progress Indicator) module provides a progress bar and a percentage indicator<br>
object that let you track the progress of a loop structure or other iterative computation.<br>
Typical applications include the processing of large data sets to provide an intuitive estimate
<p>The PyPrind (Python Progress Indicator) module provides a progress bar and a percentage indicator<br>object that let you track the progress of a loop structure or other iterative computation.<br>Typical applications include the processing of large data sets to provide an intuitive estimate
at runtime about the progress of the computation.</p>

<h1>Installation</h1>

<p>You can use the following command to install PyPrind:<br>
<code>pip install pyprind</code><br>
or<br>
<code>easy_install pyprind</code> </p>

<p>Alternatively, you download the package manually from the Python Package Index <a href="https://pypi.python.org/pypi/PyPrind">https://pypi.python.org/pypi/PyPrind</a>, unzip it, navigate into the package, and use the command:</p>

<p><code>python setup.py install</code><br>
or<br>
<code>python3 setup.py install</code> </p>

<p>You can use the following command to install PyPrind:<br><code>pip install pyprind</code><br> or<br><code>easy_install pyprind</code> </p>
<p>Alternatively, you download the package manually from the Python Package Index <a href="https://pypi.python.org/pypi/PyPrind"><a href="https://pypi.python.org/pypi/PyPrind">https://pypi.python.org/pypi/PyPrind</a></a>, unzip it, navigate into the package, and use the command:</p>
<p><code>python setup.py install</code><br>or<br><code>python3 setup.py install</code> </p>
<h1>Documentation</h1>

<p>PyPrind consists of two class objects that can visualize the progress of a computation on the output screen.<br>
Progress bars are visualized via a <code>ProgBar()</code> object, and alternatively, the progress can be tracked and shown as percentage via a <code>ProgPercent()</code> object. </p>

<p>PyPrind consists of two class objects that can visualize the progress of a computation on the output screen.<br>Progress bars are visualized via a <code>ProgBar()</code> object, and alternatively, the progress can be tracked and shown as percentage via a <code>ProgPercent()</code> object. </p>
<p>The general usage of <code>ProgBar()</code> and <code>ProgPercent()</code> consists of three steps:</p>

<p>1) initialize a new <code>ProgBar()</code> or <code>ProgPercent()</code> object with the number of iterations of the computation that is to be performed<br>
2) update the <code>ProgBar()</code> or <code>ProgPercent()</code> object for each iteration via the <code>.update()</code>method<br>
3) complete the progress visualization via the <code>.finish()</code> method after the computation is completed </p>

<p>1) initialize a new <code>ProgBar()</code> or <code>ProgPercent()</code> object with the number of iterations of the computation that is to be performed<br>2) update the <code>ProgBar()</code> or <code>ProgPercent()</code> object for each iteration via the <code>.update()</code>method<br>3) complete the progress visualization via the <code>.finish()</code> method after the computation is completed </p>
<pre>n = 10000000
my_prbar = pyprind.ProgBar(n) # 1) initialization with number of iterations
for i in range(n):
for i in range(n):
# do some computation
my_prbar.update() # 2) update the progress visualization
my_prbar.finish() # 3) complete the progress visualization
</pre>

<h2>Optional parameters :</h2>

<h2>Optional parameters :</h2>
<h5>Setting the width of the progress bar</h5>

<p><code>my_prog = pyprind.ProgBar(n, width=70) # default = 50</code></p>

<p><code>my_prog = pyprind.ProgBar(n, width=70) # default = 50</code></p>
<h5>Set whether CPU time should be reported or not</h5>

<p>The optional <code>cpu_time</code> parameter can be set for both <code>ProgBar()</code> and <code>ProgPercent()</code> objects.<br>
<p>The optional <code>cpu_time</code> parameter can be set for both <code>ProgBar()</code> and <code>ProgPercent()</code> objects. </p>
<pre>
my_prbar = pyprind.ProgBar(n)<br>
&#8230;
my_prbar.finish(cpu_time=False) # default = True<br>
</pre></p>

<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/gjj5K8OWo7U">http://youtu.be/gjj5K8OWo7U</a></p>
my_prbar = pyprind.ProgBar(n)
...
my_prbar.finish(cpu_time=False) # default = True
</pre>

<h2>Example - Progress Bar</h2>

<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/gjj5K8OWo7U"><a href="http://youtu.be/gjj5K8OWo7U">http://youtu.be/gjj5K8OWo7U</a></a></p>
<h2>Example 1 - Progress Bar</h2>
<pre>import pyprind

n = 10000000
Expand All @@ -77,15 +43,15 @@ <h2>Example - Progress Bar</h2>
my_prbar.finish()
</pre>

<p><strong>Screen Output</strong> </p>

<pre>sebastian > ./python3 examples/ex_percentage_indicator.py
[100 %]
Time elapsed: 2.6364 sec
<p><strong>Screen Output</strong> </p>
<pre>sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
</pre>

<h2>Example - Percentage Indicator</h2>

<h2>Example 2 - Percentage Indicator</h2>
<pre>import pyprind

n = 1000000
Expand All @@ -96,19 +62,14 @@ <h2>Example - Percentage Indicator</h2>
my_perc.finish()
</pre>

<p><strong>Screen Output</strong> </p>

<pre>sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
<p><strong>Screen Output</strong> </p>
<pre>sebastian > ./python3 examples/ex_percentage_indicator.py
[100 %]
Time elapsed: 2.6364 sec
</pre>

<h1> Contact</h1>

<p>If you have any questions or comments about PyPrind, please feel free to contact me via<br>
eMail: <a href="mailto:[email protected]">[email protected]</a><br>
or Twitter: <a href="https://twitter.com/rasbt">@rasbt</a></p>

</body>
</html>

<h1> Contact</h1>
<p>If you have any questions or comments about PyPrind, please feel free to contact me via<br>eMail: <a href="mailto:[email protected]">[email protected]</a><br>or Twitter: <a href="https://twitter.com/rasbt">@rasbt</a></p>
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The following examples shall illustrate the typical usage of the PyPrind package
A visualization can be viewed on YouTube: [http://youtu.be/gjj5K8OWo7U](http://youtu.be/gjj5K8OWo7U)


Example - Progress Bar
Example 1 - Progress Bar
--------------------------

<pre>import pyprind
Expand All @@ -80,13 +80,14 @@ my_prbar.finish()

**Screen Output**

<pre>sebastian > ./python3 examples/ex_percentage_indicator.py
[100 %]
Time elapsed: 2.6364 sec
<pre>sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
</pre>


Example - Percentage Indicator
Example 2 - Percentage Indicator
--------------------------

<pre>import pyprind
Expand All @@ -101,11 +102,11 @@ my_perc.finish()

**Screen Output**

<pre>sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
<pre>sebastian > ./python3 examples/ex_percentage_indicator.py
[100 %]
Time elapsed: 2.6364 sec
</pre>




Expand Down
19 changes: 10 additions & 9 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The following examples shall illustrate the typical usage of the PyPrind package
A visualization can be viewed on YouTube: [http://youtu.be/gjj5K8OWo7U](http://youtu.be/gjj5K8OWo7U)


Example - Progress Bar
Example 1 - Progress Bar
--------------------------

<pre>import pyprind
Expand All @@ -80,13 +80,14 @@ my_prbar.finish()

**Screen Output**

<pre>sebastian > ./python3 examples/ex_percentage_indicator.py
[100 %]
Time elapsed: 2.6364 sec
<pre>sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
</pre>


Example - Percentage Indicator
Example 2 - Percentage Indicator
--------------------------

<pre>import pyprind
Expand All @@ -101,11 +102,11 @@ my_perc.finish()

**Screen Output**

<pre>sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
<pre>sebastian > ./python3 examples/ex_percentage_indicator.py
[100 %]
Time elapsed: 2.6364 sec
</pre>




Expand Down
2 changes: 1 addition & 1 deletion pyprind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
from .progbar import ProgBar
from .progpercent import ProgPercent

__version__ = '1.0.2'
__version__ = '1.0.3'
39 changes: 31 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
from distutils.core import setup

readme = open('README.txt', 'r')
README_TEXT = readme.read()
readme.close()


setup(name='PyPrind',
version='1.0.2',
version='1.0.3',
description='Python Progress Indicator Utility',
author='Sebastian Raschka',
author_email='[email protected]',
url='https://github.com/rasbt/pyprind',
download_url='https://github.com/rasbt/pyprind/archive/1.0.2.tar.gz',
packages=['pyprind'],
data_files = [('', ['LICENSE.txt']),
('', ['README.html']),
Expand All @@ -29,5 +23,34 @@
'Programming Language :: Python :: 3',
'Environment :: Console',
],
long_description = README_TEXT,
long_description="""
PyPrind
=============
The PyPrind (Python Progress Indicator) module provides a progress bar and a
percentage indicator object that let you track the progress of a loop
structure or other iterative computation.
Typical applications include the processing of large data sets to provide
an intuitive estimate at runtime about the progress of the computation.
Example - Progress Bar
--------------------------
import pyprind
n = 10000000
my_prbar = pyprind.ProgBar(n)
for i in range(n):
# do some computation
my_prbar.update()
my_prbar.finish()
**Screen Output**
sebastian > python3 examples/ex_progress_bar.py
0% 100%
[########################################]
Time elapsed: 0.7829 sec
""",
)

0 comments on commit 16c87cd

Please sign in to comment.