Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add travis baseline

  • Loading branch information...
commit a11438d1a7bded5efb0a091bfd8bffd7307434fd 1 parent a933f20
@paltman paltman authored
Showing with 109 additions and 0 deletions.
  1. +62 −0 .pylintrc
  2. +16 −0 .travis.yml
  3. +31 −0 runtests.py
View
62 .pylintrc
@@ -0,0 +1,62 @@
+[MASTER]
+load-plugins=pinax.checkers.style
+
+[MESSAGES CONTROL]
+# Brain-dead errors regarding standard language features
+# W0142 = *args and **kwargs support
+# W0403 = Relative imports
+
+# Pointless whinging
+# R0201 = Method could be a function
+# W0212 = Accessing protected attribute of client class
+# W0613 = Unused argument
+# W0232 = Class has no __init__ method
+# R0901 = Too Many Ancestors
+# R0903 = Too few public methods
+# R0904 = Too Many Public Methods
+# C0111 = Missing docstring
+# I0011 = Locally Disabling
+# W0201 = Attribute X defined outside of __init__
+# R0801 = Similarities, Might be good to have but need to find a way to disable for deploy.*
+
+# Already an error when wildcard imports are used
+# W0614 = Unused import from wildcard
+
+# Seems to be broken?
+# E1102 = Not Callable
+
+# Broken with Django
+# E1101 = Instance X has not member Y. (This breaks with Django)
+disable=W0511,I0011,C0111,R0913,R0903,R0904,R0911,R0912,R0914,R0201,W0142,E0603,E1101,W0403,W0613,W0232,E1120,C0103
+
+[REPORTS]
+include-ids=yes
+reports=no
+
+[BASIC]
+good-names=n,i,j,k,x,e,Run,_,urlpatterns,setUp,qs,pk,register,logger
+
+# Regular expression which should only match correct function names
+function-rgx=[a-z_][a-z0-9_]{2,60}$
+
+# Regular expression which should only match correct method names
+method-rgx=[a-z_][a-z0-9_]{2,60}$
+
+# Regular expression which should only match correct instance attribute names
+attr-rgx=[a-z_][a-z0-9_]{2,60}$
+
+[DESIGN]
+max-locals=20
+
+[FORMAT]
+max-line-length=80
+
+[VARIABLES]
+
+dummy-variables-rgx=^.*_$
+
+[TYPECHECK]
+generated-members=DoesNotExist,MultipleObjectsReturned,objects,status_code,context,is_valid,cleaned_data,errors
+
+[MISCELLANEOUS]
+notes=FIXME,XXX,TODO,@@@
View
16 .travis.yml
@@ -0,0 +1,16 @@
+language: python
+python:
+ - "2.7"
+env:
+ - DJANGO=1.4
+ - DJANGO=1.5
+install:
+ - pip install -q Django==$DJANGO --use-mirrors
+ - pip install -q django-nose --use-mirrors
+ - pip install -q pylint --use-mirrors
+ - pip install -q pinax.checkers --use-mirrors
+ - pip install -e . --use-mirrors
+before_script:
+ - "pylint --rcfile=.pylintrc notification"
+script:
+ - python runtests.py
View
31 runtests.py
@@ -0,0 +1,31 @@
+import sys
+
+from django.conf import settings
+
+settings.configure(
+ DEBUG=True,
+ USE_TZ=True,
+ DATABASES={
+ "default": {
+ "ENGINE": "django.db.backends.sqlite3",
+ }
+ },
+ ROOT_URLCONF="notification.urls",
+ INSTALLED_APPS=[
+ "django.contrib.auth",
+ "django.contrib.contenttypes",
+ "django.contrib.sites",
+ "notification",
+ ],
+ STRIPE_PUBLIC_KEY="",
+ STRIPE_SECRET_KEY="",
+ PAYMENTS_PLANS={}
+)
+
+from django_nose import NoseTestSuiteRunner
+
+test_runner = NoseTestSuiteRunner(verbosity=1)
+failures = test_runner.run_tests(["notification"])
+
+if failures:
+ sys.exit(failures)
Please sign in to comment.
Something went wrong with that request. Please try again.