-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from incuna/setup-basic-project
Add initial project
- Loading branch information
Showing
8 changed files
with
107 additions
and
0 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,13 @@ | ||
language: python | ||
python: | ||
- 3.4 | ||
- 3.5 | ||
notifications: | ||
email: false | ||
env: | ||
matrix: | ||
- DJANGO='django~=1.8.12' | ||
- DJANGO='django~=1.9.5' | ||
install: | ||
- pip install -r requirements.txt | ||
script: make test |
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 @@ | ||
SHELL := /bin/bash | ||
|
||
help: | ||
@echo "Usage:" | ||
@echo " make release | Release to pypi." | ||
@echo " make test | Run the tests." | ||
|
||
release: | ||
python setup.py register sdist bdist_wheel upload | ||
|
||
test: | ||
@coverage run ./tests/run.py | ||
@coverage report | ||
@flake8 . |
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 @@ | ||
-e . | ||
colour-runner==0.0.4 | ||
coverage==4.0.3 | ||
dj-database-url==0.4.1 | ||
django==1.8.12 | ||
flake8==2.5.4 | ||
flake8-import-order==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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[flake8] | ||
max-line-length = 90 | ||
max-complexity = 10 | ||
statistics = true | ||
application-import-names = user_deletion | ||
import-order-style = smarkets | ||
|
||
[coverage:run] | ||
source = user_deletion | ||
omit = *tests* | ||
|
||
[coverage:report] | ||
show_missing = 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from setuptools import find_packages, setup | ||
|
||
|
||
version = '0.1.0' | ||
|
||
|
||
setup( | ||
name='django-user-deletion', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
version=version, | ||
license='BSD', | ||
description='Management commands to notify and delete inactive django users', | ||
classifiers=( | ||
'Development Status :: 1 - Planning', | ||
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Natural Language :: English', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
), | ||
author='Incuna Ltd', | ||
author_email='[email protected]', | ||
url='https://github.com/incuna/django-user-deletion', | ||
) |
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,34 @@ | ||
import os | ||
import sys | ||
|
||
import dj_database_url | ||
import django | ||
from colour_runner.django_runner import ColourRunnerMixin | ||
from django.conf import settings | ||
from django.test.runner import DiscoverRunner | ||
|
||
|
||
BASEDIR = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
settings.configure( | ||
DATABASES={ | ||
'default': dj_database_url.config( | ||
default='sqlite://{}/user_deletion.db'.format(BASEDIR), | ||
), | ||
}, | ||
INSTALLED_APPS=('user_deletion',), | ||
MIDDLEWARE_CLASSES=(), | ||
) | ||
|
||
|
||
django.setup() | ||
|
||
|
||
class TestRunner(ColourRunnerMixin, DiscoverRunner): | ||
"""Enable colorised output.""" | ||
|
||
|
||
test_runner = TestRunner(verbosity=1) | ||
failures = test_runner.run_tests(['tests']) | ||
if failures: | ||
sys.exit(1) |
Empty file.