Skip to content

Commit

Permalink
bump version, Merge branch 'package'
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 3, 2017
2 parents c16a5f3 + a6ef53c commit a8e586f
Show file tree
Hide file tree
Showing 6 changed files with 275 additions and 7 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Expand Up @@ -5,11 +5,12 @@ include LICENCE
include logo.png
# include images/logo.gif
include Makefile
include README.rst
include tox.ini

# Test suite
recursive-include tqdm/tests *.py

# Examples/Documentation
recursive-include examples *.py
include README.rst
include tqdm.1
16 changes: 11 additions & 5 deletions Makefile
Expand Up @@ -87,6 +87,12 @@ viewasv:
asv publish
asv preview

tqdm.1: tqdm.1.md
python -m tqdm --help | tail -n+5 | cat "$<" - |\
sed -r 's/^ (--.*)=<(.*)> : (.*)$$/\n\\\1=*\2*\n: \3./' |\
sed -r 's/ (-.*, --.*) /\n\1\n: /' |\
pandoc -o "$@" -s -t man

distclean:
@+make coverclean
@+make prebuildclean
Expand All @@ -96,12 +102,12 @@ prebuildclean:
@+python -c "import shutil; shutil.rmtree('dist', True)"
@+python -c "import shutil; shutil.rmtree('tqdm.egg-info', True)"
coverclean:
@+python -c "import os; os.remove('.coverage') if os.path.exists('.coverage') else None"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('.coverage')]"
clean:
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('*.py[co]')]"
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('tqdm/*.py[co]')]"
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('tqdm/tests/*.py[co]')]"
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('tqdm/examples/*.py[co]')]"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('*.py[co]')]"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('tqdm/*.py[co]')]"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('tqdm/tests/*.py[co]')]"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('tqdm/examples/*.py[co]')]"

installdev:
python setup.py develop --uninstall
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Expand Up @@ -175,6 +175,8 @@ def execute_makefile_commands(commands, alias, verbose=False):
platforms=['any'],
packages=['tqdm'],
entry_points={'console_scripts': ['tqdm=tqdm._main:main'], },
data_files = [('man/man1', ['tqdm.1'])],
package_data = {'': ['CONTRIBUTING.md', 'LICENCE', 'examples/*.py']},
long_description=README_rst,
classifiers=[
# Trove classifiers
Expand Down
222 changes: 222 additions & 0 deletions tqdm.1
@@ -0,0 +1,222 @@
.\" Automatically generated by Pandoc 1.19.2.1
.\"
.TH "TQDM" "1" "2015\-2017" "tqdm User Manuals" ""
.hy
.SH NAME
.PP
tqdm \- fast, extensible progress bar for Python and CLI
.SH SYNOPSIS
.PP
tqdm [\f[I]options\f[]]
.SH DESCRIPTION
.PP
See <https://github.com/tqdm/tqdm>.
Can be used as a pipe:
.IP
.nf
\f[C]
$\ #\ count\ lines\ of\ code
$\ cat\ *.py\ |\ tqdm\ |\ wc\ \-l
327it\ [00:00,\ 981773.38it/s]
327

$\ #\ find\ all\ files
$\ find\ .\ \-name\ "*.py"\ |\ tqdm\ |\ wc\ \-l
432it\ [00:00,\ 833842.30it/s]
432

#\ ...\ and\ more\ info
$\ find\ .\ \-name\ \[aq]*.py\[aq]\ \-exec\ wc\ \-l\ \\{}\ \\;\ \\
\ \ |\ tqdm\ \-\-total\ 432\ \-\-unit\ files\ \-\-desc\ counting\ \\
\ \ |\ awk\ \[aq]{\ sum\ +=\ $1\ };\ END\ {\ print\ sum\ }\[aq]
counting:\ 100%|█████████|\ 432/432\ [00:00<00:00,\ 794361.83files/s]
131998
\f[]
.fi
.SH OPTIONS
.TP
.B \-h, \-\-help
Print this help and exit
.RS
.RE
.TP
.B \-v, \-\-version
Print version and exit
.RS
.RE
.TP
.B \-\-desc=\f[I]desc\f[]
str, optional.
Prefix for the progressbar.
.RS
.RE
.TP
.B \-\-total=\f[I]total\f[]
int, optional.
The number of expected iterations.
If unspecified, len(iterable) is used if possible.
As a last resort, only basic progress statistics are displayed (no ETA,
no progressbar).
If \f[C]gui\f[] is True and this parameter needs subsequent updating,
specify an initial arbitrary large positive integer, e.g.
int(9e9).
.RS
.RE
.TP
.B \-\-leave=\f[I]leave\f[]
bool, optional.
If [default: True], keeps all traces of the progressbar upon termination
of iteration.
.RS
.RE
.TP
.B \-\-ncols=\f[I]ncols\f[]
int, optional.
The width of the entire output message.
If specified, dynamically resizes the progressbar to stay within this
bound.
If unspecified, attempts to use environment width.
The fallback is a meter width of 10 and no limit for the counter and
statistics.
If 0, will not print any meter (only stats).
.RS
.RE
.TP
.B \-\-mininterval=\f[I]mininterval\f[]
float, optional.
Minimum progress display update interval, in seconds [default: 0.1].
.RS
.RE
.TP
.B \-\-maxinterval=\f[I]maxinterval\f[]
float, optional.
Maximum progress display update interval, in seconds [default: 10].
Automatically adjusts \f[C]miniters\f[] to correspond to
\f[C]mininterval\f[] after long display update lag.
Only works if \f[C]dynamic_miniters\f[] or monitor thread is enabled.
.RS
.RE
.TP
.B \-\-miniters=\f[I]miniters\f[]
int, optional.
Minimum progress display update interval, in iterations.
If 0 and \f[C]dynamic_miniters\f[], will automatically adjust to equal
\f[C]mininterval\f[] (more CPU efficient, good for tight loops).
If > 0, will skip display of specified number of iterations.
Tweak this and \f[C]mininterval\f[] to get very efficient loops.
If your progress is erratic with both fast and slow iterations (network,
skipping items, etc) you should set miniters=1.
.RS
.RE
.TP
.B \-\-ascii=\f[I]ascii\f[]
bool, optional.
If unspecified or False, use unicode (smooth blocks) to fill the meter.
The fallback is to use ASCII characters \f[C]1\-9\ #\f[].
.RS
.RE
.TP
.B \-\-disable=\f[I]disable\f[]
bool, optional.
Whether to disable the entire progressbar wrapper [default: False].
If set to None, disable on non\-TTY.
.RS
.RE
.TP
.B \-\-unit=\f[I]unit\f[]
str, optional.
String that will be used to define the unit of each iteration [default:
it].
.RS
.RE
.TP
.B \-\-unit_scale=\f[I]unit_scale\f[]
bool or int or float, optional.
If 1 or True, the number of iterations will be reduced/scaled
automatically and a metric prefix following the International System of
Units standard will be added (kilo, mega, etc.) [default: False].
If any other non\-zero number, will scale \f[C]total\f[] and \f[C]n\f[].
.RS
.RE
.TP
.B \-\-dynamic_ncols=\f[I]dynamic_ncols\f[]
bool, optional.
If set, constantly alters \f[C]ncols\f[] to the environment (allowing
for window resizes) [default: False].
.RS
.RE
.TP
.B \-\-smoothing=\f[I]smoothing\f[]
float, optional.
Exponential moving average smoothing factor for speed estimates (ignored
in GUI mode).
Ranges from 0 (average speed) to 1 (current/instantaneous speed)
[default: 0.3].
.RS
.RE
.TP
.B \-\-bar_format=\f[I]bar_format\f[]
str, optional.
Specify a custom bar string formatting.
May impact performance.
If unspecified, will use \[aq]{l_bar}{bar}{r_bar}\[aq], where l_bar is
\[aq]{desc}: {percentage:3.0f}%|\[aq] and r_bar is \[aq]|
{n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]\[aq] Possible
vars: bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt,
elapsed, remaining, l_bar, r_bar, desc.
Note that a trailing ": " is automatically removed after {desc} if the
latter is empty.
.RS
.RE
.TP
.B \-\-initial=\f[I]initial\f[]
int, optional.
The initial counter value.
Useful when restarting a progress bar [default: 0].
.RS
.RE
.TP
.B \-\-position=\f[I]position\f[]
int, optional.
Specify the line offset to print this bar (starting from 0) Automatic if
unspecified.
Useful to manage multiple bars at once (eg, from threads).
.RS
.RE
.TP
.B \-\-postfix=\f[I]postfix\f[]
dict, optional.
Specify additional stats to display at the end of the bar.
Note: postfix is a dict ({\[aq]key\[aq]: value} pairs) for this method,
not a string.
.RS
.RE
.TP
.B \-\-unit_divisor=\f[I]unit_divisor\f[]
float, optional.
[default: 1000], ignored unless \f[C]unit_scale\f[] is True.
.RS
.RE
.TP
.B \-\-delim=\f[I]delim\f[]
chr, optional.
Delimiting character [default: \[aq]\[aq]].
Use \[aq]\[aq] for null.
N.B.: on Windows systems, Python converts \[aq]\[aq] to \[aq]\[aq].
.RS
.RE
.TP
.B \-\-buf_size=\f[I]buf_size\f[]
int, optional.
String buffer size in bytes [default: 256] used when \f[C]delim\f[] is
specified.
.RS
.RE
.TP
.B \-\-bytes=\f[I]bytes\f[]
bool, optional.
If true, will count bytes and ignore \f[C]delim\f[].
.RS
.RE
.SH AUTHORS
tqdm developers <https://github.com/tqdm>.
37 changes: 37 additions & 0 deletions tqdm.1.md
@@ -0,0 +1,37 @@
% TQDM(1) tqdm User Manuals
% tqdm developers <https://github.com/tqdm>
% 2015-2017

# NAME

tqdm - fast, extensible progress bar for Python and CLI

# SYNOPSIS

tqdm [*options*]

# DESCRIPTION

See <https://github.com/tqdm/tqdm>. Can be used as a pipe:

```sh
$ # count lines of code
$ cat *.py | tqdm | wc -l
327it [00:00, 981773.38it/s]
327

$ # find all files
$ find . -name "*.py" | tqdm | wc -l
432it [00:00, 833842.30it/s]
432

# ... and more info
$ find . -name '*.py' -exec wc -l \{} \; \
| tqdm --total 432 --unit files --desc counting \
| awk '{ sum += $1 }; END { print sum }'
counting: 100%|█████████| 432/432 [00:00<00:00, 794361.83files/s]
131998
```

# OPTIONS

2 changes: 1 addition & 1 deletion tqdm/_version.py
Expand Up @@ -5,7 +5,7 @@
__all__ = ["__version__"]

# major, minor, patch, -extra
version_info = 4, 19, 0
version_info = 4, 19, 1

# Nice string for the version
__version__ = '.'.join(map(str, version_info))
Expand Down

0 comments on commit a8e586f

Please sign in to comment.