Skip to content

Commit

Permalink
bump version, merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jan 26, 2019
2 parents 2d75274 + 284fe01 commit cd9be03
Show file tree
Hide file tree
Showing 18 changed files with 365 additions and 443 deletions.
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
*.py[cod]

# C extensions
*.so
/wiki/
/docs/
/feedstock/

# Packages
tqdm.egg-info
Expand All @@ -13,6 +12,7 @@ dist/
.tox/
.coverage
__pycache__
nosetests.xml

# Translations
*.mo
Expand All @@ -25,6 +25,14 @@ __pycache__
# PyCharm
.idea

# IPython
.ipynb_checkpoints

# asv
.asv/
benchmarks/*.py[co]

# Sumbodules
/wiki/
/docs/
/feedstock/
2 changes: 1 addition & 1 deletion .tqdm.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% TQDM(1) tqdm User Manuals
% tqdm developers <https://github.com/tqdm>
% 2015-2018
% 2015-2019

# NAME

Expand Down
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# sudo: required
# dist: trusty
language: python
matrix:
include:
Expand Down Expand Up @@ -46,10 +44,7 @@ before_install:
# - sudo ln -s /run/shm /dev/shm
- git fetch --tags
install:
# Install tox first, before dependencies (to get per-env deps)
- pip install tox
# install this package (tqdm) into the environment
- pip install .
# run tests
script:
- tox
29 changes: 16 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ make [<alias>] # on UNIX-like environments
python setup.py make [<alias>] # if make is unavailable
```

The latter depends on [`py-make>=0.1.0`](https://github.com/tqdm/py-make).

Use the alias `help` (or leave blank) to list all available aliases.


Expand Down Expand Up @@ -80,9 +82,11 @@ Alternatively, use `nose` to run the tests just for the current Python version:
This section is intended for the project's maintainers and describes
how to build and upload a new release. Once again,
`[python setup.py] make [<alias>]` will help.
Also consider `pip install`ing development utilities:
`-r requirements-dev.txt` or `tqdm[dev]`.


## SEMANTIC VERSIONING
## Semantic Versioning

The tqdm repository managers should:

Expand All @@ -97,7 +101,7 @@ Note: tools can be used to automate this process, such as
[python-semanticversion](https://github.com/rbarrois/python-semanticversion/).


## CHECKING SETUP.PY
## Checking setup.py

To check that the `setup.py` file is compliant with PyPi requirements (e.g.
version number; reStructuredText in README.rst) use:
Expand All @@ -114,7 +118,7 @@ to PyPi, use:
```


## MERGING PULL REQUESTS
## Merging Pull Requests

This section describes how to cleanly merge PRs.

Expand Down Expand Up @@ -164,7 +168,7 @@ git merge --no-ff pr-branch-name

### 5 Version

Modify tqdm/_version.py and amend the last (merge) commit:
Modify `tqdm/_version.py` and amend the last (merge) commit:

```
git add tqdm/_version.py
Expand All @@ -178,7 +182,7 @@ git push origin master
```


## BUILDING A RELEASE AND UPLOADING TO PYPI
## Building a Release and Uploading to PyPI

Formally publishing requires additional steps: testing and tagging.

Expand All @@ -199,7 +203,7 @@ display as `v{major}.{minor}.{patch}-{commit_hash}`.

### Upload

Build tqdm into a distributable python package:
Build `tqdm` into a distributable python package:

```
[python setup.py] make build
Expand Down Expand Up @@ -233,21 +237,20 @@ cannot re-upload another with the same version number
updating just the metadata is possible: `[python setup.py] make pypimeta`


## UPDATING GH-PAGES
## Updating Websites

The most important file is README.rst, which sould always be kept up-to-date
The most important file is `README.rst`, which sould always be kept up-to-date
and in sync with the in-line source documentation. This will affect all of the
following:

- The [main repository site](https://github.com/tqdm/tqdm) which automatically
serves the latest README.rst as well as links to all of github's features.
This is the preferred online referral link for tqdm.
serves the latest `README.rst` as well as links to all of github's features.
This is the preferred online referral link for `tqdm`.
- The [PyPi mirror](https://pypi.org/project/tqdm) which automatically
serves the latest release built from README.rst as well as links to past
serves the latest release built from `README.rst` as well as links to past
releases.
- Many external web crawlers.


Additionally (less maintained), there exists:

- A [wiki] which is publicly editable.
Expand Down Expand Up @@ -276,7 +279,7 @@ For experienced devs, once happy with local master:
b) `twine upload -s -i $(git config user.signingkey) dist/tqdm-*`
10. create new release on https://github.com/tqdm/tqdm/releases
a) add helpful release notes
b) attach dist/tqdm-* binaries (usually only *.whl*)
b) attach `dist/tqdm-*` binaries (usually only `*.whl*`)
11. run `make` in the `wiki` submodule to update release notes
12. run `make deploy` in the `docs` submodule to update website
13. accept the automated PR in the `feedstock` submodule to update conda
Expand Down
8 changes: 5 additions & 3 deletions LICENCE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Exceptions or notable authors are listed below
in reverse chronological order:

* files: *
MPLv2.0 2015-2018 (c) Casper da Costa-Luis
MPLv2.0 2015-2019 (c) Casper da Costa-Luis
[casperdcl](https://github.com/casperdcl).
* files: tqdm/_tqdm.py
MIT 2016 (c) [PR #96] on behalf of Google Inc.
Expand All @@ -20,8 +20,10 @@ in reverse chronological order:
Mozilla Public Licence (MPL) v. 2.0 - Exhibit A
-----------------------------------------------

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.


MIT License (MIT)
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include tox.ini

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

# Sub-packages
recursive-include tqdm/autonotebook *.py
Expand Down
20 changes: 7 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
# IMPORTANT: for compatibility with `python setup.py make [alias]`, ensure:
# 1. Every alias is preceded by @[+]make (eg: @make alias)
# 2. A maximum of one @make alias or command per line
#
# Sample makefile compatible with `python setup.py make`:
#```
#all:
# @make test
# @make install
#test:
# nosetest
#install:
# python setup.py install
#```
# see: https://github.com/tqdm/py-make/issues/1

.PHONY:
alltests
Expand All @@ -27,14 +17,17 @@
coverclean
prebuildclean
clean
toxclean
installdev
install
build
buildupload
pypi
help
none

help:
@python setup.py make
@python setup.py make -p

alltests:
@+make testcoverage
Expand All @@ -47,7 +40,8 @@ all:
@+make build

flake8:
@+flake8 --max-line-length=80 --exclude .asv,.tox -j 8 --count --statistics --exit-zero .
@+flake8 --max-line-length=80 --exclude .asv,.tox,.ipynb_checkpoints,build \
-j 8 --count --statistics --exit-zero .

test:
tox --skip-missing-interpreters
Expand Down
26 changes: 23 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,26 @@ Points to remember when using ``{postfix[...]}`` in the ``bar_format`` string:
object. To prevent this behaviour, insert an extra item into the dictionary
where the key is not a string.

Additional ``bar_format`` parameters may also be defined by overriding
``format_dict``:

.. code:: python
from tqdm import tqdm
class TqdmExtraFormat(tqdm):
"""Provides a `total_time` format parameter"""
@property
def format_dict(self):
d = super(TqdmExtraFormat, self).format_dict
total_time = d["elapsed"] * (d["total"] or 0) / max(d["n"], 1)
d.update(total_time=self.format_interval(total_time) + " in total")
return d
for i in TqdmExtraFormat(
range(10),
bar_format="{total_time}: {percentage:.0f}%|{bar}{r_bar}"):
pass
Nested progress bars
~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -870,7 +890,7 @@ There are also many |GitHub-Contributions| which we are grateful for.
.. |Branch-Coverage-Status| image:: https://codecov.io/gh/tqdm/tqdm/branch/master/graph/badge.svg
:target: https://codecov.io/gh/tqdm/tqdm
.. |Codacy-Grade| image:: https://api.codacy.com/project/badge/Grade/3f965571598f44549c7818f29cdcf177
:target: 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
:target: https://www.codacy.com/app/tqdm/tqdm/dashboard
.. |GitHub-Status| image:: https://img.shields.io/github/tag/tqdm/tqdm.svg?maxAge=86400&logo=github&logoColor=white
:target: https://github.com/tqdm/tqdm/releases
.. |GitHub-Forks| image:: https://img.shields.io/github/forks/tqdm/tqdm.svg?logo=github&logoColor=white
Expand Down Expand Up @@ -905,8 +925,8 @@ There are also many |GitHub-Contributions| which we are grateful for.
:target: https://www.openhub.net/p/tqdm?ref=Thin+badge
.. |LICENCE| image:: https://img.shields.io/pypi/l/tqdm.svg
:target: https://raw.githubusercontent.com/tqdm/tqdm/master/LICENCE
.. |DOI-URI| image:: https://zenodo.org/badge/21637/tqdm/tqdm.svg
:target: https://zenodo.org/badge/latestdoi/21637/tqdm/tqdm
.. |DOI-URI| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.595120-blue.svg
:target: https://doi.org/10.5281/zenodo.595120
.. |interactive-demo| image:: https://img.shields.io/badge/demo-interactive-orange.svg?logo=jupyter
:target: https://notebooks.rmotr.com/demo/gh/tqdm/tqdm
.. |Screenshot-Jupyter1| image:: https://raw.githubusercontent.com/tqdm/tqdm/master/images/tqdm-jupyter-1.gif
Expand Down
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
py-make>=0.1.0 # setup.py make/pymake
twine # pymake pypi
argopt # cd wiki && pymake
pydoc-markdown # cd docs && pymake
Loading

0 comments on commit cd9be03

Please sign in to comment.