Merge branch 'devel'

This commit is contained in:
Casper da Costa-Luis 2019-02-17 02:00:26 +00:00
commit ebda7120ef
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
5 changed files with 564 additions and 9 deletions

View File

@ -3,7 +3,7 @@
tqdm
====
|PyPI-Versions| |PyPI-Status| |Conda-Forge-Status|
|PyPI-Versions| |PyPI-Status| |Conda-Forge-Status| |Snapcraft|
|Build-Status| |Coverage-Status| |Branch-Coverage-Status| |Codacy-Grade| |Libraries-Rank| |PyPI-Downloads|
@ -98,6 +98,15 @@ Latest Conda release
conda install -c conda-forge tqdm
Latest Snapcraft release
~~~~~~~~~~~~~~~~~~~~~~~~
|Snapcraft|
.. code:: sh
snap install tqdm
Changelog
---------
@ -831,8 +840,10 @@ There are also many |GitHub-Contributions| which we are grateful for.
:target: https://pypi.org/project/tqdm
.. |PyPI-Versions| image:: https://img.shields.io/pypi/pyversions/tqdm.svg?logo=python&logoColor=white
:target: https://pypi.org/project/tqdm
.. |Conda-Forge-Status| image:: https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge
.. |Conda-Forge-Status| image:: https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge&logo=conda-forge
:target: https://anaconda.org/conda-forge/tqdm
.. |Snapcraft| image:: https://img.shields.io/badge/snap-install-82BEA0.svg?logo=snapcraft
:target: https://snapcraft.io/tqdm
.. |Libraries-Rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/tqdm.svg?logo=koding&logoColor=white
:target: https://libraries.io/pypi/tqdm
.. |Libraries-Dependents| image:: https://img.shields.io/librariesio/dependent-repos/pypi/tqdm.svg?logo=koding&logoColor=white

View File

@ -1,18 +1,49 @@
name: tqdm
version: '{version}'
summary: A fast, extensible progress bar for Python and CLI
summary: A fast, extensible CLI progress bar
description: |
{description}
https://tqdm.github.io
`tqdm` means "progress" in Arabic (taqadum, تقدّم) and is an
abbreviation for "I love you so much" in Spanish (te quiero demasiado).
Instantly make your loops show a smart progress meter and stats - just
replace any pipe "`|`" with "`| tqdm |`", and you're done!
```sh
$ seq 9999999 | tqdm --bytes | wc -l
75.2MB [00:00, 217MB/s]
9999999
$ 7z a -bd -r backup.7z docs/ | grep Compressing | \
tqdm --total $(find docs/ -type f | wc -l) --unit files >> backup.log
100%|███████████████████████████████▉| 8014/8014 [01:37<00:00, 82.29files/s]
```
Overhead is low -- about 60ns per iteration.
In addition to its low overhead, `tqdm` uses smart algorithms to predict
the remaining time and to skip unnecessary iteration displays, which
allows for a negligible overhead in most cases.
`tqdm` works on any platform (Linux, Windows, Mac, FreeBSD, NetBSD,
Solaris/SunOS), in any console or in a GUI, and is also friendly with
IPython/Jupyter notebooks.
`tqdm` does not require any dependencies, just
an environment supporting `carriage return \r` and
`line feed \n` control characters.
adopt-info: tqdm
grade: stable
confinement: strict
base: core18
icon: {icon}
license: MPL-2.0
parts:
tqdm:
plugin: python
python-version: python3
source: {source}
source-commit: {commit}
parse-info: [setup.py]
apps:
tqdm:
command: bin/tqdm

View File

@ -7,8 +7,8 @@
"<h1 align=\"center\">tqdm</h1>\n",
"<img src=\"https://raw.githubusercontent.com/tqdm/tqdm/master/images/logo.gif\" align=\"left\" />\n",
"\n",
"[![PyPI-Versions](https://img.shields.io/pypi/pyversions/tqdm.svg?logo=python&logoColor=white)](https://pypi.org/project/tqdm)|[![PyPI-Status](https://img.shields.io/pypi/v/tqdm.svg)](https://pypi.org/project/tqdm)|[![Conda-Forge-Status](https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge)](https://anaconda.org/conda-forge/tqdm)\n",
"-|-|-\n",
"[![PyPI-Versions](https://img.shields.io/pypi/pyversions/tqdm.svg?logo=python&logoColor=white)](https://pypi.org/project/tqdm)|[![PyPI-Status](https://img.shields.io/pypi/v/tqdm.svg)](https://pypi.org/project/tqdm)|[![Conda-Forge-Status](https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge&logo=conda-forge)](https://anaconda.org/conda-forge/tqdm)|[![Snapcraft](https://img.shields.io/badge/snap-install-82BEA0.svg?logo=snapcraft)](https://snapcraft.io/tqdm)\n",
"-|-|-|-\n",
"\n",
"[![Build-Status](https://img.shields.io/travis/tqdm/tqdm/master.svg?logo=travis)](https://travis-ci.org/tqdm/tqdm)|[![Coverage-Status](https://coveralls.io/repos/tqdm/tqdm/badge.svg?branch=master)](https://coveralls.io/github/tqdm/tqdm)|[![Branch-Coverage-Status](https://codecov.io/gh/tqdm/tqdm/branch/master/graph/badge.svg)](https://codecov.io/gh/tqdm/tqdm)|[![Codacy-Grade](https://api.codacy.com/project/badge/Grade/3f965571598f44549c7818f29cdcf177)](https://www.codacy.com/app/tqdm/tqdm?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=tqdm/tqdm&amp;utm_campaign=Badge_Grade)|[![Libraries-Rank](https://img.shields.io/librariesio/sourcerank/pypi/tqdm.svg?logo=koding&logoColor=white)](https://libraries.io/pypi/tqdm)|[![PyPI-Downloads](https://img.shields.io/pypi/dm/tqdm.svg?label=pypi%20downloads&logo=python&logoColor=white)](https://pypi.org/project/tqdm)\n",
"-|-|-|-|-|-\n",

View File

@ -3,7 +3,7 @@
tqdm
====
|PyPI-Versions| |PyPI-Status| |Conda-Forge-Status|
|PyPI-Versions| |PyPI-Status| |Conda-Forge-Status| |Snapcraft|
|Build-Status| |Coverage-Status| |Branch-Coverage-Status| |Codacy-Grade| |Libraries-Rank| |PyPI-Downloads|
@ -98,6 +98,15 @@ Latest Conda release
conda install -c conda-forge tqdm
Latest Snapcraft release
~~~~~~~~~~~~~~~~~~~~~~~~
|Snapcraft|
.. code:: sh
snap install tqdm
Changelog
---------
@ -940,8 +949,10 @@ There are also many |GitHub-Contributions| which we are grateful for.
:target: https://pypi.org/project/tqdm
.. |PyPI-Versions| image:: https://img.shields.io/pypi/pyversions/tqdm.svg?logo=python&logoColor=white
:target: https://pypi.org/project/tqdm
.. |Conda-Forge-Status| image:: https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge
.. |Conda-Forge-Status| image:: https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge&logo=conda-forge
:target: https://anaconda.org/conda-forge/tqdm
.. |Snapcraft| image:: https://img.shields.io/badge/snap-install-82BEA0.svg?logo=snapcraft
:target: https://snapcraft.io/tqdm
.. |Libraries-Rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/tqdm.svg?logo=koding&logoColor=white
:target: https://libraries.io/pypi/tqdm
.. |Libraries-Dependents| image:: https://img.shields.io/librariesio/dependent-repos/pypi/tqdm.svg?logo=koding&logoColor=white

502
paper.md Normal file
View File

@ -0,0 +1,502 @@
---
title: '`tqdm`: A Fast, Extensible Progress Meter for Python and CLI'
tags:
- progressbar
- progressmeter
- progress-bar
- meter
- rate
- eta
- console
- terminal
- time
- progress
- bar
- gui
- python
- parallel
- cli
- utilities
authors:
- name: Casper O da Costa-Luis
orcid: 0000-0002-7211-1557
date: 16 February 2019
references:
- id: tqdm-ar
type: book
author:
- family: Alī Ġūl
given: Maḥmūd
title: 'Early Southern Arabian Languages and Classical Arabic Sources: A Critical Examination of Literary and Lexicographical Sources by Comparison with the Inscriptions'
publisher: Yarmouk University
publisher-place: Irbid
issued:
- year: '1993'
- id: tqdm-es
type: webpage
title: '¿Lenguaje sms que significa esto?'
URL: https://es.answers.yahoo.com/question/index?qid=20090405052137AAF2YBo&guccounter=1
author:
- literal: Yahoo Answers
- id: pypi
type: webpage
issued:
- year: '2019'
author:
- literal: Python Package Index (PyPI)
publisher: Python Software Foundation
title: tqdm
URL: https://pypi.org/project/tqdm/
- id: conda
type: webpage
author:
- literal: Anaconda
issued:
- year: '2019'
title: '`tqdm` :: Anaconda Cloud'
URL: https://anaconda.org/conda-forge/tqdm
- id: snapcraft
type: webpage
issued:
- year: '2019'
author:
- literal: Snapcraft
title: 'Installing `tqdm` for Linux using the Snap Store'
URL: https://snapcraft.io/tqdm
- id: zenodo
type: article
issued:
- year: '2019'
author:
- family: da Costa-Luis
given: Casper O.
- literal: '`tqdm` developers'
title: '`tqdm` stable'
publisher: Zenodo
DOI: 10.5281/zenodo.595120
- id: stdout
type: webpage
issued:
- year: '2019'
author:
- literal: Stack Overflow
title: Why is printing to stdout so slow? Can it be sped up?
URL: https://stackoverflow.com/questions/3857052/why-is-printing-to-stdout-so-slow-can-it-be-sped-up
- id: pypi-downloads
type: webpage
issued:
- year: '2019'
author:
- literal: Python Packaging Authority (PyPA)
publisher: Python Software Foundation
title: 'Analyzing PyPI package downloads — Python Packaging User Guide'
URL: https://packaging.python.org/guides/analyzing-pypi-package-downloads/
- id: 'keras'
type: webpage
issued:
- year: '2019'
author:
- given: Ben
title: 'Keras integration with `tqdm` progress bars'
URL: https://github.com/bstriner/keras-tqdm
- id: tqdm-results
type: webpage
issued:
- year: '2019'
author:
- literal: GitHub
title: '`tqdm` Code Results'
URL: https://github.com/search?q=tqdm&type=Code
- id: tqdm-dependents
type: webpage
issued:
- year: '2019'
author:
- literal: GitHub
title: '`tqdm` dependents'
URL: https://github.com/tqdm/tqdm/network/dependents
- id: lib-io
type: webpage
issued:
- year: '2019'
author:
- literal: Libraries.io
title: '`tqdm` on PyPI'
URL: https://libraries.io/pypi/tqdm
- id: sourcerank
type: webpage
issued:
- year: '2019'
author:
- literal: Libraries.io
title: SourceRank Breakdown for tqdm
URL: https://libraries.io/pypi/tqdm/sourcerank
- id: sourcerank-descending
type: webpage
issued:
- year: '2019'
author:
- literal: Libraries.io
title: 'Libraries - The Open Source Discovery Service'
URL: https://libraries.io/search?order=desc&platforms=PyPI&sort=rank
- id: stars
type: webpage
issued:
- year: '2019'
author:
- literal: GitHub
title: '`tqdm` Stargazers'
URL: https://github.com/tqdm/tqdm/stargazers
- id: stars-hist
type: webpage
issued:
- year: '2019'
author:
- literal: '`timqian`'
title: 'Star history'
URL: https://timqian.com/star-history/#tqdm/tqdm
- id: trend-hist
type: webpage
issued:
- year: '2018'
- month: '6'
- day: '19'
author:
- family: Takizawa
given: Nihey
title: 'GitHub Trending History'
URL: https://github.com/nihey/trending-history/blob/master/histories/Python.md
- id: hits
type: webpage
issued:
- year: '2019'
title: tqdm hits
URL: https://caspersci.uk.to/cgi-bin/hits.cgi?q=tqdm&a=plot
author:
- family: da Costa-Luis
given: Casper O.
- id: miller
type: book
issued:
- year: '2017'
author:
- family: Miller
given: Preston
- family: Bryce
given: Chapin
title: 'Python Digital Forensics Cookbook: Effective Python recipes for digital investigations'
publisher: 'Packt Publishing Ltd'
ISBN: '9781783987474'
- id: boxel
type: book
issued:
- year: '2017'
author:
- family: 'Van Boxel'
given: Dan
title: 'Hands-On Deep Learning with TensorFlow'
publisher: 'Packt Publishing'
ISBN: 9781787125827
- id: nandy
type: book
issued:
- year: '2018'
author:
- family: Nandy
given: Abhishek
- family: Biswas
given: Manisha
title: 'Reinforcement Learning with Keras, TensorFlow, and ChainerRL'
container-title: 'Reinforcement Learning : With Open AI, TensorFlow and Keras Using Python'
publisher: Apress
ISBN: 9781484232859
page: 129--153
DOI: 10.1007/978-1-4842-3285-9_5
- id: stein
type: article-journal
issued:
- year: '2019'
author:
- family: Stein
given: Helge S.
- family: Guevarra
given: Dan
- family: Newhouse
given: Paul F.
- family: Soedarmadji
given: Edwin
- family: Gregoire
given: John M.
title: Machine learning of optical properties of materials -- predicting spectra from images and images from spectra
container-title: Chemical Science
volume: 10
issue: 1
pages: 47--55
DOI: 10.1039/C8SC03077D
- id: cook
type: article-journal
issued:
- year: '2018'
author:
- family: Cook
given: Neil J.
- family: Scholz
given: Aleks
- family: Jayawardhana
given: Ray
title: 'Very Low-mass Stars and Brown Dwarfs in Upper Scorpius Using Gaia DR1: Mass Function, Disks, and Kinematics'
container-title: The Astronomical Journal
volume: 154
issue: 6
page: 256
DOI: 10.3847/1538-3881/aa9751
URL: https://arxiv.org/abs/1710.11625
- id: madhikar
type: article-journal
issued:
- year: '2018'
author:
- family: Madhikar
given: Pranav
- family: Åström
given: Jan
- family: Westerholm
given: Jan
- family: Karttunen
given: Mikko
title: 'CellSim3D: GPU accelerated software for simulations of cellular growth and division in three dimensions'
container-title: Computer Physics Communications
volume: 232
page: 206--213
DOI: 10.1016/j.cpc.2018.05.024
- id: palmer
type: article-journal
issued:
- year: '2018'
author:
- family: Palmer
given: Geraint I.
- family: Knight
given: Vincent A.
- family: Harper
given: Paul R.
- family: Hawa
given: Asyl L.
title: 'Ciw: An open-source discrete event simulation library'
container-title: Journal of Simulation
page: 1--15
DOI: 10.1080/17477778.2018.1473909
- id: knight
type: article-journal
issued:
- year: '2016'
author:
- family: Knight
given: Vincent
- family: Campbell
given: Owen
- family: Harper
given: Marc
- family: Langner
given: Karol
- family: Campbell
given: James
- family: Campbell
given: Thomas
- family: Carney
given: Alex
- family: Chorley
given: Martin
- family: Davidson-Pilon
given: Cameron
- family: Glass
given: Kristian
- family: Glynatsi
given: Nikoleta
- family: Ehrlich
given: Tomáš
- family: Jones
given: Martin
- family: Koutsovoulos
given: Georgios
- family: Tibble
given: Holly
- family: Jochen
given: Müller
- family: Palmer
given: Geraint
- family: Petunov
given: Piotr
- family: Slavin
given: Paul
- family: Standen
given: Timothy
- family: Visintini
given: Luis
- family: Molden
given: Karl
title: An open reproducible framework for the study of the iterated prisoner's dilemma
container-title: Journal of Open Research Software
volume: 4
DOI: 10.5334/jors.125
URL: https://arxiv.org/abs/1604.00896
ISSN: 2049-9647
- id: travis
type: webpage
issued:
- year: '2019'
author:
- literal: Travis CI
title: tqdm/tqdm build status
URL: https://travis-ci.org/tqdm/tqdm
- id: code-review
type: webpage
issued:
- year: '2018'
author:
- literal: Wikipedia
title: List of tools for code review
URL: https://en.wikipedia.org/wiki/List_of_tools_for_code_review
- id: asv
type: webpage
issued:
- year: '2019'
author:
- literal: '`tqdm` developers'
title: airspeed velocity
URL: https://tqdm.github.io/tqdm/
- id: licence
type: webpage
issued:
- year: '2019'
author:
- literal: '`tqdm` developers'
title: tqdm Licence
URL: https://github.com/tqdm/tqdm/blob/master/LICENCE
publisher: GitHub
---
![](logo.png)
# Summary
**`tqdm`** is a progress bar library designed to be fast and extensible. It is
written in Python, though ports in other languages are available. `tqdm` means
**progress** in Arabic (*taqadum*, تقدّم) and is an abbreviation for
**I love you so much** in Spanish (*te quiero demasiado*) [@tqdm-ar;@tqdm-es].
# Features
Exhaustive documentation may be found on the project's [home
page](https://github.com/tqdm/tqdm/#documentation).
The package supports both Python versions 2 and 3, and is available for download
via `conda` [@conda], `pip` [@pypi], `snap` [@snapcraft], and *Zenodo*
[@zenodo].
The two basic use cases are within Python code and within a Command-line
interface:
## Python Iterable Wrapper
`tqdm`'s primary (and original) use is as a wrapper around Python iterables. A
simple case would be:
```python
from tqdm import tqdm
from time import sleep
for i in tqdm(range(100)):
    sleep(0.1)
100%|█████████████████████████████████████████| 100/100 [00:10<00:00,  9.95it/s]
```
Supported features include:
- Display customisation via arguments such as `desc`, `postfix` and `bar_format`
- Automatic limiting of display updates to avoid slowing down due to excessive
iteration rates [@stdout]
- Automatic detection of console width to fill the display
- Automatic use of Unicode to render smooth-filling progress bars on supported
terminals
- Support for custom rendering frontends, including:
* Command-line interface
* Jupyter HTML notebooks
* `matplotlib`
- Support for custom hooks/callbacks, including:
* `pandas`
* `keras` [@keras]
## Command-line Interface
A Command-line interface is also provided, where `tqdm` may be used a pipe:
```sh
# count lines of text in all *.txt files
$ cat *.txt | wc -l
1075075
# same but with continuously updating progress information
$ cat *.txt | python3 -m tqdm --unit loc --unit_scale | wc -l
1.08Mloc [00:07, 142kloc/s]
# same if `total` is known
$ cat *.txt | python3 -m tqdm --unit loc --unit_scale --total 1075075 | wc -l
100%|█████████████████████████████████████| 1.08/1.08M [00:07<00:00,  142kloc/s]
1075075
```
# Popularity
As of January 2019, `tqdm` has received:
- over 20 million downloads [@pypi-downloads];
- over 315 thousand code inclusions [@tqdm-results];
* over 23 thousand dependent repositories [@tqdm-dependents];
* 7 thousand dependent libraries [@lib-io];
- A SourceRank of 22 [@sourcerank], in the world's top 20 Python packages as of
early 2019 [@sourcerank-descending];
- 9 thousand stars on GitHub [@stars;@stars-hist], and the top trending
repository during a period in December 2015 [@trend-hist];
- 500 thousand documentation hits [@hits];
- Usage in several textbooks [@miller;@boxel;@nandy] and peer-reviewed
scientific publications [@stein;@cook;@madhikar;@palmer;@knight].
## References in Blogs and Public Media
- A `tqdm` release becomes [Zenodo's 1 millionth
record](https://twitter.com/WikimediaItalia/status/914448810117545985)
- [A Hymn to Progress](http://www.metafilter.com/161265/An-alternative-to-an-eternally-spinning-wheel#6644017),
a poem or song with suggested tune of *For those in Peril on the C*,
where "C" is a pun on *Sea* and the *C programming language*
- [My top 5 'new' Python modules of
2015](http://blog.rtwilson.com/my-top-5-new-python-modules-of-2015/)
- [`tqdm`, `imageio` and `Seaborn`: Three essential python modules
(Nov 2018)](https://dominikschmidt.xyz/python-modules-tqdm-imageio-seaborn/)
- <https://pythontips.com/2018/06/03/top-14-most-famous-python-libraries-frameworks>
- <https://github.com/IliaGavrilov/Machine_Learning_libraries_and_Python_3.6_tricks>
- <https://github.com/robclewley/TqdmAudioRicker>
## Code Metrics
- Unit tested on Travis CI [@travis]
- Style and security checked on
[Codacy](https://app.codacy.com/project/tqdm/tqdm/dashboard) [@code-review]
- Code coverage reported on [Coveralls](https://coveralls.io/github/tqdm/tqdm)
and [Codecov](https://codecov.io/gh/tqdm/tqdm)
- Valuated using the COCOMO model by [OpenHub](https://www.openhub.net/p/tqdm)
- Performance tested against regression [@asv]
# Licence
`tqdm`'s source code is OSS, and may be cited using the DOI
[10.5281/zenodo.595120](https://doi.org/10.5281/zenodo.595120). The primary
maintainer [Casper da Costa-Luis](https://github.com/casperdcl) releases
contributions under the terms of the MPLv2.0, while all other contributions are
released under the terms of the MIT licence [@licence].
# See also
- Ports of [`tqdm` in other languages on
GitHub](https://github.com/search?q=tqdm&type=Repositories)
* [Official List of Ports](https://tqdm.github.io/ports/)
- [Interactive demonstration of `tqdm` in a Jupyter
Notebook](https://notebooks.rmotr.com/demo/gh/tqdm/tqdm)
# References