-
Notifications
You must be signed in to change notification settings - Fork 14
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
15 changed files
with
273 additions
and
132 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,7 @@ | ||
[run] | ||
source = formly | ||
omit = formly/tests/*,formly/admin.py | ||
branch = 1 | ||
|
||
[report] | ||
omit = formly/tests/*,formly/admin.py |
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,11 +1,18 @@ | ||
sudo: false | ||
language: python | ||
|
||
python: | ||
- 2.7 | ||
|
||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
env: | ||
- DJANGO=1.8 | ||
- DJANGO=1.10 | ||
- DJANGO=master | ||
matrix: | ||
exclude: | ||
install: | ||
- pip install flake8 | ||
- pip install -e . | ||
|
||
- pip install tox coveralls | ||
script: | ||
- flake8 . | ||
- tox -e py${TRAVIS_PYTHON_VERSION//[.]/}-$DJANGO | ||
after_success: | ||
- coveralls |
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,15 @@ | ||
all: init docs test | ||
|
||
init: | ||
python setup.py develop | ||
pip install detox coverage mkdocs | ||
|
||
test: | ||
coverage erase | ||
detox | ||
coverage html | ||
|
||
docs: | ||
mkdocs build | ||
|
||
.PHONY: docs |
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,48 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
import django | ||
|
||
from django.conf import settings | ||
|
||
|
||
DEFAULT_SETTINGS = dict( | ||
INSTALLED_APPS=[ | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.sites", | ||
"formly", | ||
"formly.tests" | ||
], | ||
MIDDLEWARE_CLASSES=[], | ||
DATABASES={ | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": ":memory:", | ||
} | ||
}, | ||
SITE_ID=1, | ||
ROOT_URLCONF="formly.tests.urls", | ||
SECRET_KEY="notasecret", | ||
) | ||
|
||
|
||
def check_migrations(): | ||
if not settings.configured: | ||
settings.configure(**DEFAULT_SETTINGS) | ||
|
||
django.setup() | ||
|
||
parent = os.path.dirname(os.path.abspath(__file__)) | ||
sys.path.insert(0, parent) | ||
|
||
django.core.management.call_command( | ||
"makemigrations", | ||
"formly", | ||
check=True, | ||
dry_run=True, | ||
) | ||
|
||
if __name__ == "__main__": | ||
check_migrations() |
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 +1 @@ | ||
__version__ = "0.6" | ||
__version__ = "0.7" |
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
Empty file.
Empty file.
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,7 @@ | ||
from django.test import TestCase | ||
|
||
|
||
class Tests(TestCase): | ||
|
||
def setUp(self): | ||
pass |
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,6 @@ | ||
from django.conf.urls import include | ||
|
||
|
||
urlpatterns = [ | ||
(r"^", include("formly.urls")), | ||
] |
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,48 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
import django | ||
|
||
from django.conf import settings | ||
|
||
|
||
DEFAULT_SETTINGS = dict( | ||
INSTALLED_APPS=[ | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.sites", | ||
"formly" | ||
# "formly.tests", | ||
], | ||
MIDDLEWARE_CLASSES=[], | ||
DATABASES={ | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": ":memory:", | ||
} | ||
}, | ||
SITE_ID=1, | ||
ROOT_URLCONF="formly.tests.urls", | ||
SECRET_KEY="notasecret", | ||
) | ||
|
||
|
||
def run(*args): | ||
if not settings.configured: | ||
settings.configure(**DEFAULT_SETTINGS) | ||
|
||
django.setup() | ||
|
||
parent = os.path.dirname(os.path.abspath(__file__)) | ||
sys.path.insert(0, parent) | ||
|
||
django.core.management.call_command( | ||
"makemigrations", | ||
"formly", | ||
*args | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
run(*sys.argv[1:]) |
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,54 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
import django | ||
|
||
from django.conf import settings | ||
|
||
|
||
DEFAULT_SETTINGS = dict( | ||
INSTALLED_APPS=[ | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.sites", | ||
"formly", | ||
"formly.tests" | ||
], | ||
MIDDLEWARE_CLASSES=[], | ||
DATABASES={ | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": ":memory:", | ||
} | ||
}, | ||
SITE_ID=1, | ||
ROOT_URLCONF="formly.tests.urls", | ||
SECRET_KEY="notasecret", | ||
) | ||
|
||
|
||
def runtests(*test_args): | ||
if not settings.configured: | ||
settings.configure(**DEFAULT_SETTINGS) | ||
|
||
django.setup() | ||
|
||
parent = os.path.dirname(os.path.abspath(__file__)) | ||
sys.path.insert(0, parent) | ||
|
||
try: | ||
from django.test.runner import DiscoverRunner | ||
runner_class = DiscoverRunner | ||
test_args = ["formly.tests"] | ||
except ImportError: | ||
from django.test.simple import DjangoTestSuiteRunner | ||
runner_class = DjangoTestSuiteRunner | ||
test_args = ["tests"] | ||
|
||
failures = runner_class(verbosity=1, interactive=True, failfast=False).run_tests(test_args) | ||
sys.exit(failures) | ||
|
||
|
||
if __name__ == "__main__": | ||
runtests(*sys.argv[1:]) |
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,2 @@ | ||
[bdist_wheel] | ||
universal = 1 |
Oops, something went wrong.