Index: trunk/tools/editor_trends/manage.py |
— | — | @@ -24,7 +24,6 @@ |
25 | 25 | import datetime |
26 | 26 | import ConfigParser |
27 | 27 | from argparse import ArgumentParser, RawTextHelpFormatter |
28 | | -import cProfile |
29 | 28 | |
30 | 29 | from classes import languages |
31 | 30 | from classes import projects |
— | — | @@ -420,5 +419,5 @@ |
421 | 420 | |
422 | 421 | |
423 | 422 | if __name__ == '__main__': |
424 | | - #main() |
425 | | - cProfile.run('main()') |
| 423 | + main() |
| 424 | + #cProfile.run('main()') |
Index: trunk/tools/editor_trends/etl/transformer.py |
— | — | @@ -48,15 +48,12 @@ |
49 | 49 | |
50 | 50 | |
51 | 51 | class Editor: |
52 | | - def __init__(self, db_raw, db_dataset, editor_id, **kwargs): |
53 | | - self.editor_id = editor_id |
54 | | - self.db_raw = db_raw |
55 | | - self.db_dataset = db_dataset |
56 | | - for kw in kwargs: |
57 | | - setattr(self, kw, kwargs[kw]) |
| 52 | + def __init__(self, rts, editor_id): |
| 53 | + self.db_raw = storage.init_database(rts.storage, rts.dbname, rts.editors_raw) |
| 54 | + self.db_dataset = storage.init_database(rts.storage, rts.dbname, rts.editors_dataset) |
58 | 55 | |
59 | 56 | def __str__(self): |
60 | | - return '%s' % (self.id) |
| 57 | + return '%s' % (self.editor_id) |
61 | 58 | |
62 | 59 | def __call__(self): |
63 | 60 | cutoff = 9 |