From 16c87cddcad48168aae6a6207bacbbdd1845e990 Mon Sep 17 00:00:00 2001 From: rasbt Date: Mon, 27 Jan 2014 16:24:43 -0500 Subject: [PATCH] more Readme fixes --- CHANGELOG.txt | 4 ++ README.html | 99 ++++++++++++++------------------------------- README.md | 19 ++++----- README.txt | 19 ++++----- pyprind/__init__.py | 2 +- setup.py | 39 ++++++++++++++---- 6 files changed, 86 insertions(+), 96 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 821f9c3..cefe975 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,7 @@ +VERSION 1.0.3 +=============== +- Reformatting of README files +- minor updates in setup.py file VERSION 1.0.2 =============== diff --git a/README.html b/README.html index fa9dd8b..f5b6560 100644 --- a/README.html +++ b/README.html @@ -1,72 +1,38 @@ - - - - - - - -

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 +

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.

-

Installation

- -

You can use the following command to install PyPrind:
-pip install pyprind
- or
-easy_install pyprind

- -

Alternatively, you download the package manually from the Python Package Index https://pypi.python.org/pypi/PyPrind, unzip it, navigate into the package, and use the command:

- -

python setup.py install
-or
-python3 setup.py install

- +

You can use the following command to install PyPrind:
pip install pyprind
or
easy_install pyprind

+

Alternatively, you download the package manually from the Python Package Index https://pypi.python.org/pypi/PyPrind, unzip it, navigate into the package, and use the command:

+

python setup.py install
or
python3 setup.py install

Documentation

- -

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

- +

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

The general usage of ProgBar() and ProgPercent() consists of three steps:

- -

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

- +

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

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
 
-

Optional parameters :

+

Optional parameters :

Setting the width of the progress bar
- -

my_prog = pyprind.ProgBar(n, width=70) # default = 50

- +

my_prog = pyprind.ProgBar(n, width=70) # default = 50

Set whether CPU time should be reported or not
- -

The optional cpu_time parameter can be set for both ProgBar() and ProgPercent() objects.
+

The optional cpu_time parameter can be set for both ProgBar() and ProgPercent() objects.

-my_prbar = pyprind.ProgBar(n)
- … -my_prbar.finish(cpu_time=False) # default = True
-

- -

Examples

- -

The following examples shall illustrate the typical usage of the PyPrind package.
-A visualization can be viewed on YouTube: http://youtu.be/gjj5K8OWo7U

+my_prbar = pyprind.ProgBar(n) + ... +my_prbar.finish(cpu_time=False) # default = True + -

Example - Progress Bar

+

Examples

+

The following examples shall illustrate the typical usage of the PyPrind package.
A visualization can be viewed on YouTube: http://youtu.be/gjj5K8OWo7U

+

Example 1 - Progress Bar

import pyprind
 
 n = 10000000
@@ -77,15 +43,15 @@ 

Example - Progress Bar

my_prbar.finish()
-

Screen Output

- -
sebastian > ./python3 examples/ex_percentage_indicator.py 
-[100 %]
-Time elapsed: 2.6364 sec
+

Screen Output

+
sebastian > python3 examples/ex_progress_bar.py 
+0%                                    100%
+[########################################]
+Time elapsed: 0.7829 sec
 
-

Example - Percentage Indicator

+

Example 2 - Percentage Indicator

import pyprind
 
 n = 1000000
@@ -96,19 +62,14 @@ 

Example - Percentage Indicator

my_perc.finish()
-

Screen Output

- -
sebastian > python3 examples/ex_progress_bar.py 
-0%                                    100%
-[########################################]
-Time elapsed: 0.7829 sec
+

Screen Output

+
sebastian > ./python3 examples/ex_percentage_indicator.py 
+[100 %]
+Time elapsed: 2.6364 sec
 
-

Contact

-

If you have any questions or comments about PyPrind, please feel free to contact me via
-eMail: se.raschka@gmail.com
-or Twitter: @rasbt

- - \ No newline at end of file + +

Contact

+

If you have any questions or comments about PyPrind, please feel free to contact me via
eMail: se.raschka@gmail.com
or Twitter: @rasbt

diff --git a/README.md b/README.md index 7eb9bc6..7063d49 100644 --- a/README.md +++ b/README.md @@ -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 --------------------------
import pyprind
@@ -80,13 +80,14 @@ my_prbar.finish()
 
 **Screen Output**  
 
-
sebastian > ./python3 examples/ex_percentage_indicator.py 
-[100 %]
-Time elapsed: 2.6364 sec
+
sebastian > python3 examples/ex_progress_bar.py 
+0%                                    100%
+[########################################]
+Time elapsed: 0.7829 sec
 
-Example - Percentage Indicator +Example 2 - Percentage Indicator --------------------------
import pyprind
@@ -101,11 +102,11 @@ my_perc.finish()
 
 **Screen Output**  
 
-
sebastian > python3 examples/ex_progress_bar.py 
-0%                                    100%
-[########################################]
-Time elapsed: 0.7829 sec
+
sebastian > ./python3 examples/ex_percentage_indicator.py 
+[100 %]
+Time elapsed: 2.6364 sec
 
+ diff --git a/README.txt b/README.txt index 7eb9bc6..7063d49 100644 --- a/README.txt +++ b/README.txt @@ -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 --------------------------
import pyprind
@@ -80,13 +80,14 @@ my_prbar.finish()
 
 **Screen Output**  
 
-
sebastian > ./python3 examples/ex_percentage_indicator.py 
-[100 %]
-Time elapsed: 2.6364 sec
+
sebastian > python3 examples/ex_progress_bar.py 
+0%                                    100%
+[########################################]
+Time elapsed: 0.7829 sec
 
-Example - Percentage Indicator +Example 2 - Percentage Indicator --------------------------
import pyprind
@@ -101,11 +102,11 @@ my_perc.finish()
 
 **Screen Output**  
 
-
sebastian > python3 examples/ex_progress_bar.py 
-0%                                    100%
-[########################################]
-Time elapsed: 0.7829 sec
+
sebastian > ./python3 examples/ex_percentage_indicator.py 
+[100 %]
+Time elapsed: 2.6364 sec
 
+ diff --git a/pyprind/__init__.py b/pyprind/__init__.py index 9daa2ef..899e55d 100644 --- a/pyprind/__init__.py +++ b/pyprind/__init__.py @@ -45,4 +45,4 @@ from .progbar import ProgBar from .progpercent import ProgPercent -__version__ = '1.0.2' +__version__ = '1.0.3' diff --git a/setup.py b/setup.py index 55bb45a..03af796 100644 --- a/setup.py +++ b/setup.py @@ -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='se.raschka@gmail.com', 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']), @@ -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 +""", )