Skip to content

Commit 0f09906

Browse files
committed
Merge branch 'hashar-tox' into 0.3
Make tox available, see gitpython-developers#179 [skip ci]
2 parents e1ad78e + c914637 commit 0f09906

File tree

6 files changed

+48
-4
lines changed

6 files changed

+48
-4
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ cover/
1010
/doc/_build
1111
nbproject
1212
*.sublime-workspace
13+
14+
/*egg-info
15+
/.tox

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ The object database implementation is optimized for handling large quantities of
1313
- Tested with nose 1.3.0
1414
* Mock by Michael Foord used for tests
1515
- Tested with 1.0.1
16+
* Coverage - used for tests coverage
17+
18+
The list of dependencies are listed in /requirements.txt and /test-requirements.txt. The installer takes care of installing them for you though.
1619

1720
### INSTALL
1821

@@ -22,15 +25,27 @@ The object database implementation is optimized for handling large quantities of
2225
If you have downloaded the source code:
2326

2427
python setup.py install
25-
26-
or if you want to obtain a copy more easily:
28+
29+
or if you want to obtain a copy from the Pypi repository:
2730

2831
pip install gitpython
29-
32+
33+
Both commands will install the required package dependencies.
34+
3035
A distribution package can be obtained for manual installation at:
3136

3237
http://pypi.python.org/pypi/GitPython
3338

39+
### RUNNING TESTS
40+
41+
The easiest way to run test is by using [tox](https://pypi.python.org/pypi/tox) a wrapper around virtualenv. It will take care of setting up environnements with the proper dependencies installed and execute test commands. To install it simply:
42+
43+
pip install tox
44+
45+
Then run:
46+
47+
tox
48+
3449
### SOURCE
3550

3651
GitPython's git repo is available on GitHub, which can be browsed at [github](https://github.com/gitpython-developers/GitPython) and cloned like that:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
GitPython
2-
gitdb>=0.6.0
2+
gitdb>=0.6.0

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
VERSION = v.readline().strip()
1717
v.close()
1818

19+
with open('requirements.txt') as reqs_file:
20+
requirements = reqs_file.read().splitlines()
1921

2022
class build_py(_build_py):
2123
def run(self):

test-requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage
2+
flake8
3+
nose
4+
mock

tox.ini

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tox]
2+
envlist = py26,py27,flake8
3+
4+
[testenv]
5+
commands = nosetests
6+
deps = -r{toxinidir}/requirements.txt
7+
-r{toxinidir}/test-requirements.txt
8+
9+
[testenv:cover]
10+
commands = nosetests --with-coverage
11+
12+
[testenv:flake8]
13+
commands = flake8
14+
15+
[testenv:venv]
16+
commands = {posargs}
17+
18+
[flake8]
19+
#show-source = True
20+
exclude = .tox,.venv,build,dist,doc,git/ext/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy