Add tox configuration and integration with setup.py
Add Travis CI build server configuration Add badges and Tests section to README Bump version (development)
This commit is contained in:
parent
33ec166c6f
commit
dadb8f1ff6
7 changed files with 106 additions and 15 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,8 @@
|
||||||
# tools, IDEs, build folders
|
# tools, IDEs, build folders
|
||||||
/.coverage/
|
/.coverage/
|
||||||
|
/.eggs/
|
||||||
/.idea/
|
/.idea/
|
||||||
|
/.tox/
|
||||||
/build/
|
/build/
|
||||||
/dist/
|
/dist/
|
||||||
/docs/build/
|
/docs/build/
|
||||||
|
|
5
.travis.yml
Normal file
5
.travis.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
language: python
|
||||||
|
install:
|
||||||
|
- pip install virtualenv
|
||||||
|
script:
|
||||||
|
- python setup.py test
|
39
README.rst
39
README.rst
|
@ -1,9 +1,11 @@
|
||||||
===========
|
============================
|
||||||
django todo
|
django todo |latest-version|
|
||||||
===========
|
============================
|
||||||
|
|
||||||
|
|build-status| |health| |downloads| |license|
|
||||||
|
|
||||||
django-todo is a pluggable multi-user, multi-group task management and
|
django-todo is a pluggable multi-user, multi-group task management and
|
||||||
assignment application for Django. It can serve as anything from a personal
|
assignment application for Django. It can serve as anything from a personal
|
||||||
to-do system to a complete, working ticketing system for organizations.
|
to-do system to a complete, working ticketing system for organizations.
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
|
@ -19,3 +21,32 @@ For documentation, see the django-todo wiki pages:
|
||||||
|
|
||||||
- `Version history
|
- `Version history
|
||||||
<http://github.com/shacker/django-todo/wiki/Version-history>`_
|
<http://github.com/shacker/django-todo/wiki/Version-history>`_
|
||||||
|
|
||||||
|
Tests
|
||||||
|
=====
|
||||||
|
|
||||||
|
Serious tests are missing, but we're checking PEP8 conformity of our syntax on
|
||||||
|
both Python 2 and 3 using ``tox``. You can run the tests locally via::
|
||||||
|
|
||||||
|
$ python setup.py test
|
||||||
|
|
||||||
|
No prerequisites are required, all test dependencies will be installed
|
||||||
|
automatically by ``tox`` in virtual environments created on the fly.
|
||||||
|
Unfortunately, you'll have to install ``virtualenv`` for this to work, though.
|
||||||
|
|
||||||
|
|
||||||
|
.. |latest-version| image:: https://img.shields.io/pypi/v/django-todo.svg
|
||||||
|
:alt: Latest version on PyPI
|
||||||
|
:target: https://pypi.python.org/pypi/django-todo
|
||||||
|
.. |build-status| image:: https://travis-ci.org/shacker/django-todo.svg
|
||||||
|
:alt: Build status
|
||||||
|
:target: https://travis-ci.org/shacker/django-todo
|
||||||
|
.. |health| image:: https://landscape.io/github/shacker/django-todo/master/landscape.svg?style=flat
|
||||||
|
:target: https://landscape.io/github/shacker/django-todo/master
|
||||||
|
:alt: Code health
|
||||||
|
.. |downloads| image:: https://img.shields.io/pypi/dm/django-todo.svg
|
||||||
|
:alt: Monthly downloads from PyPI
|
||||||
|
:target: https://pypi.python.org/pypi/django-todo
|
||||||
|
.. |license| image:: https://img.shields.io/pypi/l/django-todo.svg
|
||||||
|
:alt: Software license
|
||||||
|
:target: https://github.com/shacker/django-todo/blob/master/LICENSE
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
exclude = build,dist,docs/conf.py,todo/migrations,*.egg-info
|
exclude = build,dist,docs/conf.py,*/migrations,*.egg-info
|
||||||
|
|
49
setup.py
49
setup.py
|
@ -1,26 +1,59 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
import todo
|
from setuptools.command.test import test as TestCommand
|
||||||
|
import shlex
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import todo as package
|
||||||
|
|
||||||
|
|
||||||
|
class Tox(TestCommand):
|
||||||
|
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
|
||||||
|
|
||||||
|
def initialize_options(self):
|
||||||
|
TestCommand.initialize_options(self)
|
||||||
|
self.tox_args = None
|
||||||
|
|
||||||
|
def finalize_options(self):
|
||||||
|
TestCommand.finalize_options(self)
|
||||||
|
self.test_args = []
|
||||||
|
self.test_suite = True
|
||||||
|
|
||||||
|
def run_tests(self):
|
||||||
|
import tox
|
||||||
|
args = self.tox_args
|
||||||
|
if args:
|
||||||
|
args = shlex.split(self.tox_args)
|
||||||
|
errno = tox.cmdline(args=args)
|
||||||
|
sys.exit(errno)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='django-todo',
|
name='django-todo',
|
||||||
version=todo.__version__,
|
version=package.__version__,
|
||||||
description='A multi-user, multi-group task management and assignment system for Django.',
|
description=package.__doc__.strip(),
|
||||||
author=todo.__author__,
|
author=package.__author__,
|
||||||
author_email=todo.__email__,
|
author_email=package.__email__,
|
||||||
url=todo.__url__,
|
url=package.__url__,
|
||||||
license=todo.__license__,
|
license=package.__license__,
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'Environment :: Web Environment',
|
'Environment :: Web Environment',
|
||||||
|
'Framework :: Django',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: BSD License',
|
'License :: OSI Approved :: BSD License',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Framework :: Django',
|
'Programming Language :: Python :: 2',
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Topic :: Office/Business :: Groupware',
|
||||||
|
'Topic :: Software Development :: Bug Tracking',
|
||||||
],
|
],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
tests_require=['tox'],
|
||||||
|
cmdclass={
|
||||||
|
'test': Tox,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
"""django todo"""
|
"""
|
||||||
__version__ = '1.5'
|
A multi-user, multi-group task management and assignment system for Django.
|
||||||
|
"""
|
||||||
|
__version__ = '1.6.dev1'
|
||||||
|
|
||||||
__author__ = 'Scot Hacker'
|
__author__ = 'Scot Hacker'
|
||||||
__email__ = 'shacker@birdhouse.org'
|
__email__ = 'shacker@birdhouse.org'
|
||||||
|
|
18
tox.ini
Normal file
18
tox.ini
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[tox]
|
||||||
|
envlist =
|
||||||
|
flake8py{2,3}
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
# deps = pytest
|
||||||
|
commands =
|
||||||
|
# py.test
|
||||||
|
|
||||||
|
[testenv:flake8py2]
|
||||||
|
basepython = python2.7
|
||||||
|
deps = flake8
|
||||||
|
commands = flake8 .
|
||||||
|
|
||||||
|
[testenv:flake8py3]
|
||||||
|
basepython = python3.4
|
||||||
|
deps = flake8
|
||||||
|
commands = flake8 .
|
Loading…
Add table
Add a link
Reference in a new issue