Skip to content

Commit

Permalink
Installed the packaging and basic boiler plate files.
Browse files Browse the repository at this point in the history
  • Loading branch information
truedat101 committed Jun 9, 2009
1 parent f05b4a1 commit 3bd9643
Show file tree
Hide file tree
Showing 8 changed files with 215 additions and 54 deletions.
Empty file added INSTALL
Empty file.
1 change: 1 addition & 0 deletions NEWS
@@ -0,0 +1 @@
No Gnews is Good Gnews.
36 changes: 36 additions & 0 deletions README
@@ -0,0 +1,36 @@
NAME
spongex

DESCRIPTION

The idea behind Project Sponge is to provide some tools to measure an OSS project�s
vitality. The concept I will use is similar to an APGAR test when a baby is born. A
n APGAR test checks the vitals several times after the birth (at birth, and then throughout
the next hour or two of life). For an OSS project, you should be checking what I will call
the Project Vitality: The vital stats and data showing how well an OSS project is doing at
a given point in time. Since Project Vitality can be a relative measure, it is important to
be able to compare the Project Vitality to past measurements. The Vitality Dashboard is the
visual report of Project Vitality over time. This is targeted at OSS project leads, and
specifically, to help commercial open source types to justify the open source approach to
management by promises to track progress using some reasonable metrics for success and signs
of life. Ideally, sponge can evolve into a sort of OSS Project Analytics tool.

INSTALL
python setup.py install
or
python setup.py install --prifix=/foo/path (to install under /foo/path, useful for Macs)

USAGE
spongex -c=[config file path]

examples:

* spongex ../../../examples/luffaproject.conf

help: spongex -u

Send comments, suggestions and bug reports to dkords@gmail.com

-- David J. Kordsmeier


7 changes: 7 additions & 0 deletions examples/spongesite.conf
Expand Up @@ -18,6 +18,13 @@ project.founded=2009,03,17
# Data Source Setup
#
datasource.github=http://github.com/truedat101/sponge/tree/master
datasource.github.apikey=FOO

#
# Backing Store
#
backingstore.db.uri=XXX TODO Decide on default backing store, maybe a CSV
backingstore.backup.uri=XXX TODO Decide how to handle backup of your backing store, probably a timestamped copy

#
# Report Setup
Expand Down
75 changes: 75 additions & 0 deletions setup.py
@@ -0,0 +1,75 @@
#!/usr/bin/env python
try:
from setuptools import setup, find_packages
except:
from distutils.core import setup

import sys
import os

import sponge.PkgInfo

if float("%d.%d" % sys.version_info[:2]) < 2.5:
sys.stderr.write("Your Python version %d.%d.%d is not supported.\n" % sys.version_info[:3])
sys.stderr.write("sponge requires Python 2.5 or newer.\n")
sys.exit(1)

try:
## Remove 'MANIFEST' file to force
## distutils to recreate it.
## Only in "sdist" stage. Otherwise
## it makes life difficult to packagers.
if sys.argv[1] == "sdist":
os.unlink("MANIFEST")
except:
pass

## Don't install manpages and docs when $sponge_PACKAGING is set
## This was a requirement of Debian package maintainer.
if not os.getenv("sponge_PACKAGING"):
man_path = os.getenv("sponge_INSTPATH_MAN") or "share/man"
doc_path = os.getenv("sponge_INSTPATH_DOC") or "share/doc/packages"
data_files = [
(doc_path+"/sponge", [ "README", "INSTALL", "NEWS" ]),
(man_path+"/man1", [ "spongex.1" ] ),
]
else:
data_files = None

## XXX TODO: Fix the Topic
classifiers = [
'Development Status :: 3 - Alpha'
, 'Environment :: Console'
, 'Intended Audience :: Developers'
, 'License :: OSI Approved :: BSD License'
, 'Natural Language :: English'
, 'Operating System :: MacOS :: MacOS X'
, 'Operating System :: POSIX'
, 'Programming Language :: Python'
, 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server'
]

## Main distutils info
setup(
## Content description
name = sponge.PkgInfo.package,
version = sponge.PkgInfo.version,
## packages = [ 'sponge', 'sponge.tools' ],
packages = find_packages(),
scripts = ['spongex'],
data_files = data_files,

## Packaging details
author = "David J. kordsmeier",
author_email = "dkords@gmail.com",
url = sponge.PkgInfo.url,
license = sponge.PkgInfo.license,
description = sponge.PkgInfo.short_description,
long_description = """
%s
Authors:
--------
David J. Kordsmeier <dkords@gmail.com>
""" % (sponge.PkgInfo.long_description)
)
10 changes: 10 additions & 0 deletions src/sponge/PkgInfo.py
@@ -0,0 +1,10 @@
package = "sponge"
version = "0.1.1"
url = "http://github.com/truedat101/sponge/tree/master"
license = "BSD License"
short_description = "Sponge makes it easy to track your Open Source Project Vitality"
long_description = """
Sponge makes it easy to track your Open Source Project Vitality by allowing you to script the
process of data gathering key stats and provide some analysis on the vitality.
"""

70 changes: 43 additions & 27 deletions src/sponge/tools/Sponger.py
@@ -1,35 +1,49 @@
#!/usr/bin/env python
# encoding: utf-8
#
#Sponger.py
#
#Created by David J. Kordsmeier on 2009-01-30.
#Copyright (c) 2009 Razortooth Communications, LLC. All rights reserved.
#
#Redistribution and use in source and binary forms, with or without modification,
#are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of Razortooth Communications, LLC, nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
#ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
#(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
#ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
#SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
Sponger.py
Sponger handles the process of loading the plugins used to track Project Vitality,
generate a report, and store the results.
Created by David J. Kordsmeier on 2009-01-30.
Copyright (c) 2009 Razortooth Communications, LLC. All rights reserved.
The backing store format for the Project Vitality Report is as follows:
XXX TBD CSV is easiest for out of the box, and can be backed up anywhere as a flat file
either to git iteself, sqlite, CouchDB, mysql, or simply to local hard drive.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
It is expected the Project Vitality Report will be used a website to publish the data
in a graph form for easier visualization. Something like this should work great:
http://www.liquidx.net/plotkit/
There is also Open Flash Charts http://teethgrinder.co.uk/open-flash-chart/ which look
great but I think I can't hang with the flash stuff. Too many browser problems.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Razortooth Communications, LLC, nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
import sys
import os
Expand Down Expand Up @@ -72,10 +86,12 @@ def initEnv(self, siteFile):
def soak(self):
if (1): # Check for existence of data source plugins
plugin = 0
#
# Use Default
# should normally loop through and process all of the data source plugins
# and only fail with exit if there are no plugins available
# even if plugins don't work, they should return the results with error info
# even if plugins don't work, they should return error info to stderr/stdout
# and should not commit results to backing store if any plugin fails.
#
plugin = GithubDatasourcePlugin()
self.spongeDatasourcePlugins['GithubDatasourcePlugin':plugin]
Expand Down
70 changes: 43 additions & 27 deletions src/sponge/tools/sponger.py
@@ -1,35 +1,49 @@
#!/usr/bin/env python
# encoding: utf-8
#
#Sponger.py
#
#Created by David J. Kordsmeier on 2009-01-30.
#Copyright (c) 2009 Razortooth Communications, LLC. All rights reserved.
#
#Redistribution and use in source and binary forms, with or without modification,
#are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of Razortooth Communications, LLC, nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
#ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
#(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
#ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
#SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
Sponger.py
Sponger handles the process of loading the plugins used to track Project Vitality,
generate a report, and store the results.
Created by David J. Kordsmeier on 2009-01-30.
Copyright (c) 2009 Razortooth Communications, LLC. All rights reserved.
The backing store format for the Project Vitality Report is as follows:
XXX TBD CSV is easiest for out of the box, and can be backed up anywhere as a flat file
either to git iteself, sqlite, CouchDB, mysql, or simply to local hard drive.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
It is expected the Project Vitality Report will be used a website to publish the data
in a graph form for easier visualization. Something like this should work great:
http://www.liquidx.net/plotkit/
There is also Open Flash Charts http://teethgrinder.co.uk/open-flash-chart/ which look
great but I think I can't hang with the flash stuff. Too many browser problems.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Razortooth Communications, LLC, nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
import sys
import os
Expand Down Expand Up @@ -72,10 +86,12 @@ def initEnv(self, siteFile):
def soak(self):
if (1): # Check for existence of data source plugins
plugin = 0
#
# Use Default
# should normally loop through and process all of the data source plugins
# and only fail with exit if there are no plugins available
# even if plugins don't work, they should return the results with error info
# even if plugins don't work, they should return error info to stderr/stdout
# and should not commit results to backing store if any plugin fails.
#
plugin = GithubDatasourcePlugin()
self.spongeDatasourcePlugins['GithubDatasourcePlugin':plugin]
Expand Down

0 comments on commit 3bd9643

Please sign in to comment.