Skip to content

Commit

Permalink
Added OpenStack dev things
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emonty committed Jul 15, 2013
1 parent df633a7 commit d035720
Show file tree
Hide file tree
Showing 52 changed files with 130 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
*.db
*~
local_settings.py
storyboard.db
.tox
AUTHORS
ChangeLog
*.egg-info
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include AUTHORS
include ChangeLog
exclude .gitignore
exclude .gitreview

global-exclude *.pyc
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ Prerequisites

You'll need the following Python modules installed:
- django (1.4+)
- python-django-auth-openid
- python-markdown
- django-openid-auth
- markdown
- python-openid

You can get them by running::

pip install -r requirements.txt

Configuration and DB creation
-----------------------------
Expand Down
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 30 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion about/urls.py → storyboard/about/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
from django.conf.urls.defaults import *


urlpatterns = patterns('about.views',
urlpatterns = patterns('storyboard.about.views',
(r'^$', 'welcome'),
)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion projects/admin.py → storyboard/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.

from projects.models import Project, Series, Milestone
from storyboard.projects.models import Project, Series, Milestone
from django.contrib import admin


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion projects/urls.py → storyboard/projects/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from django.conf.urls.defaults import *


urlpatterns = patterns('projects.views',
urlpatterns = patterns('storyboard.projects.views',
(r'^$', 'default_list'),
(r'^(\S+)/bugs/triage$', 'list_bugtriage'),
(r'^(\S+)/bugs$', 'list_bugtasks'),
Expand Down
4 changes: 2 additions & 2 deletions projects/views.py → storyboard/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render

from projects.models import Project
from stories.models import Task
from storyboard.projects.models import Project
from storyboard.stories.models import Task

def default_list(request):
return render(request, "projects.list.html", {
Expand Down
6 changes: 3 additions & 3 deletions storyboard/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@
'django.contrib.staticfiles',
'django_openid_auth',
'django.contrib.admin',
'about',
'projects',
'stories',
'storyboard.about',
'storyboard.projects',
'storyboard.stories',
]

AUTHENTICATION_BACKENDS = (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion stories/admin.py → storyboard/stories/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# 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


Expand Down
2 changes: 1 addition & 1 deletion stories/models.py → storyboard/stories/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from django.db import models
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):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion stories/urls.py → storyboard/stories/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from django.conf.urls.defaults import *


urlpatterns = patterns('stories.views',
urlpatterns = patterns('storyboard.stories.views',
(r'^$', 'dashboard'),
(r'^(\d+)$', 'view'),
(r'^(\d+)/addtask$', 'add_task'),
Expand Down
5 changes: 3 additions & 2 deletions stories/views.py → storyboard/stories/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render
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):
recent_bugs = Story.objects.order_by("-id")[:5]
Expand Down
10 changes: 5 additions & 5 deletions storyboard/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

urlpatterns = patterns('',
(r'^openid/', include('django_openid_auth.urls')),
(r'^$', 'about.views.welcome'),
(r'^about/', include('about.urls')),
(r'^project/', include('projects.urls')),
(r'^story/', include('stories.urls')),
(r'^$', 'storyboard.about.views.welcome'),
(r'^about/', include('storyboard.about.urls')),
(r'^project/', include('storyboard.projects.urls')),
(r'^story/', include('storyboard.stories.urls')),
url(r'^admin/', include(admin.site.urls)),
(r'^logout$', 'about.views.dologout'),
(r'^logout$', 'storyboard.about.views.dologout'),
)
7 changes: 7 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d035720

Please sign in to comment.