-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONTRIBUTE
94 lines (66 loc) · 2.49 KB
/
CONTRIBUTE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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: `python setup.py make [alias]`, (or simply `make [alias]` in
UNIX-like environments).
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 are made using the "Fork & Pull" model. The
typical steps would be:
- 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 -a -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.
Standard unit testing
~~~~~~~~~~~~~~~~~~~~~
The standard way to run the tests:
- install `tox`
- `cd` to the root of the `tqdm` directory (in the same folder as this file)
- run the following command:
```
python setup.py make test
```
or
```
make test
```
or
```
tox --skip-missing-interpreters
```
This will build the module and run the tests in a virtual environment.
Errors and coverage rates will be output to the console/log. (Ignore missing
interpreters errors - these are due to the local machine missing certain
versions of Python.)
Note: to install all versions of the Python interpreter that are specified
in [tox.ini](https://raw.githubusercontent.com/tqdm/tqdm/master/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.
Alternative unit testing with Nose
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alternatively, use `nose` to run the tests just for your Python version:
- install `nose` and `flake8`
- run the following command:
```
python setup.py make alltests
```
or
```
nosetests --with-coverage --cover-package=tqdm -v tqdm/
python -m flake8 tqdm/_tqdm.py
```