Milimetric has uploaded a new change for review.

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


Change subject: TODOs cleanup
......................................................................

TODOs cleanup

Change-Id: I0884dcdda65b17e7eea9ee46569bcb9dab1d7e08
---
M setup.cfg
M tests/__init__.py
M wikimetrics/configurables.py
M wikimetrics/controllers/authentication.py
M wikimetrics/controllers/cohorts.py
M wikimetrics/metrics/namespace_edits.py
M wikimetrics/models/cohort.py
M wikimetrics/static/js/jobCreate.js
M wikimetrics/templates/request.html
9 files changed, 7 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/14/70914/1

diff --git a/setup.cfg b/setup.cfg
index eb22b05..e52c1f2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,6 @@
 [flake8]
 # W293: whitespace on blank lines is ok
 # F401: sometimes you want to import stuff but not use it (eg. celery)
-# F403: TODO: look into this 
(https://flake8.readthedocs.org/en/2.0/warnings.html)
-ignore = W293,F401,F403
+ignore = W293,F401
 # line lengths should be limited but not to 80
 max-line-length = 100
diff --git a/tests/__init__.py b/tests/__init__.py
index c33a942..498b468 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -21,7 +21,6 @@
 
 
 #def setUp():
-    ## TODO configure celery verbosity
     #celery_out = open(devnull, "w")
     #celery_cmd = ['wikimetrics', 'celery']
     #global celery_proc
diff --git a/wikimetrics/configurables.py b/wikimetrics/configurables.py
index 3972f8b..7ee89dc 100644
--- a/wikimetrics/configurables.py
+++ b/wikimetrics/configurables.py
@@ -73,7 +73,6 @@
 
 
 def config_celery(args):
-    # TODO: move this into wikimetrics without breaking celery
     from celery import Celery
     
     # create and configure celery app
diff --git a/wikimetrics/controllers/authentication.py 
b/wikimetrics/controllers/authentication.py
index 28abf88..356e829 100644
--- a/wikimetrics/controllers/authentication.py
+++ b/wikimetrics/controllers/authentication.py
@@ -57,8 +57,7 @@
         return
     
     print request.endpoint
-    # TODO: look into more systematic way of finding whether
-    # request is to status resource
+    # TODO: put static resources in a new Blueprint
     if (request.endpoint and
         not 'static' in request.endpoint and
         not getattr(app.view_functions[request.endpoint], 'is_public', False)
@@ -123,7 +122,6 @@
     """
     access_token = resp['access_token'] or request.args.get('code')
     if access_token:
-        # TODO: is it better to store this in the database?
         session['access_token'] = access_token, ''
         r = requests.get(app.config['GOOGLE_USERINFO_URI'], headers={
             'Authorization': 'OAuth ' + access_token
diff --git a/wikimetrics/controllers/cohorts.py 
b/wikimetrics/controllers/cohorts.py
index 1f98ca8..32a0d73 100644
--- a/wikimetrics/controllers/cohorts.py
+++ b/wikimetrics/controllers/cohorts.py
@@ -18,7 +18,6 @@
 
 @app.route('/cohorts/list/')
 def cohorts_list():
-    # TODO: add filtering by permission (this also needs db support)
     db_session = db.get_session()
     cohorts = db_session.query(Cohort.id,Cohort.name,Cohort.description)\
                .join(CohortUser)\
diff --git a/wikimetrics/metrics/namespace_edits.py 
b/wikimetrics/metrics/namespace_edits.py
index 7a15627..3e93af0 100644
--- a/wikimetrics/metrics/namespace_edits.py
+++ b/wikimetrics/metrics/namespace_edits.py
@@ -64,6 +64,4 @@
             .group_by(Revision.rev_user)
             .all()
         )
-        # TODO: make sure we return zero when user has no revisions
-        # we could solve this with temporary tables in the future
         return {user_id: revisions_by_user.get(user_id, 0) for user_id in 
user_ids}
diff --git a/wikimetrics/models/cohort.py b/wikimetrics/models/cohort.py
index 2f431a4..f2a8048 100644
--- a/wikimetrics/models/cohort.py
+++ b/wikimetrics/models/cohort.py
@@ -2,7 +2,6 @@
 from operator import itemgetter
 from sqlalchemy import Column, Integer, Boolean, DateTime, String
 from wikimetrics.configurables import db
-# TODO: there has to be a more elegant way of importing this
 from .wikiuser import WikiUser
 from .cohort_wikiuser import CohortWikiUser
 
diff --git a/wikimetrics/static/js/jobCreate.js 
b/wikimetrics/static/js/jobCreate.js
index 63e3c4b..f8f2868 100644
--- a/wikimetrics/static/js/jobCreate.js
+++ b/wikimetrics/static/js/jobCreate.js
@@ -1,5 +1,6 @@
 $(document).ready(function(){
-    // set up async handlers for any async forms TODO: replace with a decent 
plugin
+    // set up async handlers for any async forms
+    // TODO: replace with a decent plugin
     $(document).on('submit', 'form.async', function(e){
         e.preventDefault();
         form = $(this);
diff --git a/wikimetrics/templates/request.html 
b/wikimetrics/templates/request.html
index 3739fa8..c17175c 100644
--- a/wikimetrics/templates/request.html
+++ b/wikimetrics/templates/request.html
@@ -1,10 +1,12 @@
 {% extends "layout.html" %}
 {% block body %}
-<h2>Create a Job</h2>
+<h2>Create Analysis Report</h2>
 <div class="well pick-cohorts">
     <div class="navbar-inner">
         <h3 class="pull-left">Pick Cohorts</h3>
         <form class="navbar-search pull-right">
+            <a href="upload">create cohort</a>
+            &nbsp;&nbsp;
             <input type="text" class="search-query" placeholder="find"/>
         </form>
     </div>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0884dcdda65b17e7eea9ee46569bcb9dab1d7e08
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric <[email protected]>

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

Reply via email to