changeset 1:a10ae1ea8325

WIP
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 08 Jul 2012 10:09:51 -0700
parents 3e1f069ac608
children c98f2a383595
files README.txt setup.py talosnames/api.py
diffstat 3 files changed, 29 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Fri Jul 06 16:22:42 2012 -0700
+++ b/README.txt	Sun Jul 08 10:09:51 2012 -0700
@@ -1,8 +1,17 @@
 talosnames
-===========
+==========
 
 correlate names of talos
 
+Resources
+---------
+
+* http://hg.mozilla.org/build/talos/file/tip/talos/test.py
+* https://bugzilla.mozilla.org/show_bug.cgi?id=770460
+* http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/file/tip/js/Config.js#l302
+* http://hg.mozilla.org/graphs/raw-file/tip/sql/schema.sql
+* http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql
+
 ----
 
 Jeff Hammel
--- a/setup.py	Fri Jul 06 16:22:42 2012 -0700
+++ b/setup.py	Sun Jul 08 10:09:51 2012 -0700
@@ -13,8 +13,7 @@
     from setuptools import setup
     kw['entry_points'] = """
       [console_scripts]
-      talosnames = talosnames.main:main
-      talosnames-template = talosnames.template:main
+      talos-names = talosnames.main:main
 """
     kw['install_requires'] = dependencies
 except ImportError:
--- a/talosnames/api.py	Fri Jul 06 16:22:42 2012 -0700
+++ b/talosnames/api.py	Sun Jul 08 10:09:51 2012 -0700
@@ -1,5 +1,21 @@
+import sqlite3
+import urllib2
+
 class TalosNames(object):
     graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql'
-    
+    schema = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/schema.sql'
+
+    tables = ['os_list',
+              'branches',
+              'machines',
+              'pagesets',
+              'tests']
+
     def __init__(self):
-        import pdb; pdb.set_trace()
+        self.db = sqlite3.connect(':memory:')
+        for table in self.tables:
+            pass
+        schema = urllib2.urlopen(self.schema).read()
+        cursor = self.db.cursor()
+        cursor.executescript(schema)
+