Skip to content

Commit

Permalink
Added licence, setup, tox and updated requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdixon committed Apr 14, 2014
1 parent 81170e2 commit 0be9c63
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 50 deletions.
Empty file added CHANGES.md
Empty file.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
T License (MIT)

Copyright (c) 2014 Brian Dixon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
46 changes: 0 additions & 46 deletions invoices/templates/invoice.html

This file was deleted.

16 changes: 12 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Django==1.6.2
South==0.8.4
gunicorn==18.0
mock==1.0.1
requests==2.2.1
selenium==2.39.0
WebOb==1.3.1
WebTest==2.0.14
beautifulsoup4==4.3.2
coverage==3.7.1
django-webtest==1.7.7
pep8==1.4.6
py==1.4.20
selenium==2.40.0
six==1.6.1
tox==1.7.1
virtualenv==1.11.4
waitress==0.8.8
56 changes: 56 additions & 0 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env python
import sys
from shutil import rmtree
from os.path import abspath, dirname, join

import django
from django.conf import settings

import invoices

sys.path.insert(0, abspath(dirname(__file__)))


media_root = join(abspath(dirname(__file__)), 'test_files')
rmtree(media_root, ignore_errors=True)

installed_apps = (
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.admin',
'invoices',
)

DEFAULT_SETTINGS = dict(
ROOT_URLCONF='invoice4django.tests.urls',
MEDIA_ROOT=media_root,
STATIC_URL='/static/',
INSTALLED_APPS=installed_apps,
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
AUTH_USER_MODEL='auth.user',
)


def main():
if not settings.configured:
settings.configure(**DEFAULT_SETTINGS)
if hasattr(django, 'setup'):
django.setup()
if django.VERSION < (1, 7):
from django.test.simple import DjangoTestSuiteRunner
failures = DjangoTestSuiteRunner(verbosity=1, interactive=True, failfast=False).run_tests(test_labels=None)
sys.exit(failures)
else:
from django.test.runner import DiscoverRunner
failures = DiscoverRunner(
pattern='test*.py', verbosity=1, interactive=True, failfast=False).run_tests(test_labels=None)
sys.exit(failures)


if __name__ == "__main__":
main()
30 changes: 30 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from setuptools import setup, find_packages
import invoice4django

setup(
name='invoice4django',
#version=invoice4django.__version__,
description='Simple invoice app for Django',
long_description='\n'.join((
open('README.md').read(),
open('CHANGES.md').read(),
)),
author='Brian Dixon',
author_email='bjdixon@gmail.com',
maintainer='Brian Dixon',
url='https://github.com/bjdixon/invoice4django/',
packages=find_packages(),
classifiers=[
"Development Status :: 3 - Alpha",
"Framework :: Django",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
'Programming Language :: Python :: 3.3',
"License :: OSI Approved :: MIT License",
],
tests_require=["Django>=1.5", "webtest>=2.0.6", "django-webtest>=1.7"],
include_package_data=True,
test_suite='runtests.main',
)
4 changes: 4 additions & 0 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ Finish validation FT

formatting output and what if people click the back button edit the forms and re-submit?

ability to remove line items

ability to edit invoice, vendor and customer details

56 changes: 56 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[tox]
envlist =
py27-1.5, py27-1.6, py27-1.7, py27-trunk,
py33-1.5, py33-1.6, py33-1.7, py33-trunk,

[testenv]
commands = coverage run -a --branch setup.py test

[testenv:py27-1.5]
basepython = python2.7
deps =
django == 1.5.5
coverage == 3.6

[testenv:py27-1.6]
basepython = python2.7
deps =
django == 1.6.2
coverage == 3.6

[testenv:py27-1.7]
basepython = python2.7
deps =
https://github.com/django/django/tarball/stable/1.7.x
coverage == 3.6

[testenv:py27-trunk]
basepython = python2.7
deps =
https://github.com/django/django/tarball/master
coverage == 3.6

[testenv:py33-1.5]
basepython = python3.3
deps =
django == 1.5.5
coverage == 3.6

[testenv:py33-1.6]
basepython = python3.3
deps =
django == 1.6.2
coverage == 3.6

[testenv:py33-1.7]
basepython = python3.3
deps =
https://github.com/django/django/tarball/stable/1.7.x
coverage == 3.6

[testenv:py33-trunk]
basepython = python3.3
deps =
https://github.com/django/django/tarball/master
coverage == 3.6

0 comments on commit 0be9c63

Please sign in to comment.