Skip to content

Commit

Permalink
Merge pull request #1 from incuna/setup-basic-project
Browse files Browse the repository at this point in the history
Add initial project
  • Loading branch information
LilyFoote committed Apr 14, 2016
2 parents 0aa2ee7 + c562d1b commit db37173
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
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
14 changes: 14 additions & 0 deletions Makefile
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 .
7 changes: 7 additions & 0 deletions requirements.txt
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
13 changes: 13 additions & 0 deletions setup.cfg
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
26 changes: 26 additions & 0 deletions setup.py
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 added tests/__init__.py
Empty file.
34 changes: 34 additions & 0 deletions tests/run.py
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 added user_deletion/__init__.py
Empty file.

0 comments on commit db37173

Please sign in to comment.