-
Notifications
You must be signed in to change notification settings - Fork 13
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
micahhausler
committed
Jul 16, 2014
1 parent
534ad09
commit bb15362
Showing
11 changed files
with
111 additions
and
83 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,14 @@ | ||
[run] | ||
branch = True | ||
omit = | ||
manager_utils/version.py | ||
source = {{ project_name }} | ||
[report] | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise NotImplementedError | ||
fail_under = 100 | ||
show_missing = 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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
language: python | ||
python: | ||
- '2.7' | ||
- '3.3' | ||
- '3.4' | ||
env: | ||
global: | ||
- DB=postgres | ||
matrix: | ||
- DJANGO=1.6.2 | ||
- DJANGO=1.6.5 | ||
install: | ||
- pip install -q coverage flake8 Django==$DJANGO | ||
before_script: | ||
- flake8 . --max-line-length=120 --max-complexity=10 --exclude='env,migrations,*.egg' | ||
- psql -c 'CREATE DATABASE manager_utils;' -U postgres | ||
script: | ||
- coverage run --source='manager_utils' --branch --omit='manager_utils/migrations/*' setup.py test | ||
- coverage report --fail-under=100 --show-missing | ||
- flake8 . | ||
- coverage run setup.py test | ||
- coverage report --fail-under=100 |
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,2 @@ | ||
Wes Kendall @wesleykendall wes.kendall@ambition.com (primary) | ||
Micah Hausler @micahhausler micah.hausler@ambition.com |
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,2 +1,2 @@ | ||
include README.md | ||
include README.rst | ||
include LICENSE |
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,25 @@ | ||
.. image:: https://travis-ci.org/ambitioninc/django-manager-utils.png | ||
:target: https://travis-ci.org/ambitioninc/django-manager-utils | ||
|
||
django-manager-utils | ||
==================== | ||
Additional utilities for Django model managers. | ||
|
||
Installation | ||
------------ | ||
To install the latest release, type:: | ||
|
||
pip install django-manager-utils | ||
|
||
To install the latest code directly from source, type:: | ||
|
||
pip install git+git://github.com/ambitioninc/django-manager-utils.git | ||
|
||
Documentation | ||
------------- | ||
|
||
Full documentation is available at http://django-manager-utils.readthedocs.org | ||
|
||
License | ||
------- | ||
MIT License (see LICENSE) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.6.0' | ||
__version__ = '0.6.1' |
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,50 @@ | ||
import os | ||
|
||
from django.conf import settings | ||
|
||
|
||
def configure_settings(): | ||
""" | ||
Configures settings for manage.py and for run_tests.py. | ||
""" | ||
if not settings.configured: | ||
# Determine the database settings depending on if a test_db var is set in CI mode or not | ||
test_db = os.environ.get('DB', None) | ||
if test_db is None: | ||
db_config = { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'NAME': 'ambition_dev', | ||
'USER': 'ambition_dev', | ||
'PASSWORD': 'ambition_dev', | ||
'HOST': 'localhost' | ||
} | ||
elif test_db == 'postgres': | ||
db_config = { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'USER': 'postgres', | ||
'NAME': 'manager_utils', | ||
} | ||
elif test_db == 'sqlite': | ||
db_config = { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': 'manager_utils', | ||
} | ||
else: | ||
raise RuntimeError('Unsupported test DB {0}'.format(test_db)) | ||
|
||
settings.configure( | ||
DATABASES={ | ||
'default': db_config, | ||
}, | ||
INSTALLED_APPS=( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.admin', | ||
'south', | ||
'manager_utils', | ||
'manager_utils.tests', | ||
), | ||
ROOT_URLCONF='manager_utils.urls', | ||
DEBUG=False, | ||
) |
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,4 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
exclude = docs,env,*.egg,migrations | ||
max-complexity = 10 |
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