Return-Path: X-Original-To: apmail-incubator-allura-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 923B2D641 for ; Thu, 7 Mar 2013 22:49:43 +0000 (UTC) Received: (qmail 79901 invoked by uid 500); 7 Mar 2013 22:49:43 -0000 Delivered-To: apmail-incubator-allura-dev-archive@incubator.apache.org Received: (qmail 79873 invoked by uid 500); 7 Mar 2013 22:49:43 -0000 Mailing-List: contact allura-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-dev@incubator.apache.org Received: (qmail 79865 invoked by uid 99); 7 Mar 2013 22:49:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 22:49:43 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stefano.invernizzi88@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 22:49:36 +0000 Received: by mail-wg0-f54.google.com with SMTP id fm10so1775374wgb.21 for ; Thu, 07 Mar 2013 14:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=+yC+CxOvVd4Iwpyp3CW0tL51UC2CN1YnDUpnnlSiZac=; b=LEUFyjc264dpHJksdMowX43G8FiMM1S2/7mMKS7jwzYFoK1UjYUz0Sur2z9mWP69fb LZ8mcz7jMx0623gQzjSjCwUawiwYnvWTt5dZY3s8x7K28jQZRkyASlEos620gObWgKoW Ubq88FEKjMUmAsAEDeQnh+yVYCVMlNoytNm6vRgkdiZXEjBqwTWGFT2qrhoFDwSfOAKh MO3cAisIOe3M7xgJMfljxcRMgPQ2+rRqi3SDOdMMsYHhzFLwaYP5H7zs62lNAYilNa02 CpDHkVpF45qw31xcNGZwWQCtk20SCwMz0P1jOAOFEWg/PccyPvEqSxCZsh78ccQBuppH rCLQ== MIME-Version: 1.0 X-Received: by 10.180.88.168 with SMTP id bh8mr37053285wib.15.1362696556639; Thu, 07 Mar 2013 14:49:16 -0800 (PST) Received: by 10.194.63.17 with HTTP; Thu, 7 Mar 2013 14:49:16 -0800 (PST) In-Reply-To: <4F2F3DB505A148D78C76A394FEB587FC@gmail.com> References: <1355121885.14536.42.camel@lenovix> <0AF7AD06F6714802A574B191FEAB144A@gmail.com> <895A097083B64C84AE2817FD16BC6D8A@gmail.com> <82C47F9CEEAE4B1B9118C6BDDB19CA06@gmail.com> <51226603.6020606@brondsema.net> <5FFE936B8E514599BBD273F58CAD0F8D@gmail.com> <4F2F3DB505A148D78C76A394FEB587FC@gmail.com> Date: Thu, 7 Mar 2013 23:49:16 +0100 Message-ID: Subject: Re: User stats and organizations From: Stefano Invernizzi To: allura-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d0418265a31fb8504d75d84cd X-Virus-Checked: Checked by ClamAV on apache.org --f46d0418265a31fb8504d75d84cd Content-Type: text/plain; charset=ISO-8859-1 I was not able to recreate your problem, but I realized there was an error in the code I committed yesterday, and this error is probably the reason why you got the reported exception. I changed it and I hope this fixed the problem. If the issue is still there, let me know about it. Stefano 2013/3/7 Tim Van Steenburgh > Pulled the latest changes, dropped the userstats collection, pushed a > commit to my test repo, refreshed the commiter's stats page, and got this: > > File > '/home/tvansteenburgh/tvansteenburgh-9044/forge/ForgeUserStats/forgeuserstats/controllers/userstats.py', > line 124 in index > ret_dict['discussionpercentage'] = stats.discussionRanking() > File > '/home/tvansteenburgh/tvansteenburgh-9044/forge/Allura/allura/model/contrib_stats.py', > line 143 in discussionRanking > disccontr = self.getDiscussionContribution() > File > '/home/tvansteenburgh/tvansteenburgh-9044/forge/Allura/allura/model/contrib_stats.py', > line 87 in getDiscussionContribution > tot = artifact.created+artifact.modified > TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' > > > Tim > > > On Wednesday, March 6, 2013 at 4:40 PM, Stefano Invernizzi wrote: > > > Yes, there was an error in the initialization of the stats object. I hope > > it's ok now. > > Thank you for reporting it! > > Stefano > > > > > > 2013/3/5 Tim Van Steenburgh tvansteenburgh@gmail.com)> > > > > > Stefano & Simone, > > > > > > Hey guys. Have been doing some more review on Userstats today. I > > > force-pushed a couple small changes to origin/si/5453, so make sure you > > > pull those. > > > > > > I ran into an error in the stats code after pushing a commit. It was a > > > Ming schema validation error: > > > > > > 208 [Tue Mar 05 22:29:05 2013] [error] [client 127.0.0.1] File > > > > '/var/local/env-allura/lib/python2.7/site-packages/Ming-0.3.2dev_20121101-py2.7.egg/ming/schema.py', > > > line 327 in _validate > > > 209 [Tue Mar 05 22:29:05 2013] [error] [client 127.0.0.1] raise > > > Invalid(msg, d, None, error_dict=error_dict) > > > 210 [Tue Mar 05 22:29:05 2013] [error] [client 127.0.0.1] Invalid: > > > general:[0]:messages:Not a list or tuple > > > 211 [Tue Mar 05 22:29:05 2013] [error] [client 127.0.0.1] > tickets:notdict: > > > [] > > > > > > > > > Here's the mongo doc: > > > > > > { > > > "_id" : ObjectId("5136502261b3b44a93a7b36f"), > > > "lastmonth" : { > > > "assignedtickets" : [ ], > > > "commits" : [ > > > { > > > "programming_languages" : [ ], > > > "lines" : 1, > > > "categories" : [ ], > > > "datetime" : > > > ISODate("2013-03-05T22:28:22.341Z") > > > } > > > ], > > > "solvedtickets" : [ ], > > > "messages" : [ ], > > > "revokedtickets" : [ ] > > > }, > > > "user_id" : ObjectId("510ad21c61b3b426260e7586"), > > > "lastmonthlogins" : [ ], > > > "tot_logins_count" : 0, > > > "registration_date" : ISODate("2013-03-05T20:05:54.676Z"), > > > "general" : [ > > > { > > > "tickets" : [ ], > > > "commits" : [ > > > { > > > "lines" : 1, > > > "number" : 1, > > > "language" : null > > > } > > > ], > > > "category" : null, > > > "messages" : { > > > "assigned" : 0, > > > "solved" : 0, > > > "totsolvingtime" : 0, > > > "revoked" : 0 > > > } > > > } > > > ], > > > "visible" : false, > > > "last_login" : null > > > } > > > > > > > > > As you can see, `general.tickets` is a list, not a dict, but it's > defined > > > as a dict in the schema. Maybe you guys could track that down? > > > > > > Tim > > > > > > > > > On Sunday, March 3, 2013 at 4:35 AM, Stefano Invernizzi wrote: > > > > > > > Thanks Dave for your suggestion! I modified the bootstrap.py file, so > > > that > > > > when the Users neighborhood is created, our tool for userstats is > set as > > > > > > an > > > > anchored tool, and it perfectly works. However, that way, if you do > not > > > > > > run > > > > the bootstrap.py, you have to manually add the tool to the anchored > ones. > > > > And this is what happens in most cases for users who don't want to > > > > re-initialize the forge. > > > > > > > > I was also thinking about the setting in the .ini file to enable > > > userstats. > > > > I think it doesn't make sense to disable them now that stats are > > > > implemented as a tool. By setting userstats.enable = false, the tool > is > > > > still installed for users who were using it, therefore I think it's > > > > > > > > > > better > > > > to remove this option, since it would be confusing. That way, a user > who > > > > wants to install the forge without using userstats can simply avoid > > > > installing the ForgeUserStats tool. I committed this change too, but > if > > > > > > > > > > you > > > > think it's better to think again about it, I'm open to different > > > > > > proposals. > > > > Thanks again, > > > > > > > > Stefano > > > > > > > > > > > > > > > > 2013/3/2 Simone Gatti simone.gatti88@gmail.com) (mailto: > > > simone.gatti88@gmail.com (mailto:simone.gatti88@gmail.com))> > > > > > > > > > Dear Dave, > > > > > I have changed the preference page in order to meet these requests. > > > > > I created two new pages to collect data about contacts and > > > > > > > > > > > > > > > > > > > availability. > > > > > In the preference page, over the links, it is now indicated that > these > > > > > personal data are not compulsory. > > > > > In this way, the preference page will no more become so long due to > > > > > > > > > > > > > > > data > > > > > about contacts and availability precedently inserted by the user, > and > > > > > > > > > > the > > > > > forms not necessary are not disclosed. > > > > > About general personal data, I decided to leave its original form > in > > > > > > > > > > > > > > > the > > > > > preference page, because it has fixed size and refer to general > > > > > information, but I put an explicit indication that they are > > > > > > > > > > > > > > > discretionary. > > > > > Please, let me know what do you think about these modifications. > > > > > Thanks, > > > > > Simone > > > > > > > > > > > > > > > 2013/2/18 Dave Brondsema dave@brondsema.net) (mailto: > > > dave@brondsema.net (mailto:dave@brondsema.net))> > > > > > > > > > > > Cory, I think Stefano is referring to user stats, which his > feature > > > > > branch > > > > > > starts collecting, not user profile data (gender, location, etc). > > > > > > > > > > > > But on the topic of user profiel data, we've had a least one > > > SourceForge > > > > > > user > > > > > > communicate to use that he/she thought the fields were required. > I > > > > > > > > > > > > > > > > > > > > > can > > > > > > see how > > > > > > this might be inferred since they're the first thing you see on > the > > > > > > /auth/prefs/ > > > > > > form. We might consider labelling those optional, or putting > them on > > > > > > > > > > > > > > > > > > > > > a > > > > > > separate > > > > > > page from "subscriptions" and other sections on that page. > > > > > > > > > > > > -Dave > > > > > > > > > > > > > > > > > > > > > > > > On 2/18/13 9:55 AM, Cory Johns wrote: > > > > > > > Stefano, > > > > > > > > > > > > > > Could a user simply not fill in the personal info fields they > don't > > > > > wish > > > > > > to > > > > > > > share? What is the value of entering that info but then not > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > displaying > > > > > > > > > > > > it; > > > > > > > to encourage users to enter it if only for our edification? > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > Cory > > > > > > > > > > > > > > > > > > > > > On Sat, Feb 16, 2013 at 9:53 AM, Stefano Invernizzi < > > > > > > > stefano.invernizzi88@gmail.com (mailto: > stefano.invernizzi88@gmail.com) (mailto: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > stefano.invernizzi88@gmail.com (mailto:stefano.invernizzi88@gmail.com))> > wrote: > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > I recently pushed some new commits allowing a single user to > > > hide his > > > > > or > > > > > > > > her personal statistics. I and Simone implemented it since > some > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > users > > > > > > > > > > > > > > > > > > > > > > > > > may > > > > > > > > prefer not to show this data. In that case, data is still > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > available > > > > > > > > > > > > > > > > > > > > > > > > > > > > for > > > > > > > > their personal use. However, if you think we should not allow > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > users to > > > > > > > > > > > > > > > > > > > > > > > > > do > > > > > > > > this, we can simply put it back as it was. > > > > > > > > As usual, we hope to get some feedbacks from you about this, > as > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > well > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > as > > > > > > > > about the rest of submitted code. > > > > > > > > It would be great for us if the code could be reviewed and, > if > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > you > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > think it > > > > > > > > would be useful, included on the forge before we complete the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > thesis > > > > > > > > > > > > > > > > > > > > > > > > > > > > we > > > > > > are > > > > > > > > working on. > > > > > > > > Thank you very much! > > > > > > > > Stefano > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Dave Brondsema : dave@brondsema.net (mailto:dave@brondsema.net) > > > > > > http://www.brondsema.net : personal > > > > > > http://www.splike.com : programming > > > > > > <>< > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --f46d0418265a31fb8504d75d84cd--