This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from makyo/coveralls
Add Coveralls, Tox
- Loading branch information
Showing
12 changed files
with
128 additions
and
72 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 @@ | ||
[report] | ||
show_missing = True | ||
skip_covered = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
*.db | ||
.coverage | ||
*~ | ||
.venv | ||
venv | ||
.tox |
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,8 +1,9 @@ | ||
language: python | ||
|
||
python: | ||
python: | ||
- "2.7" | ||
|
||
install: "pip install -r pip-requirements.txt" | ||
|
||
script: make check | ||
- "3.5" | ||
install: "pip install -r requirements.txt" | ||
script: | ||
- make rawcheck | ||
after_success: | ||
- ./run-coveralls.sh |
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,43 +1,57 @@ | ||
SQLITE=sqlite3 | ||
LOCAL_DB=ideawheel.db | ||
DB_SCHEMA=schema.sql | ||
VIRTUALENV=venv | ||
|
||
help: | ||
@echo 'Usage:' | ||
@echo ' make deps installs dependencies' | ||
@echo ' make basedb sets up an empty local database' | ||
@echo ' make devserver starts the development server' | ||
@echo ' make check run tests and lint' | ||
@echo ' make test run the tests' | ||
@echo ' make lint run flake8 for pep8 linting' | ||
@echo ' make clean removes compiled files' | ||
@echo ' make help displays this message' | ||
|
||
deps: | ||
pip install -r pip-requirements.txt | ||
@echo ' make deps installs dependencies' | ||
@echo ' make basedb sets up an empty local database' | ||
@echo ' make devserver starts the development server in tox (py35)' | ||
@echo ' make check run tests and lint in tox (py27 and py35)' | ||
@echo ' make rawdevserver starts the development server in a virtualenv' | ||
@echo ' make rawcheck run tests and lint in a virtualenv' | ||
@echo ' make rawtest run the tests in a virtualenv' | ||
@echo ' make rawlint run flake8 for pep8 linting in a virtualenv' | ||
@echo ' make clean removes compiled files and virtual environments' | ||
@echo ' make help displays this message' | ||
|
||
deps: $(VIRTUALENV) | ||
$(VIRTUALENV)/bin/pip install -r requirements.txt | ||
|
||
basedb: $(LOCAL_DB) | ||
|
||
$(LOCAL_DB): $(DB_SCHEMA) | ||
rm -f $(LOCAL_DB) | ||
$(SQLITE) $(LOCAL_DB) < $(DB_SCHEMA) | ||
|
||
check: | ||
tox | ||
|
||
devserver: | ||
python ideawheel.py | ||
tox -e devenv | ||
|
||
rawdevserver: $(VIRTUALENV) | ||
$(VIRTUALENV)/bin/python ideawheel.py | ||
|
||
devfixtures: basedb | ||
for i in `find fixtures/dev/*.sql | sort`; do $(SQLITE) $(LOCAL_DB) < $$i; done | ||
|
||
check: test lint | ||
rawcheck: rawlint rawtest | ||
|
||
test: | ||
@nosetests --verbosity=2 --with-coverage --cover-package=ideawheel,models,views | ||
@rm .coverage | ||
rawtest: $(VIRTUALENV) | ||
coverage erase | ||
nosetests --verbosity=2 --with-coverage --cover-package=ideawheel,models,views | ||
|
||
lint: | ||
@flake8 --show-source ideawheel.py ideawheel_tests.py models views | ||
rawlint: $(VIRTUALENV) | ||
flake8 --config=tox.ini | ||
|
||
clean: | ||
rm -rf .tox $(VIRTUALENV) | ||
find . -name '*.py[co]' -exec rm -f {} \; | ||
|
||
.PHONY: help deps basedb devfixtures devserver check test lint clean | ||
$(VIRTUALENV): | ||
virtualenv $(VIRTUALENV) | ||
$(VIRTUALENV)/bin/pip install -r requirements.txt | ||
|
||
.PHONY: help deps basedb devfixtures devserver check test lint rawdevserver rawcheck rawtest rawlint clean |
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
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
click==6.6 | ||
coverage==4.0.3 | ||
flake8==3.2.0 | ||
Flask==0.11.1 | ||
Flask-Markdown==0.3 | ||
itsdangerous==0.24 | ||
Jinja2==2.8 | ||
Markdown==2.6.7 | ||
MarkupSafe==0.23 | ||
mccabe==0.5.2 | ||
nose==1.3.7 | ||
py-bcrypt==0.4 | ||
pycodestyle==2.2.0 | ||
pyflakes==1.3.0 | ||
python-coveralls==2.9.0 | ||
PyYAML==3.12 | ||
requests==2.12.1 | ||
six==1.10.0 | ||
Werkzeug==0.11.11 |
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,9 @@ | ||
#!/bin/bash | ||
|
||
echo "$TRAVIS_PYTHON_VERSION" | ||
if [ "$TRAVIS_PYTHON_VERSION" == "3.5" ] ; then | ||
echo "Running coveralls..." | ||
coveralls | ||
else | ||
echo "Skipping coveralls." | ||
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[tox] | ||
envlist = 2.7,3.5 | ||
skipsdist = True | ||
|
||
[testenv] | ||
deps = -rrequirements.txt | ||
commands = | ||
flake8 | ||
coverage erase | ||
nosetests --verbosity=2 --with-coverage --cover-package=ideawheel,models,views | ||
|
||
[testenv:devenv] | ||
basepython = python3.5 | ||
commands = python ideawheel.py | ||
|
||
[flake8] | ||
exclude = .git,.tox,venv |
Oops, something went wrong.