add new commands to Makefile + updated CONTRIBUTE and RELEASE

Signed-off-by: Stephen L. <lrq3000@gmail.com>
This commit is contained in:
Stephen L 2015-10-13 15:15:11 +02:00
parent 881a6ed1cf
commit bee450d951
3 changed files with 39 additions and 12 deletions

View File

@ -4,6 +4,9 @@ HOW TO CONTRIBUTE TO TQDM
This file describes how to contribute changes to the project, and how to
upload to the pypi repository.
Most of the management commands have been directly placed inside
the Makefile, so you just have to run `make [alias]`.
HOW TO COMMIT YOUR CONTRIBUTIONS
--------------------------------
@ -34,12 +37,10 @@ To run the tests,
- install `tox`
- `cd` to the root of the `tqdm` directory (in the same folder as this file)
- run the following commands:
- run the following command:
```
make test
make coverage
make flake8
make alltests
```
Alternatively (if you can't use `make`)
@ -51,3 +52,6 @@ Alternatively (if you can't use `make`)
nosetests --with-coverage --cover-package=tqdm -v tqdm/
python -m flake8 tqdm/_tqdm.py
```
Then wait for the tests to finish, and check your console to see if there's
any issue.

View File

@ -1,6 +1,8 @@
.PHONY: all flake8 test coverage
all: flake8 coverage
alltests: test coverage flake8 testsetup
all: alltests build
flake8:
flake8 --max-line-length=80 --count --statistics --exit-zero tqdm/
flake8 --max-line-length=80 --count --statistics --exit-zero examples/
@ -8,5 +10,25 @@ flake8:
test:
nosetests tqdm -v
testsetup:
python setup.py check --restructuredtext --strict
coverage:
nosetests tqdm --with-coverage --cover-package=tqdm -v
installdev:
python setup.py develop --uninstall
python setup.py develop
install:
python setup.py install
build:
python setup.py sdist --formats=gztar,zip bdist_wininst
python setup.py sdist bdist_wheel
pypimeta:
python setup.py register
pypi:
twine upload dist/*

15
RELEASE
View File

@ -4,6 +4,9 @@ HOW TO MANAGE A NEW RELEASE
This file is intended for the project's maintainers and it describes
how to update, build and upload a new release.
Most of the management commands have been directly placed inside
the Makefile, so you just have to run `make [alias]`.
SEMANTIC VERSIONING
-------------------
@ -34,7 +37,7 @@ python setup.py check --restructuredtext --strict
```
Also, if you happen to mistakenly upload a broken release to PyPi,
you can fix the metadata by using: `python setup.py register`.
you can fix the metadata by using: `make pypimeta` or `python setup.py register`
BUILDING A RELEASE AND UPLOADING TO PYPI
@ -46,15 +49,13 @@ process and info that will be uploaded to [pypi](pypi.python.org).
Check the result by using the following commands:
```
python setup.py develop --uninstall
python setup.py develop
make installdev
```
Secondly, build tqdm into a distributable python package:
```
python setup.py sdist --formats=gztar,zip bdist_wininst --plat-name=win32
python setup.py sdist bdist_wheel --plat-name=win32
make build
```
This will generate several builds in the `dist/` folder.
@ -63,7 +64,7 @@ Finally, we can upload everything to pypi. Uploading to pypi can be done
easily using the [twine](https://github.com/pypa/twine) module:
```
twine upload dist/*
make pypi
```
NOTE:
@ -74,7 +75,7 @@ before the real deployment
cannot re-upload another with the same version number!
- in case of a mistake in the metadata on pypi (like the long description README
getting garbled because of a silent error), you can use the following
command to update the metadata: `python setup.py register`
command to update the metadata: `make pypimeta` or `python setup.py register`
Also, the new release can be added to the Github by creating a new release
from the web interface.