QChris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/86185


Change subject: Drop callout widget from active editors total
......................................................................

Drop callout widget from active editors total

Change-Id: Ic322e660efa80753ed8f02b42327d0e8ced76849
---
M scripts/make_limn_files.py
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki 
refs/changes/85/86185/1

diff --git a/scripts/make_limn_files.py b/scripts/make_limn_files.py
index 3dc111a..38a77f4 100755
--- a/scripts/make_limn_files.py
+++ b/scripts/make_limn_files.py
@@ -361,6 +361,17 @@
             graph_id='global_south_editor_fractions')
     g.write(basedir)
 
+def drop_callout_widget(g):
+    """Drop the callout widget from a graph
+
+    Keyword arguments:
+    graph -- limnpy Graph. Drop the change widget from this graph.
+    """
+    g.graph["root"]["children"] = [ widget \
+        for widget in g.graph["root"]["children"] \
+            if ( "nodeType" not in widget or widget["nodeType"] != "callout" ) 
\
+               or ( "target" not in widget or widget["target"] != "latest" ) ]
+
 def plot_active_editor_totals(basedir):
     """Write out files for 'Active Editors Total' graph
 
@@ -397,6 +408,7 @@
     """ + ("wiki, ".join(sorted(get_projects()))) + """wiki
 
 """
+    drop_callout_widget(g)
     g.write(basedir)
 
 if __name__ == '__main__':

-- 
To view, visit https://gerrit.wikimedia.org/r/86185
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic322e660efa80753ed8f02b42327d0e8ced76849
Gerrit-PatchSet: 1
Gerrit-Project: analytics/geowiki
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to