tqdm/CONTRIBUTE

72 lines
2.2 KiB
Plaintext

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]`.
Note: to use the Makefile on Windows, you need to install make.exe,
for example by installing [MinGW MSYS](http://www.mingw.org/wiki/msys).
HOW TO COMMIT YOUR CONTRIBUTIONS
--------------------------------
Contributions to the project is made using the "Fork & Pull" model. Here's a
quickstart on how to do that (your mileage may vary depending on your git
config):
- create an account on [github](https://github.com)
- fork [tqdm](https://github.com/tqdm/tqdm)
- make a local clone: `git clone https://github.com/your_account/tqdm.git`
- make your changes on your local copy
- commit your changes `git commit -m "my message"`
- TEST YOUR CHANGES (see below)
- `push` to your github account: `git push origin`
- finally, create a Pull Request (PR) from your github fork
(go to your fork's webpage and click on "Pull Request."
You can then add a message to describe your proposal.)
TESTING
-------
To test functionality on your machine (such as before submitting a Pull
Request), there are a number of unit tests.
To run the tests for only your Python distribution:
- install `tox`
- `cd` to the root of the `tqdm` directory (in the same folder as this file)
- run the following command:
```
make alltests
```
Alternatively (if you can't use `make`)
- install `nosetest`
- run the following commands:
```
nosetests --with-coverage --cover-package=tqdm -v tqdm/
python -m flake8 tqdm/_tqdm.py
```
To run the tests for all Python distributions (better, but more time consuming):
- install `tox`
- install all versions of the Python interpreter that are specified in
[tox.ini](tox.ini). You can use MiniConda to install a minimal setup.
You must also make sure that each distribution has an alias to call
the Python interpreter: python27 for Python 2.7's interpreter,
python32 for Python 3.2's, etc.
- `cd` to the root of the `tqdm` directory (in the same folder as this file)
- run the following command: `tox`
Then wait for the tests to finish, and check your console to see if there's
any issue.