This repository has been archived by the owner on Apr 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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
6 changed files
with
55 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nose | ||
nose-cov | ||
flake8 |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
echo 'Installing git hooks..' | ||
mkdir .git/hooks > /dev/null | ||
cp githooks/* .git/hooks > /dev/null | ||
chmod +x .git/hooks > /dev/null | ||
echo 'Done.' | ||
|
||
echo 'Creating virtualenv..' | ||
virtualenv . | ||
source bin/activate | ||
|
||
echo 'Install requirements..' | ||
pip install -r dev-requirements.txt | ||
|
||
python setup.py develop |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
function failCommit() { | ||
tput setaf 1 | ||
echo "----------------------------------------" | ||
echo "FATAL ERROR: $1" | ||
echo "----------------------------------------" | ||
tput sgr0 | ||
exit 1 | ||
} | ||
|
||
echo 'Running flake8...' | ||
result=$(flake8 parguments) | ||
if [ $? != 0 ]; then | ||
echo "$result" | ||
echo '' | ||
echo 'lint fail' | ||
lintFailed=1 | ||
failCommit "Lint Errors" | ||
fi | ||
|
||
echo 'Running Tests...' | ||
result=$(nosetests) | ||
if [ $? != 0 ]; then | ||
echo "$result" | ||
echo '' | ||
echo 'Tests fail' | ||
testsFailed=1 | ||
failCommit "Test Errors" | ||
fi | ||
|
||
if [[ $testsFailed || $lintFailed ]]; then | ||
failCommit "Unable To Commit" | ||
fi |
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
|
||
import sys | ||
from docopt import docopt | ||
from .cli import * | ||
from .utils import remove_indentation | ||
|
||
|
||
|
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