Merge lp:~statik/summit/gimmetests into lp:summit

Proposed by Elliot Murphy
Status: Merged
Approved by: Michael Hall
Approved revision: 66
Merged at revision: 70
Proposed branch: lp:~statik/summit/gimmetests
Merge into: lp:summit
Diff against target: 61 lines (+49/-0)
2 files modified
INSTALL (+4/-0)
Makefile (+45/-0)
To merge this branch: bzr merge lp:~statik/summit/gimmetests
Reviewer Review Type Date Requested Status
Summit Hackers Pending
Review via email: mp+55942@code.launchpad.net

Description of the change

This adds a Makefile at the root of the tree for convenience, and some targets for running lint and reporting code coverage information (ZERO TESTS CURRENTLY!)

Next will be wiring in some test framework.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'INSTALL'
2--- INSTALL 2011-03-15 19:28:59 +0000
3+++ INSTALL 2011-04-01 14:35:54 +0000
4@@ -14,3 +14,7 @@
5 - ./manage.py syncdb
6 - ./manage.py migrate
7 - ./manage.py runserver
8+
9+To develop summit, you should also have code linting, coverage, and testrunner tools installed:
10+ - sudo apt-get install python-setuptools python-coverage python-django-nose python-freshen
11+ - sudo pip install flake8
12
13=== added file 'Makefile'
14--- Makefile 1970-01-01 00:00:00 +0000
15+++ Makefile 2011-04-01 14:35:54 +0000
16@@ -0,0 +1,45 @@
17+export ROOTDIR ?= $(shell bzr root)
18+export DBDIR ?= $(ROOTDIR)/tmp/db
19+COVERAGE=$(shell which python-coverage)
20+
21+check: lint
22+ @echo FIXME
23+# @nosetests --config=.nosecfg
24+
25+lint:
26+ @find summit -name \*.py -exec flake8 {} \;
27+
28+info:
29+ @bzr info
30+ @echo
31+ @echo Bzr revno:
32+ @bzr revno
33+ @echo "Lines of application code"
34+ @find summit -name \*py | grep -v test_ | xargs cat | wc -l
35+ @echo
36+ @echo "Lines of test code:"
37+ @find summit -name \*py | grep test_ | xargs cat | wc -l
38+ @echo
39+ @$(COVERAGE) report --omit="test_*"
40+
41+clean:
42+ find summit -name \*pyc -exec rm {} \;
43+ rm -rf cover
44+ rm -rf dist
45+ rm -rf MANIFEST
46+
47+dist:
48+ python setup.py sdist
49+ cd dist; tar tvf *.tar.gz
50+
51+$(DBDIR):
52+ mkdir -p $(DBDIR)
53+
54+start-db: $(DBDIR)
55+ @echo FIXME
56+
57+stop-db: $(DBDIR)
58+ @echo FIXME
59+
60+.PHONY: dist autotest clean info lint check start-db stop-db
61+.NOTPARALLEL:

Subscribers

People subscribed via source and target branches