Added OpenStack dev things
Added a pbr-based build system and a tox file and some requirements files. Also moved the apps to all be under storyboard so that a publication to PyPI won't do evil things from an install perspective.
This commit is contained in:
parent
df633a7617
commit
d035720744
5
.gitignore
vendored
5
.gitignore
vendored
@ -5,3 +5,8 @@
|
|||||||
*.db
|
*.db
|
||||||
*~
|
*~
|
||||||
local_settings.py
|
local_settings.py
|
||||||
|
storyboard.db
|
||||||
|
.tox
|
||||||
|
AUTHORS
|
||||||
|
ChangeLog
|
||||||
|
*.egg-info
|
||||||
|
6
MANIFEST.in
Normal file
6
MANIFEST.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
include AUTHORS
|
||||||
|
include ChangeLog
|
||||||
|
exclude .gitignore
|
||||||
|
exclude .gitreview
|
||||||
|
|
||||||
|
global-exclude *.pyc
|
@ -118,9 +118,13 @@ Prerequisites
|
|||||||
|
|
||||||
You'll need the following Python modules installed:
|
You'll need the following Python modules installed:
|
||||||
- django (1.4+)
|
- django (1.4+)
|
||||||
- python-django-auth-openid
|
- django-openid-auth
|
||||||
- python-markdown
|
- markdown
|
||||||
|
- python-openid
|
||||||
|
|
||||||
|
You can get them by running::
|
||||||
|
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
Configuration and DB creation
|
Configuration and DB creation
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
7
requirements.txt
Normal file
7
requirements.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
d2to1>=0.2.10,<0.3
|
||||||
|
pbr>=0.5.10,<0.6
|
||||||
|
|
||||||
|
django>=1.4
|
||||||
|
django-openid-auth
|
||||||
|
markdown
|
||||||
|
python-openid
|
30
setup.cfg
Normal file
30
setup.cfg
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[metadata]
|
||||||
|
name = storyboard
|
||||||
|
summary = OpenStack StoryBoard
|
||||||
|
description-file =
|
||||||
|
README.rst
|
||||||
|
author = OpenStack
|
||||||
|
author-email = openstack-dev@lists.openstack.org
|
||||||
|
home-page = http://www.openstack.org/
|
||||||
|
classifier =
|
||||||
|
Environment :: OpenStack
|
||||||
|
Framework :: Django
|
||||||
|
Intended Audience :: Developers
|
||||||
|
Intended Audience :: Information Technology
|
||||||
|
Intended Audience :: System Administrators
|
||||||
|
License :: OSI Approved :: Apache Software License
|
||||||
|
Operating System :: OS Independent
|
||||||
|
Operating System :: POSIX :: Linux
|
||||||
|
Programming Language :: Python
|
||||||
|
Programming Language :: Python :: 2
|
||||||
|
Programming Language :: Python :: 2.7
|
||||||
|
Programming Language :: Python :: 2.6
|
||||||
|
Topic :: Internet :: WWW/HTTP
|
||||||
|
|
||||||
|
[global]
|
||||||
|
setup-hooks =
|
||||||
|
pbr.hooks.setup_hook
|
||||||
|
|
||||||
|
[files]
|
||||||
|
packages =
|
||||||
|
storyboard
|
21
setup.py
Executable file
21
setup.py
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
# implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['d2to1>=0.2.10,<0.3', 'pbr>=0.5.10,<0.6'],
|
||||||
|
d2to1=True)
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -16,6 +16,6 @@
|
|||||||
from django.conf.urls.defaults import *
|
from django.conf.urls.defaults import *
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns('about.views',
|
urlpatterns = patterns('storyboard.about.views',
|
||||||
(r'^$', 'welcome'),
|
(r'^$', 'welcome'),
|
||||||
)
|
)
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from projects.models import Project, Series, Milestone
|
from storyboard.projects.models import Project, Series, Milestone
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
from django.conf.urls.defaults import *
|
from django.conf.urls.defaults import *
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns('projects.views',
|
urlpatterns = patterns('storyboard.projects.views',
|
||||||
(r'^$', 'default_list'),
|
(r'^$', 'default_list'),
|
||||||
(r'^(\S+)/bugs/triage$', 'list_bugtriage'),
|
(r'^(\S+)/bugs/triage$', 'list_bugtriage'),
|
||||||
(r'^(\S+)/bugs$', 'list_bugtasks'),
|
(r'^(\S+)/bugs$', 'list_bugtasks'),
|
@ -20,8 +20,8 @@ from django.contrib.auth import logout
|
|||||||
from django.http import HttpResponseRedirect, HttpResponseForbidden
|
from django.http import HttpResponseRedirect, HttpResponseForbidden
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
from projects.models import Project
|
from storyboard.projects.models import Project
|
||||||
from stories.models import Task
|
from storyboard.stories.models import Task
|
||||||
|
|
||||||
def default_list(request):
|
def default_list(request):
|
||||||
return render(request, "projects.list.html", {
|
return render(request, "projects.list.html", {
|
@ -133,9 +133,9 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'django_openid_auth',
|
'django_openid_auth',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'about',
|
'storyboard.about',
|
||||||
'projects',
|
'storyboard.projects',
|
||||||
'stories',
|
'storyboard.stories',
|
||||||
]
|
]
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from stories.models import Story, Task, Comment, StoryTag
|
from storyboard.stories.models import Story, Task, Comment, StoryTag
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from projects.models import Project, Series, Milestone
|
from storyboard.projects.models import Project, Series, Milestone
|
||||||
|
|
||||||
|
|
||||||
class Story(models.Model):
|
class Story(models.Model):
|
@ -16,7 +16,7 @@
|
|||||||
from django.conf.urls.defaults import *
|
from django.conf.urls.defaults import *
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns('stories.views',
|
urlpatterns = patterns('storyboard.stories.views',
|
||||||
(r'^$', 'dashboard'),
|
(r'^$', 'dashboard'),
|
||||||
(r'^(\d+)$', 'view'),
|
(r'^(\d+)$', 'view'),
|
||||||
(r'^(\d+)/addtask$', 'add_task'),
|
(r'^(\d+)/addtask$', 'add_task'),
|
@ -18,8 +18,9 @@ from django.views.decorators.http import require_POST
|
|||||||
from django.http import HttpResponseRedirect, HttpResponseForbidden
|
from django.http import HttpResponseRedirect, HttpResponseForbidden
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from projects.models import Project, Milestone, Series
|
|
||||||
from stories.models import Story, Task, Comment, StoryTag
|
from storyboard.projects.models import Project, Milestone, Series
|
||||||
|
from storyboard.stories.models import Story, Task, Comment, StoryTag
|
||||||
|
|
||||||
def dashboard(request):
|
def dashboard(request):
|
||||||
recent_bugs = Story.objects.order_by("-id")[:5]
|
recent_bugs = Story.objects.order_by("-id")[:5]
|
@ -21,10 +21,10 @@ admin.autodiscover()
|
|||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
(r'^openid/', include('django_openid_auth.urls')),
|
(r'^openid/', include('django_openid_auth.urls')),
|
||||||
(r'^$', 'about.views.welcome'),
|
(r'^$', 'storyboard.about.views.welcome'),
|
||||||
(r'^about/', include('about.urls')),
|
(r'^about/', include('storyboard.about.urls')),
|
||||||
(r'^project/', include('projects.urls')),
|
(r'^project/', include('storyboard.projects.urls')),
|
||||||
(r'^story/', include('stories.urls')),
|
(r'^story/', include('storyboard.stories.urls')),
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
(r'^logout$', 'about.views.dologout'),
|
(r'^logout$', 'storyboard.about.views.dologout'),
|
||||||
)
|
)
|
||||||
|
7
test-requirements.txt
Normal file
7
test-requirements.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
hacking>=0.5.3,<0.6
|
||||||
|
|
||||||
|
coverage
|
||||||
|
discover
|
||||||
|
fixtures>=0.3.12
|
||||||
|
testrepository>=0.0.13
|
||||||
|
testtools>=0.9.26
|
29
tox.ini
Normal file
29
tox.ini
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[tox]
|
||||||
|
envlist = py26,py27,py33,pep8
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
LANGUAGE=en_US:en
|
||||||
|
LC_ALL=C
|
||||||
|
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
commands = python setup.py testr --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:pep8]
|
||||||
|
commands = flake8
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:cover]
|
||||||
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[tox:jenkins]
|
||||||
|
downloadcache = ~/cache/pip
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
ignore = H
|
||||||
|
show-source = True
|
||||||
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
Loading…
x
Reference in New Issue
Block a user