Skip to content

Commit

Permalink
framework overhaul
Browse files Browse the repository at this point in the history
- replace setup.py make -> py-make>=0.1.9
  + fixes tqdm#290
- add requirements-dev.txt and extras_require[dev]
- misc documentation & Travis CI updates
  • Loading branch information
casperdcl committed Jan 21, 2019
1 parent bcf3cca commit 5b7816d
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 151 deletions.
11 changes: 8 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 @@ -31,3 +31,8 @@ __pycache__
# 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
25 changes: 12 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ how to build and upload a new release. Once again,
`[python setup.py] make [<alias>]` will help.


## SEMANTIC VERSIONING
## Semantic Versioning

The tqdm repository managers should:

Expand All @@ -97,7 +97,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 +114,7 @@ to PyPi, use:
```


## MERGING PULL REQUESTS
## Merging Pull Requests

This section describes how to cleanly merge PRs.

Expand Down Expand Up @@ -164,7 +164,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 +178,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 +199,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 +233,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 +275,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: 6 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +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 @@ -28,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 @@ -48,7 +40,7 @@ all:
@+make build

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

test:
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,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 +905,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 5b7816d

Please sign in to comment.