r108507 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108506‎ | r108507 | r108508 >
Date:15:27, 10 January 2012
Author:halfak
Status:deferred
Tags:tools 
Comment:
Fixed the rev_timestamp bug that Ryan pointed out.
Modified paths:
  • /trunk/tools/wsor/message_templates/R/twinkle.R (modified) (history)
  • /trunk/tools/wsor/message_templates/umetrics/postings.py (modified) (history)

Diff [purge]

Index: trunk/tools/wsor/message_templates/R/twinkle.R
@@ -1 +1,11 @@
 2+postings = read.table("/home/halfak/Sandbox/wsor/message_templates/data/twinkle/postings.20120104.tsv", na.strings="\\N", sep="\t", comment.char="", quote="", header=T)
 3+metrics = read.table("/home/halfak/Sandbox/wsor/message_templates/data/twinkle/metrics.20120105.tsv", na.strings="\\N", sep="\t", comment.char="", quote="", header=T)
 4+combined = merge(postings, metrics, by=c("recipient_name", "timestamp"))
25
 6+
 7+summary(postings)
 8+
 9+#Number of message recipients grouped by previous main namespace edits and order of magnitude
 10+table(10^round(log(combined$ns_0_revisions_before, base=10)))
 11+
 12+
Index: trunk/tools/wsor/message_templates/umetrics/postings.py
@@ -182,7 +182,7 @@
183183 logging.info("Checking for message templates")
184184 count = {"matched": 0, "missed": 0}
185185 for rev in revs:
186 - logging.debug("Matching revision %(rev_id)s peformed by %(poster_name)s @ %(rev_timestamp)s: %(rev_comment)s" % rev)
 186+ logging.debug("Matching revision %(rev_id)s peformed by %(poster_name)s @ %(timestamp)s: %(rev_comment)s" % rev)
187187 message = api.getAdded(rev['rev_id'])
188188
189189 match = args.message.search(message)
@@ -216,7 +216,7 @@
217217 query = """
218218 SELECT
219219 r.rev_id,
220 - r.rev_timestamp,
 220+ r.rev_timestamp as timestamp,
221221 r.rev_comment,
222222 r.rev_user AS poster_id,
223223 r.rev_user_text AS poster_name,

Status & tagging log