Commits

Olemis Lang committed 328eb84

Updated TODO list after work ready for 1.4.1

Experimental setuptools CI command

  • Participants
  • Parent commits 275ce63

Comments (0)

Files changed (5)

File trac-dev/gviz/TODO

-
-Outstanding tasks
------------------
-
-~ Write tests for data sources included in TracGViz 1.3.4 that are 
-  not about version control.
-
-- Optimize `GVizSourceFileContents` by wrapping VCS file objects 
-  in order to get further methods (i.e. not just `read`.
-
-- Write further tests for `tracgviz.xsv.GvizXSVConverter`.
-
-- Migrate `fmtvalue` helper function from encoders towards `tracgviz.util`.
-
-- Integrate `IGVizTableEncoder` with MIME view.
-
-- Implement indirect MIME conversions using GViz data tables.
-
-- Add support for `outFileName` option in TSV encoder.
-
-- Allow encoders to introduce headers in the HTTP response.
-
-- Try to use values instead of formatted values in CSV and TSV encoders.
-
-- Include helper to convert OOo files to GViz API JSON format.
-
-- Don't skip silently the exceptions raised while executing 
-  `dutest.DocTestFixtureSuite.tearDown`.
-
-- Clone the test suites in order to run tests using components 
-  directly or using in-process HTTP server.
-
-- Introduce support for GViz warnings (specially `data_truncated` 
-  warnings).
-
-- Write tests for data sources included in TracGViz 1.3.4 that 
-  expose data under version control (`svn` + `hg` + `git` ? + `mtn` + 
-  `bzr` ? ) like `VersionControlRPC`. Include example repos.
-
-- Unify test loaders.
-
-- Implement clonation of `dutest.DocTestLoader`s.
-
-- Include example (`svn`, `hg`, ...) repositories in package data for 
-  testing purposes.
-
-- Select modules to be tested.
-
-- Implement TracAnalytics.
-
-- Implement Trac simple spreadsheets.
-
-- Add support for milestone groups in `GVizMilestone` provider.
-
-- Test `VersionControlRPC` using Hg backend. Include example `hg` 
-  repos.
-
-- Implement data source to retrieve known MIME-types.
-
-- Implement data source to retrieve available MIME conversions.
-
-- Add support for retrieving table data in reStructuredText (rst) 
-  format.
-
-- Use Trac i18n for strings displayed to clients.
-
-- Test GViz providers for VCS (`git` ? + `mtn` + `bzr` ? ).
-
-- Find the root cause for missing changes in revisions `1`, `3` and 
-  `8` (e.g. lack of support in `TracMercurial` for `copy` events?)
-
-- Add `limit` parameter for history methods in VersionControlRPC.
-
-- Implement data source provider for Ticket->Query
-
-- Implement `create`, `update`, and `delete` methods in ReportRPC
-
-- Add an option in GViz milestones in order to only show data about 
-  active milestones.
-
-- Cache the requests and optimize the request/response cycle by using 
-  the `reqId` parameter.
-
-- Implement various gadget border providers.
-
-- Allow people to upload and use their own image and CSS borders in
-  gadgets.
-
-- Implement preview capabilities for gadgets and borders.
-
-- Implement context navigation contributors to Trac Gadgets area.
-
-- Add support for CSS-based and external (HTTP) gadget borders.
-
-- Separate GVizSystem and GVizModule ?
-
-- Add labels to the data sources. bah!
-
-- Include formatted values for dates in JSON result.
-
-- Fix the issue with selecting changed tickets since timestamp.
-
-- Optimize the calls to TracRPC's Method objects by preventing 
-  them from building lists out of generators.
-
-- GViz API QL: Add tasks to support `from`, `where`, `group by`, 
-  `pivot`, `order by`, `format` and `options` clauses.
-
-- Allow data source providers to control the details needed to handle 
-  queries.
-
-- Put exception types in a separate module.
-
-- Allow to provide documentation to describe dynamic columns (i.e. 
-  those columns that appear in data tables only when some run-time 
-  conditions are met e.g. ticket custom fields in 
-  `ticket.GVizTicketReport`).
-
-- Execute reports defined using URLs pointing to saved custom queries.
-
-- Introduce support for GViz warnings (specially `data_truncated` 
-  warnings).
-
-- Implement architecture in order to export data.
-
-- Export data to Google Spreadsheets.
-
-- Provide default border images for gadgets.
-
-- Add a page to view the images in a gadget border (i.e. preview).
-
-- Add a page to list available borders.
-
-- Allow encoders to introduce headers in the HTTP response.
-
-- Allow encoders to introduce headers in the HTTP response.
-
-- Execute reports defined using URLs to saved custom queries.
-
-- Introduce support for GViz warnings (specially `data_truncated` 
-  warnings).
-
-- Add support for `outFileName` option in TSV encoder.
-
-- Ensure that pictures submitted for image-based gadget borders have 
-  the proper dimensions.
-
-- Implement local gadget borders with the help of Trac Resources.
-
-- Implement navigation to Trac Gadgets area.
-
-- Build a translations catalog for es-ES.
+
+Outstanding tasks
+-----------------
+
+~ Write tests for data sources included in TracGViz 1.3.4 that are 
+  not about version control.
+
+- Fix error using Python 2.6 `hmac` hashing in Ubuntu 10.04.
+
+{{{
+2010-09-07 00:05:00,345 Trac[util] ERROR: IG: Error creating hash using <tracgviz.stdhash.HmacHash object at 0xa9185ec>
+Traceback (most recent call last):
+  File "build/bdist.linux-i686/egg/tracgviz/util.py", line 107, in _init_hash
+    self.hash_obj = self._hlib.new_hash_obj(hash_name)
+  File "build/bdist.linux-i686/egg/tracgviz/stdhash.py", line 224, in new_hash_obj
+    return hmac.new(self.key, digestmod=self._generic_digmod)
+  File "/usr/lib/python2.6/hmac.py", line 133, in new
+    return HMAC(key, msg, digestmod)
+  File "/usr/lib/python2.6/hmac.py", line 72, in __init__
+    self.outer.update(key.translate(trans_5C))
+TypeError: character mapping must return integer, None or unicode
+}}}
+
+- Optimize `GVizSourceFileContents` by wrapping VCS file objects 
+  in order to get further methods (i.e. not just `read`).
+
+- Write further tests for `tracgviz.xsv.GvizXSVConverter`.
+
+- Migrate `fmtvalue` helper function from encoders towards `tracgviz.util`.
+
+- Integrate `IGVizTableEncoder` with MIME view.
+
+- Implement indirect MIME conversions using GViz data tables.
+
+- Add support for `outFileName` option in TSV encoder.
+
+- Allow encoders to introduce headers in the HTTP response.
+
+- Try to use values instead of formatted values in CSV and TSV encoders.
+
+- Include helper to convert OOo files to GViz API JSON format.
+
+- Don't skip silently the exceptions raised while executing 
+  `dutest.DocTestFixtureSuite.tearDown`.
+
+- Clone the test suites in order to run tests using components 
+  directly or using in-process HTTP server.
+
+- Introduce support for GViz warnings (specially `data_truncated` 
+  warnings).
+
+- Write tests for data sources included in TracGViz 1.3.4 that 
+  expose data under version control (`svn` + `hg` + `git` ? + `mtn` + 
+  `bzr` ? ) like `VersionControlRPC`. Include example repos.
+
+- Unify test loaders.
+
+- Implement clonation of `dutest.DocTestLoader`s.
+
+- Include example (`svn`, `hg`, ...) repositories in package data for 
+  testing purposes.
+
+- Select modules to be tested.
+
+- Implement TracAnalytics.
+
+- Implement Trac simple spreadsheets.
+
+- Add support for milestone groups in `GVizMilestone` provider.
+
+- Test `VersionControlRPC` using Hg backend. Include example `hg` 
+  repos.
+
+- Implement data source to retrieve known MIME-types.
+
+- Implement data source to retrieve available MIME conversions.
+
+- Add support for retrieving table data in reStructuredText (rst) 
+  format.
+
+- Use Trac i18n for strings displayed to clients.
+
+- Test GViz providers for VCS (`git` ? + `mtn` + `bzr` ? ).
+
+- Find the root cause for missing changes in revisions `1`, `3` and 
+  `8` (e.g. lack of support in `TracMercurial` for `copy` events?)
+
+- Add `limit` parameter for history methods in VersionControlRPC.
+
+- Implement data source provider for Ticket->Query
+
+- Implement `create`, `update`, and `delete` methods in ReportRPC
+
+- Add an option in GViz milestones in order to only show data about 
+  active milestones.
+
+- Cache the requests and optimize the request/response cycle by using 
+  the `reqId` parameter.
+
+- Implement various gadget border providers.
+
+- Allow people to upload and use their own image and CSS borders in
+  gadgets.
+
+- Implement preview capabilities for gadgets and borders.
+
+- Implement context navigation contributors to Trac Gadgets area.
+
+- Add support for CSS-based and external (HTTP) gadget borders.
+
+- Separate GVizSystem and GVizModule ?
+
+- Add labels to the data sources. bah!
+
+- Include formatted values for dates in JSON result.
+
+- Fix the issue with selecting changed tickets since timestamp.
+
+- Optimize the calls to TracRPC's Method objects by preventing 
+  them from building lists out of generators.
+
+- GViz API QL: Add tasks to support `from`, `where`, `group by`, 
+  `pivot`, `order by`, `format` and `options` clauses.
+
+- Allow data source providers to control the details needed to handle 
+  queries.
+
+- Put exception types in a separate module.
+
+- Allow to provide documentation to describe dynamic columns (i.e. 
+  those columns that appear in data tables only when some run-time 
+  conditions are met e.g. ticket custom fields in 
+  `ticket.GVizTicketReport`).
+
+- Execute reports defined using URLs pointing to saved custom queries.
+
+- Introduce support for GViz warnings (specially `data_truncated` 
+  warnings).
+
+- Implement architecture in order to export data.
+
+- Export data to Google Spreadsheets.
+
+- Provide default border images for gadgets.
+
+- Add a page to view the images in a gadget border (i.e. preview).
+
+- Add a page to list available borders.
+
+- Allow encoders to introduce headers in the HTTP response.
+
+- Allow encoders to introduce headers in the HTTP response.
+
+- Execute reports defined using URLs to saved custom queries.
+
+- Introduce support for GViz warnings (specially `data_truncated` 
+  warnings).
+
+- Add support for `outFileName` option in TSV encoder.
+
+- Ensure that pictures submitted for image-based gadget borders have 
+  the proper dimensions.
+
+- Implement local gadget borders with the help of Trac Resources.
+
+- Implement navigation to Trac Gadgets area.
+
+- Build a translations catalog for es-ES.
+
+- Provide alternative offline graphs based on JS library : 
+  RGraph, Flot 
+

File trac-dev/gviz/setup.py

     from setuptools import setup
 except ImportError:
     from distutils.core import setup
+    dist_cmds = {}
+else :
+    # Hack: distutils command to run tests at testrun.org (Hudson ;o)
+    from setuptools.command.test import test
+    
+    class test_ci(test):
+      def finalize_options(self):
+        # Install JUnit XML runner
+        try :
+          self.distribution.tests_require.append('unittest-xml-reporting')
+        except :
+          self.distribution.tests_require = ['unittest-xml-reporting']
+        
+        # Use JUnit XML runner by default
+        if self.test_runner is None:
+            self.test_runner = 'xmlrunner:XMLTestRunner'
+        
+        test.finalize_options(self)
+    
+    dist_cmds = {'test_ci' : test_ci}
 
 from tracgviz.__init__ import __doc__ as DESC
 
 PKG_INFO = {'tracgviz' : ('tracgviz',                     # Package dir
                             # Package data
                             ['templates/*', 'htdocs/*', 
-                      		    'messages/es/LC_MESSAGES/*', '../CHANGES', 
+                              'messages/es/LC_MESSAGES/*', '../CHANGES', 
                               '../COPYRIGHT', '../NOTICE', '../README', 
-                              '../TODO', '../examples/*'],
+                              '../TODO'],
                           ), 
             'tracgviz.testing' : ('tracgviz/testing',     # Package dir
                             # Package data
                             ['data/**'],
                           ), 
-            'tracgviz.ig' : ('tracgviz/ig',                     # Package dir
-                            # Package data
+            'tracgviz.ig' : ('tracgviz/ig',               # Package dir
+                           # Package data
                             ['templates/*', 'htdocs/*'],
                           ), 
             }
                """
 
 setup(
-	name=DIST_NM,
-	version=latest,
-	description=DESC.split('\n', 1)[0],
-	author='Olemis Lang',
-	author_email='olemis@gmail.com',
-	maintainer='Olemis Lang',
-	maintainer_email='olemis@gmail.com',
-	url='https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/%s' % (DIST_NM,),
-	download_url='http://pypi.python.org/packages/2.5/%s/%s/%s-%s-py2.5.egg' % \
-	                              (DIST_NM[0], DIST_NM, DIST_NM, latest,),
-	requires = ['trac', 'tracrpc', 'gviz_api', 'pygments', 'dutest'],
+  name=DIST_NM,
+  version=latest,
+  description=DESC.split('\n', 1)[0],
+  author='Olemis Lang',
+  author_email='olemis@gmail.com',
+  maintainer='Olemis Lang',
+  maintainer_email='olemis@gmail.com',
+  url='https://projects.olemix.com/cgi-bin/trac.cgi/wiki/En/Devel/%s' % (DIST_NM,),
+  download_url='http://pypi.python.org/packages/2.5/%s/%s/%s-%s-py2.5.egg' % \
+                                (DIST_NM[0], DIST_NM, DIST_NM, latest,),
+  requires = ['trac', 'tracrpc', 'gviz_api', 'pygments', 'dutest'],
+  tests_require = ['dutest>=0.2.4'],
   install_requires = [
       'setuptools>=0.6b1',
       'Trac>=0.11',
       'TracXMLRPC<1.0.7',
       'Pygments>=1.0',
-      'dutest>=0.2.3',
   ],
-	package_dir = dict([p, i[0]] for p, i in PKG_INFO.iteritems()),
-	packages = PKG_INFO.keys(),
-	package_data = dict([p, i[1]] for p, i in PKG_INFO.iteritems()),
-	include_package_data=True,
-	provides = ['%s (%s)' % (p, latest) for p in PKG_INFO.keys()],
-	obsoletes = ['%s (>=%s.0.0, <%s)' % (p, versions[-1][0], latest) \
-	              for p in PKG_INFO.keys()],
-	entry_points = ENTRY_POINTS,
-	classifiers = cats,
-	long_description= DESC
-	)
+  package_dir = dict([p, i[0]] for p, i in PKG_INFO.iteritems()),
+  packages = PKG_INFO.keys(),
+  package_data = dict([p, i[1]] for p, i in PKG_INFO.iteritems()),
+  include_package_data=True,
+  provides = ['%s (%s)' % (p, latest) for p in PKG_INFO.keys()],
+  obsoletes = ['%s (>=%s.0.0, <%s)' % (p, versions[-1][0], latest) \
+                for p in PKG_INFO.keys()],
+  entry_points = ENTRY_POINTS,
+  classifiers = cats,
+  long_description= DESC,
+  cmd_class = dist_cmds,
+  )

File trac-dev/gviz/tracgviz/__init__.py

 except Exception, exc:
 #    raise
     msg = "IG: Exception %s raised: '%s'" % (exc.__class__.__name__, str(exc))
+

File trac-dev/gviz/tracgviz/stdhash.py

     r"""Create a new hash object.
     """
     if method_name == 'hmac':
+      self.log.debug("IG: Creating HMAC key=%s, mod=%s", self.key, 
+                      self.digestmod)
       return hmac.new(self.key, digestmod=self._generic_digmod)
     else:
       raise GVizInvalidConfigError("Invalid algorithm name '%s'" \

File trac-dev/gviz/tracgviz/util.py

 from api import IGVizProtocolHandler, IGVizTableEncoder, \
                 IGVizDataProvider, IHashLibrary, GVizBadRequestError, \
                 GVizInvalidConfigError
-from testing.util import dummy_request
+from tracgviz.testing.util import dummy_request
 
 __metaclass__ = type
 
               cur_pr, _ = hlib.get_hash_properties(hash_name)
             except TypeError:
               self.log.debug("IG: %s doesnt support '%s'", hlib, hash_name)
+            except :
+              self.log.exception('IG: Error processing %s', hlib)
+              raise
             else:
               if cur_pr > pr:
                 self._hlib = hlib
           except GVizInvalidConfigError, exc:
             self.log.warning("IG: Hash method '%s' lib '%s' failed: %s", \
                               hash_name, self._hlib, str(exc))
+          except :
+            self.log.exception('IG: Error creating hash using %s', hlib)
+            raise
         else:
           self.log.info("IG: Hash method 'None'")