-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
449 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
branch = True | ||
omit = | ||
gitfame/tests/* | ||
[report] | ||
show_missing = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
sudo: required | ||
dist: trusty | ||
# sudo: required | ||
# dist: trusty | ||
language: python | ||
python: 3.5 | ||
matrix: | ||
include: | ||
- python: 2.6 | ||
env: TOXENV=py26 | ||
- python: 2.7 | ||
env: TOXENV=py27 | ||
- python: 3.3 | ||
env: TOXENV=py33 | ||
- python: 3.4 | ||
env: TOXENV=py34 | ||
- python: 3.5 | ||
env: TOXENV=py35 | ||
- python: 3.6 | ||
env: TOXENV=py36 | ||
- python: 3.7-dev | ||
env: TOXENV=py37-dev | ||
- python: pypy2.7-5.8.0 | ||
env: TOXENV=pypy | ||
- python: pypy3.5-5.8.0 | ||
env: TOXENV=pypy3 | ||
- python: 3.6 | ||
env: TOXENV=flake8 | ||
- python: 2.7 | ||
env: TOXENV=nodeps | ||
cache: | ||
pip: true | ||
directories: | ||
- $HOME/.cache/pip | ||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log | ||
notifications: | ||
email: false | ||
# branches: # remove travis double-check on pull requests in main repo | ||
# only: | ||
# - master | ||
# - /^\d\.\d+$/ | ||
env: | ||
- TOXENV=py26 | ||
- TOXENV=py27 | ||
- TOXENV=py33 | ||
- TOXENV=py34 | ||
- TOXENV=py35 | ||
- TOXENV=pypy | ||
# - TOXENV=pypy3 | ||
- TOXENV=nodeps | ||
- TOXENV=flake8 | ||
before_install: | ||
# fix a crash with multiprocessing on Travis | ||
- sudo rm -rf /dev/shm | ||
- sudo ln -s /run/shm /dev/shm | ||
- pip install codecov | ||
# - sudo rm -rf /dev/shm | ||
# - sudo ln -s /run/shm /dev/shm | ||
# coverage submission packages | ||
- git fetch --tags | ||
install: | ||
- pip install 'coverage<4' | ||
- pip install tox coveralls | ||
- pip install tox | ||
- python setup.py install | ||
script: | ||
- tox | ||
after_success: | ||
- coveralls | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,113 @@ | ||
PYFILES = $(addsuffix .py,$(addprefix gitfame/,_gitfame _utils __init__ __main__ $(addprefix tests/test_,gitfame utils))) | ||
# 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 | ||
#``` | ||
|
||
.PHONY: distclean prebuildclean clean test run build release upload | ||
.PHONY: | ||
alltests | ||
all | ||
flake8 | ||
test | ||
testnose | ||
testsetup | ||
testcoverage | ||
testtimer | ||
distclean | ||
coverclean | ||
prebuildclean | ||
clean | ||
installdev | ||
install | ||
build | ||
pypimeta | ||
pypi | ||
none | ||
run | ||
|
||
alltests: | ||
@+make testcoverage | ||
@+make flake8 | ||
@+make testsetup | ||
|
||
distclean: prebuildclean clean | ||
@+rm -f $(PYFILES:%.py=%.so) | ||
@+rm -f $(PYFILES:%.py=%.c) | ||
all: | ||
@+make alltests | ||
@+make build | ||
|
||
flake8: | ||
@+flake8 --max-line-length=80 --count --statistics --exit-zero gitfame/ | ||
@+flake8 --max-line-length=80 --count --statistics --exit-zero . | ||
@+flake8 --max-line-length=80 --count --statistics --exit-zero gitfame/tests/ | ||
|
||
test: | ||
tox --skip-missing-interpreters | ||
|
||
testnose: | ||
nosetests argopt -d -v | ||
|
||
testsetup: | ||
python setup.py check --restructuredtext --strict | ||
python setup.py make none | ||
|
||
testcoverage: | ||
@make coverclean | ||
nosetests argopt --with-coverage --cover-package=gitfame --cover-erase --cover-min-percentage=80 -d -v | ||
|
||
testtimer: | ||
nosetests argopt --with-timer -d -v | ||
|
||
distclean: | ||
@+make coverclean | ||
@+make prebuildclean | ||
@+make clean | ||
prebuildclean: | ||
@+rm -rf build/ dist/ git_fame.egg-info/ | ||
@+python -c "import shutil; shutil.rmtree('build', True)" | ||
@+python -c "import shutil; shutil.rmtree('dist', True)" | ||
@+python -c "import shutil; shutil.rmtree('git_fame.egg-info', True)" | ||
coverclean: | ||
@+python -c "import os; os.remove('.coverage') if os.path.exists('.coverage') else None" | ||
@+python -c "import shutil; shutil.rmtree('gitfame/__pycache__', True)" | ||
@+python -c "import shutil; shutil.rmtree('gitfame/tests/__pycache__', True)" | ||
clean: | ||
@+rm -f $(PYFILES:%.py=%.pyc) $(PYFILES:%.py=%.pyo) | ||
@+rm -rf .coverage | ||
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('*.py[co]')]" | ||
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('gitfame/*.py[co]')]" | ||
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('gitfame/tests/*.py[co]')]" | ||
|
||
test: flake8 testcoverage testsetup | ||
installdev: | ||
python setup.py develop --uninstall | ||
python setup.py develop | ||
|
||
run: | ||
python -Om gitfame | ||
install: | ||
python setup.py install | ||
|
||
build: prebuildclean | ||
python setup.py build_ext --inplace | ||
build: | ||
@make prebuildclean | ||
python setup.py sdist --formats=gztar,zip bdist_wheel | ||
# python setup.py sdist --formats=gztar,zip bdist_wheel bdist_wininst | ||
python setup.py bdist_wininst | ||
|
||
release: build clean | ||
pypimeta: | ||
python setup.py register | ||
|
||
upload: prebuildclean test | ||
python setup.py sdist --formats=gztar,zip bdist_wheel upload | ||
# python setup.py sdist --formats=gztar,zip bdist_wheel bdist_wininst upload | ||
pypi: | ||
twine upload dist/* | ||
|
||
testsetup: | ||
python setup.py check --metadata --strict | ||
buildupload: | ||
@make testsetup | ||
@make build | ||
@make pypimeta | ||
@make pypi | ||
|
||
testcoverage: | ||
rm -f .coverage # coverage erase | ||
nosetests gitfame --with-coverage --cover-package=gitfame --cover-erase --cover-min-percentage=80 -d -v gitfame/ | ||
none: | ||
# used for unit testing | ||
|
||
flake8: | ||
@+flake8 --max-line-length=80 --count --statistics --ignore=E111,E114 $(PYFILES) | ||
run: | ||
python -Om gitfame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.