Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit cdb34db5ebaa46e921960e0876f58353d538ab02 @ralphbean ralphbean committed Apr 19, 2011
Showing with 19,877 additions and 0 deletions.
  1. +20 −0 .gitignore
  2. +3 −0 MANIFEST.in
  3. +37 −0 README.rst
  4. +38 −0 development-deps/develop-tw2-destroy-and-setup.sh
  5. +11 −0 development-deps/develop-tw2-start.sh
  6. +1 −0 development-deps/tw2.jqplugins.ui
  7. +4 −0 setup.cfg
  8. +54 −0 setup.py
  9. +1 −0 tw2/__init__.py
  10. +1 −0 tw2/jqplugins/__init__.py
  11. +6 −0 tw2/jqplugins/flot/__init__.py
  12. +18 −0 tw2/jqplugins/flot/base.py
  13. +2 −0 tw2/jqplugins/flot/defaults.py
  14. +15 −0 tw2/jqplugins/flot/samples.py
  15. +1,201 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/API.txt
  16. +76 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/FAQ.txt
  17. +22 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/LICENSE.txt
  18. +9 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/Makefile
  19. +508 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/NEWS.txt
  20. +137 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/PLUGINS.txt
  21. +90 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/README.txt
  22. +143 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/ajax.html
  23. +75 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/annotating.html
  24. BIN tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/arrow-down.gif
  25. BIN tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/arrow-left.gif
  26. BIN tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/arrow-right.gif
  27. BIN tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/arrow-up.gif
  28. +38 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/basic.html
  29. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-eu-gdp-growth-1.json
  30. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-eu-gdp-growth-2.json
  31. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-eu-gdp-growth-3.json
  32. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-eu-gdp-growth-4.json
  33. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-eu-gdp-growth-5.json
  34. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-eu-gdp-growth.json
  35. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-japan-gdp-growth.json
  36. +4 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/data-usa-gdp-growth.json
  37. +75 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/graph-types.html
  38. BIN tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/hs-2004-27-a-large_web.jpg
  39. +45 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/image.html
  40. +44 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/index.html
  41. +97 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/interacting-axes.html
  42. +93 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/interacting.html
  43. +6 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/layout.css
  44. +60 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/multiple-axes.html
  45. +118 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/navigate.html
  46. +57 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/percentiles.html
  47. +756 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/pie.html
  48. +83 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/realtime.html
  49. +61 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/resize.html
  50. +114 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/selection.html
  51. +61 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/setting-options.html
  52. +77 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/stacking.html
  53. +49 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/symbols.html
  54. +54 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/thresholding.html
  55. +71 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/time.html
  56. +95 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/tracking.html
  57. +98 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/turning-series.html
  58. +90 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/visitors.html
  59. +98 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/examples/zooming.html
  60. +1,427 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/excanvas.js
  61. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/excanvas.min.js
  62. +179 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.colorhelpers.js
  63. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.colorhelpers.min.js
  64. +167 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.crosshair.js
  65. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.crosshair.min.js
  66. +183 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.fillbetween.js
  67. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.fillbetween.min.js
  68. +238 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.image.js
  69. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.image.min.js
  70. +2,599 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.js
  71. +6 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.min.js
  72. +336 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.navigate.js
  73. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.navigate.min.js
  74. +750 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.pie.js
  75. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.pie.min.js
  76. +60 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.resize.js
  77. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.resize.min.js
  78. +344 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.selection.js
  79. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.selection.min.js
  80. +184 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.stack.js
  81. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.stack.min.js
  82. +70 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.symbol.js
  83. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.symbol.min.js
  84. +103 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.threshold.js
  85. +1 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.flot.threshold.min.js
  86. +8,316 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.js
  87. +23 −0 tw2/jqplugins/flot/static/jqplugins/flot/0.7/jquery.min.js
  88. 0 tw2/jqplugins/flot/templates/__init__.py
  89. +10 −0 tw2/jqplugins/flot/templates/flot.mak
  90. +26 −0 tw2/jqplugins/flot/widgets.py
@@ -0,0 +1,20 @@
+# use glob syntax.
+syntax: glob
+
+*.egg-info
+.coverage
+*.pyc
+*~
+*.swp
+*.rej
+tags
+dist
+build
+.hg*
+tw2core
+tw2devtools
+tw2forms
+tw2jquery
+tw2.jquery.plugins.ui
+virtualenv-*
+*.egg
@@ -0,0 +1,3 @@
+recursive-include tw2/jqplugins/flot/static *
+recursive-include tw2/jqplugins/flot/templates *
+include README.rst
@@ -0,0 +1,37 @@
+tw2.jqplugins.flot
+=========================
+
+:Author: Ralph Bean <ralph.bean@gmail.com>
+
+.. comment: split here
+
+.. _toscawidgets2 (tw2): http://toscawidgets.org/documentation/tw2.core/
+.. _flot: http://code.google.com/p/flot/
+
+tw2.jqplugins.flot is a `toscawidgets2 (tw2)`_ wrapper for `flot`_.
+
+Live Demo
+---------
+Peep the `live demonstration <http://craftsman.rc.rit.edu/module?module=tw2.jqplugins.flot>`_.
+
+Links
+-----
+Get the `source from github <http://github.com/ralphbean/tw2.jqplugins.flot>`_.
+
+`PyPI page <http://pypi.python.org/pypi/tw2.jqplugins.flot>`_
+and `bugs <http://github.com/ralphbean/tw2.jqplugins.flot/issues/>`_
+
+Description
+-----------
+
+`toscawidgets2 (tw2)`_ aims to be a practical and useful widgets framework
+that helps people build interactive websites with compelling features, faster
+and easier. Widgets are re-usable web components that can include a template,
+server-side code and JavaScripts/CSS resources. The library aims to be:
+flexible, reliable, documented, performant, and as simple as possible.
+
+`flot`_ is a pure Javascript plotting library for jQuery. It produces graphical
+plots of arbitrary datasets on-the-fly client-side.
+
+This module, tw2.jqplugins.flot, provides `toscawidgets2 (tw2)`_ access
+to `flot`_ widgets.
@@ -0,0 +1,38 @@
+#!/bin/bash -e
+
+devbase=development-deps
+venv=$devbase/virtualenv-tw2.jquery
+$(
+ rm -rf $venv
+) || echo "Did not destroy $venv"
+
+virtualenv $venv --no-site-packages
+
+source $venv/bin/activate
+
+pushd $devbase
+
+pip install genshi
+pip install mako
+pip install formencode
+
+hg clone http://bitbucket.org/paj/tw2core || \
+ (pushd tw2core && hg pull && popd)
+hg clone http://bitbucket.org/paj/tw2devtools || \
+ (pushd tw2devtools && hg pull && popd)
+hg clone http://bitbucket.org/paj/tw2forms || \
+ (pushd tw2forms && hg pull && popd)
+hg clone http://bitbucket.org/toscawidgets/tw2jquery || \
+ (pushd tw2jquery && hg pull && popd)
+git clone http://github.com/ralphbean/tw2.jqplugins.ui.git || \
+ (pushd tw2.jqplugins.ui && git pull && popd)
+#hg clone https://ralphbean@bitbucket.org/toscawidgets/tw2jquery || \
+# (pushd tw2jquery && hg pull && popd)
+
+pushd tw2core ; python setup.py install ; popd
+pushd tw2forms ; python setup.py install ; popd
+pushd tw2devtools ; python setup.py install ; popd
+pushd tw2jquery ; python setup.py install_lib install_egg_info ; popd
+pushd tw2.jqplugins.ui ; python setup.py install_lib install_egg_info ; popd
+
+popd # $devbase
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+devbase=development-deps
+venv=$devbase/virtualenv-tw2.jquery
+source $venv/bin/activate
+
+python setup.py develop
+python setup.py install_lib install_egg_info && paster tw2.browser
+
+
+
Submodule tw2.jqplugins.ui added at 0329e6
@@ -0,0 +1,4 @@
+[egg_info]
+
+[nosetests]
+where = tests
@@ -0,0 +1,54 @@
+from setuptools import setup, find_packages
+
+f = open('README.rst')
+long_description = f.read().strip()
+long_description = long_description.split('split here', 1)[1]
+f.close()
+
+# Requirements to install buffet plugins and engines
+_extra_genshi = ["Genshi >= 0.3.5"]
+_extra_mako = ["Mako >= 0.1.1"]
+
+setup(
+ name='tw2.jqplugins.flot',
+ version='2.0a0',
+ description='toscawidgets2 wrapper for the flot jQuery plugin',
+ long_description=long_description,
+ author='Ralph Bean',
+ author_email='ralph.bean@gmail.com',
+ license='MIT',
+ url='http://github.com/ralphbean/tw2.jqplugins.flot',
+ install_requires=[
+ "tw2.core>=2.0b2",
+ "tw2.excanvas",
+ "tw2.jqplugins.ui",
+ ],
+ extras_require = {
+ 'genshi': _extra_genshi,
+ 'mako': _extra_mako,
+ },
+ tests_require = ['BeautifulSoup', 'nose', 'FormEncode', 'WebTest',] + _extra_genshi + _extra_mako,
+ packages=find_packages(exclude=['ez_setup', 'tests']),
+ namespace_packages = ['tw2'],
+ zip_safe=False,
+ include_package_data=True,
+ test_suite = 'nose.collector',
+ entry_points="""
+ [tw2.widgets]
+ # Register your widgets so they can be listed in the WidgetBrowser
+ widgets = tw2.jqplugins.flot
+ """,
+ keywords = [
+ 'toscawidgets.widgets',
+ ],
+ classifiers = [
+ 'Development Status :: 3 - Alpha',
+ 'Environment :: Web Environment',
+ 'Environment :: Web Environment :: ToscaWidgets',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ 'Topic :: Software Development :: Widget Sets',
+ 'Intended Audience :: Developers',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ ],
+)
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
@@ -0,0 +1,6 @@
+""" TW2 widget wrapper the jquery ui jqplot
+
+Get the source from http://github.com/ralphbean/tw2.jqplugins.jqplot
+"""
+
+from widgets import *
@@ -0,0 +1,18 @@
+
+import tw2.core as twc
+import tw2.jquery.base as twjq_c
+import defaults
+
+flot_js = twjq_c.jQueryPluginJSLink(
+ name=defaults._flot_name_,
+ version=defaults._flot_version_,
+ variant='min',
+ modname='tw2.jqplugins.flot',
+ subdir = '',
+)
+flot_utils_js = twc.JSLink(
+ modname='tw2.jqplugins.flot',
+ filename='static/js/flot-utils.js',
+)
+
+__all__ = ['flot_js', 'flot_utils_js']
@@ -0,0 +1,2 @@
+_flot_version_ = '0.7'
+_flot_name_ = 'flot'
@@ -0,0 +1,15 @@
+
+from widgets import FlotWidget
+
+import math
+def f(x):
+ return x/math.pi
+
+class DemoFlot(FlotWidget):
+ data = [
+ {
+ 'data' : [[f(i), math.sin(f(i))] for i in range(20)],
+ 'label' : "sin(x)"
+ }
+ ]
+ label = "sin plot"
Oops, something went wrong.

0 comments on commit cdb34db

Please sign in to comment.