community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864327 - /comdev/reporter.apache.org/trunk/site/wizard/kibble.py
Date Sat, 03 Aug 2019 08:57:29 GMT
Author: humbedooh
Date: Sat Aug  3 08:57:28 2019
New Revision: 1864327

URL: http://svn.apache.org/viewvc?rev=1864327&view=rev
Log:
We have to kludge this to get accurate readings for "custom quarters"

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/kibble.py

Modified: comdev/reporter.apache.org/trunk/site/wizard/kibble.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/kibble.py?rev=1864327&r1=1864326&r2=1864327&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/kibble.py (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/kibble.py Sat Aug  3 08:57:28 2019
@@ -83,7 +83,7 @@ def main():
         
         
         # Committers
-        authors = requests.post('https://demo.kibble.apache.org/api/code/committers',
+        authors_b = requests.post('https://demo.kibble.apache.org/api/code/committers',
                   headers = {
                     'Content-Type': 'application/json',
                     'Kibble-Token': TOKEN,
@@ -91,12 +91,28 @@ def main():
                   json = {
                     "page":"issues",
                     "quick":True,
-                    "interval": "week",
+                    "from": int(BEFORE - (90*86400)),
+                    "to": BEFORE,
+                    "interval": "99999d",
+                    "subfilter":"/" + project,
+                    }
+                 ).json()
+        authors_a = requests.post('https://demo.kibble.apache.org/api/code/committers',
+                  headers = {
+                    'Content-Type': 'application/json',
+                    'Kibble-Token': TOKEN,
+                  },
+                  json = {
+                    "page":"issues",
+                    "quick":True,
+                    "from": BEFORE,
+                    "to": int(time.time()),
+                    "interval": "99999d",
                     "subfilter":"/" + project,
                     }
                  ).json();
-        after = [x for x in authors['timeseries'] if x['date'] > BEFORE]
-        before = [x for x in authors['timeseries'] if x['date'] <= BEFORE]
+        after = authors_a['timeseries']
+        before = authors_b['timeseries']
         cmtp_before = 0
         for month in before:
             cmtp_before += month.get('authors', 0)



Mime
View raw message