Wednesday, 2009-05-27

*** tpb has joined #melange00:00
*** solydzajs has joined #melange00:03
*** ChanServ sets mode: +o solydzajs00:03
*** tansell_laptop has joined #melange00:06
*** solydzajs has quit IRC00:23
*** tansell-laptop has quit IRC00:23
*** jamtoday has joined #melange00:27
*** jamtoday has quit IRC00:55
*** ankitg has quit IRC02:01
*** ankitg has joined #melange02:42
*** ankitg has quit IRC03:30
*** Merio has joined #melange05:31
*** MatthewWilkes has joined #melange06:01
*** mithro_ has quit IRC06:19
*** tansell_laptop has quit IRC06:23
*** tansell_laptop has joined #melange07:10
*** ankitg has joined #melange07:43
*** ankitg is now known as ankitg|afk07:44
*** madrazr has joined #melange07:59
*** florinciu has joined #melange08:29
*** dhans has joined #melange09:14
*** mithro_ has joined #melange09:24
*** ChanServ sets mode: +v mithro_09:24
Meriodhans: ping! :)10:03
dhansMerio: pong:)10:07
Meriodhans: available in, say, 10 minutes? So we can chat about all stats stuff. Meeting plan: (1) What are you (and I am) doing and gonna do in the next few days (as planned with mentors), (2) What can we do to join our code (use your testing instance and commit on it), (3) Getting me start to join your code, (4) Memcache stuff, (5) JS layer integration10:11
Meriodhans: integrate the "meeting plan" if you want to, I'll be right back :)10:12
dhansMerio: yes, I am available:)10:13
Meriodhans: I'm back ^_^10:21
dhansMerio: ok:)10:22
MerioGreat, so10:22
Merio(1a) What are you doing and gonna do in the next few days (as planned with mentor) :)10:22
dhansHmm actually I haven't had a word from sverre for the last few days...:)10:23
MerioYes, I see, they're all busy with the all-hands ^_^10:24
dhansWhat I want to do now is to fix this memcache issue10:24
Meriook so let's postpone to number (4) the discussion :)10:24
Merio(1b) What I'm going and gonna do in the next few days10:24
MerioAt the moment, as you've seen in the mails, I'm focusing on JS stuff mainly10:25
MerioI've done the visualization stuff, for the moment I see that we should handle some quirks of the API. I've seen the rows are called with setCell() (for tables) or setValue (for pie charts)10:25
MerioWhile I played only in the Ajax playground so it might be a quirk of that instance10:26
MerioSo there's some need to explore further. We're going to do some JS layer to handle different calling for different charts10:26
MerioIn that way the same JSON can be used for more than one type of chart10:27
MerioSay we can have a radio button, or some tabs, or a pull down menu to choose between charts10:27
MerioAnd then the JS layer will take care to do the right API calling10:27
MerioAlso I'm exploring (for the JS layer) the right way to do what James Crook called "$(PieChart)"10:28
MerioSo we might come with a sort of "just in time substitution" of some string in a document10:28
dhansI'll have to read the mails again :)10:28
MerioNo probs ^_^10:28
MerioFor that thing to happen, we should have a JSON output from Python side with all the "names" of the charts10:29
dhanshmm I am not sure if I understood...10:30
MerioThat JSON should be "user-rights-aware", so it should show only the charts the user can see10:30
MerioI mean, for the frontend side, we should choose which data to display10:30
MerioSay a pull down menu with "students by country", "students by degree" and such things10:31
MerioFor that thing to happen, JS should ask Python side "which stats can the current user see"?10:31
MerioSo we need a function in the Python code that checks the current user rights and come back with a JSON with a list of the data the user can see10:32
dhansyeah, I get it now10:32
MerioSo might add some "user right" stuff in the Stat data model10:32
dhanssounds reasonable10:32
Meriothe ['checkif....'] stuff10:32
MerioMy understanding of the Python side is still limited, but it should involve that stuff10:33
dhansyeah, it may be done :) I'll think about it10:33
MerioOkay :) To be back in topic, I'm starting to explore jQueryUI powers for the frontend, but I might be doing that after I've done some Python stuff10:34
dhansand since we are talking about json, we should think about a strict json format in final_json_string field?10:34
MerioWell, the one I've put in the wiki should do the trick, as I've tested succesfully with that iteration (that's also in the wiki) and successfully came with a graph10:35
MerioSo if we need to change it we'll see throughout GSoC10:35
dhanshmm so you want exactly the same format as you described in wiki example?10:36
MerioIs it a problem?10:36
MerioGreat ^_^10:37
MerioNow I can't recall all your code10:37
dhansI was just afraid that this format won't work for some other apis, but since you say it's ok...10:37
MerioBut we might need to have the JSON string creation in some different part than the single stat creation10:37
MerioSo in case we need to do something different for some reason in the future, we can change only that part10:38
Merio(I didn't yet read your last code, to be fair, but I'm gonna do it when we go for point (3) :))10:38
MerioOk so postponing that to point (3) :)10:39
MerioIf you're ok we can go for (2) What can we do to join our code (use your testing instance and commit on it)10:39
dhansyes, I am now checking how to give you access to this instance10:40
dhansand I think I found it:)10:40
dhansit says you should get an email...10:41
MerioGreat ^__^ So, well, probably I need to read about Mercurial so I can commit without messing up stuff, I'm a newbie on it, always used SVN :)10:42
MerioGoing to see10:42
MerioYep, arrived ^__^10:42
MerioJoined :)10:43
*** dr__house has joined #melange10:43
MerioThat will mean avoid to apply your patches everytime and applying my patches everytime ^__^10:44
MerioOtherwise it's gonna be a mess :D10:44
dhansI am not sure...10:44
MerioWhat do you mean?10:45
dhansI don't think (or maybe I don't know something), but this instance does not have repository or something, so when you add something to your code, upload it on server, and then if I do the same with my code (without applying your patch), won't your chances dissapear?10:46
MerioHmm I thought every GAE instance has a repository in. Am I wrong?10:47
MerioI mean, every application in GAE10:47
dhansI don't see anything like this there...10:48
dhansthe only thing I can do, is to upload app on GAE instance from my local repository10:48
MerioIf I commit something and push it in the repository and you pull and update as well, you should see my code as well10:48
dhansyeah, if we have this repository:)10:49
MerioLet me see10:49
Meriohow do you put in code?10:52
dhansin my local repository i type ./thirdparty/google_appengine/ update build/10:53
MerioSo there's something I miss in my GAE knowledge. If we don't have a repository, how should we have one?10:55
dhansit's described in getting started section on wiki:P10:55
dhansjust hg clone10:55
dhanshg clone melange and you have one;)10:55
tpbTitle: Revision 29fea493cd: / (at
MerioNo I mean10:56
MerioIf your instance is a different instance than melange.. and it is10:56
MerioYou should be able to do an hg clone against it as well10:56
MerioOr not?10:56
dhansI don't think so...10:56
MerioSorry definitely I'm missing something10:57
dhansthe only thing you need to change is to change application-name in app.yaml to dhansmelange10:57
dhansand then when you upload application on server, it knows which application is updated10:58
MerioBut we still have to apply patches manually everytime10:58
dhansyeah;( and it's bad10:58
MerioCan't we use a repository like bitbucket?10:58
dhansor maybe we should ask melange dev to create a new branch for us?10:58
dhansmaybe we can, but I haven't used it10:59
MerioThat should be definitely something good. I don't have deep Mercurial knowledge, but I've read about patch queues and branches, seems very good on that stuff10:59
dhansok, I'll email sverre and pawel with this issue11:00
MerioThat's ok11:00
dhansI hope they won't have any problems with it:)11:01
MerioI hope too, I can remember11:02
MerioWhen we discussed it, they said to make a repository in bitbucket11:02
MerioBut that's was because we had no commit access, and now we have it11:02
MerioSo thing might have changed11:02
dhansok, so if they have something against, we'll just use bitbucket...11:03
MerioOk, perfect ^_^11:03
MerioSo, let's go for point (3) Getting me start to join your code?11:04
MerioIs it ok for you?11:04
dhansyeah, sure:)11:05
MerioThat's the worst part. You know I'm Python newbie, so I might need some help effort from you. As planned I'll do the same for you with JS ^__^11:05
dhansI'll do my best to help:)11:05
* madrazr volunteers too to help with Python :)11:05
madrazrif required11:05
MerioGreat madrazr, you rock ^_^11:05
madrazrMerio: :)11:06
MerioOk so just let me open you patch11:06
MerioYou last patch I mean11:06
*** tansell_laptop has quit IRC11:10
MerioOk so11:11
Meriomodels/ is just the data model, similar to what I've put in the wiki, so it's clear to me11:12
dhansI've just changed a few details11:13
Merioyep :) In index.yaml you've put the stat entity for indexing purposes when querying11:13
dhansactually I didn't put anything there...:)11:14
MerioI see this => +- kind: Stat11:14
Merio+  properties:11:14
Merio+  - name: scope11:14
Merio+  - name: name11:14
dhansit must have put there itself:)11:14
MerioAh great ^_^11:14
MerioYes I can recall GAE automatically puts it after some comments11:15
MerioSomething odd happened for cache/ :)11:16
dhansyeah, I did some experiments with this file, but I thought I revert all changes11:17
MerioOk :)11:17
MerioThen... sitemap/ is for...?11:18
MerioI mean views/sitemap/build.py11:18
dhansok, django generally works like this: there is a file (or something like that) and there is a list of regular expressions that maps an url with a view11:19
dhansin our (which is in app directory) there is urlpatterns = build.getPatterns()11:20
Merioyep => urlpatterns = callback.getCore().getPatterns()11:20
MerioIs this?11:21
dhansif I understand correctly, yes11:22
dhansand in the end these pattern are generated in this module11:22
dhansfor example by adding +sitemap.addPages(statistic.view.getDjangoURLPatterns())11:23
dhansI add all patterns defined for statistic view11:23
MerioOk let's go through it so :)11:24
dhansand we have two types of patterns in Melange. default_django_patterns and extra_django_patterns11:24
Merioah ok, so continue ^_^11:25
dhansthe first ones are standard for urls like .../edit/..., .../show/... and are defined in views.helper.params.py11:26
dhansand extra patterns are defined in __init__ for each view:)11:26
*** mithro_ has quit IRC11:27
dhansbut generally, in we just make sure the patterns will be added to
dhansI am done...:) I hope I was at least a little bit clear:P11:28
MerioOk so in the constructor of each view we have the url pattern to access that view11:29
MerioI see in the view the patterns (collect_stats etc), how they're bind with the proper function?11:30
Meriowith the decorator at the end of the fiel?11:30
dhanswhen we have for example:11:31
dhans        (r'^%(url_name)s/(?P<access_type>collect_stats)/%(scope)s$',11:31
dhans         'soc.views.models.%(module_name)s.collect_stats',11:31
dhans         'Collect statistics'),11:31
dhansi love this formatting:p11:31
dhansit means that the url is mapped with function soc.views.models.statistic.collect_stats11:32
dhansand collect_stats is defined at the end of file by decorator11:32
MerioWhat about "public"?11:34
dhansthat's a good question:)11:35
dhanslet me see11:35
*** ankitg|afk is now known as ankitg|circ200911:36
dhansok, it's about those other patterns (django_patterns_defaults)11:37
dhanseach view that is a subclass of base.View defines some standard patterns11:37
*** arvind_khadri has joined #melange11:38
dhansthey are defined in app/soc/views/helper/params.py11:38
dhansif you find this line: if not params.get('no_show'):  you will see11:38
dhansthat pattern for show url is defined by public function11:39
dhansand this public function is defined in base view11:39
dhansit's a standard function for showing entity11:40
Meriook, I see :)11:40
dhansso I didn't want to waste time for creating a new function and used the standard one:)11:41
MerioOk, so I'll dig some time on Django with Python, seems my "problems" come from there. I've used Django but with DTL (with Dojo JS framework), which has not that things :)11:42
dhansdamn, I start to think that you know infinite number of JS technologies :)11:43
Meriowell, not quite :P ^__^ But I like JS too much :)11:44
MerioWell... so, about the view... at the beginning you tell which type of user has the rights to view something11:46
dhansbut it's not all django. there are many things that are Melange-specific and I took some time to explore them and I still can't say i know much:)11:46
MerioFrom access.py11:46
ajaksulogic :)11:46
MerioThan you say where it's the logic11:48
Meriobind the rights, the scope (program level) and the name of the view11:49
MerioIs it ok?11:49
Merio+    new_params['logic'] = soc.logic.models.statistic.logic11:50
dhansso, yes11:50
dhanswe have this param for this view, and if in other function we want our logic we can assign logic = params['logic']11:51
Merioyep got it11:51
Meriothen well, all patterns stuff we were discussing about11:52
MerioAnd then all up to the parent class11:52
dhansbut to have access to these params you have to mark your function with @decorators.merge_params11:52
Merio(after merging the dictionaries)11:52
MerioYes, I see afterwards11:53
MerioOk then collectstats function11:55
MerioWhat's the meaning of this?11:55
Merio+    program_entity = self._getProgramInScopeEntity(kwargs['scope_path'])11:55
MerioSorry, but I figured out the whole functioning, but I'm lacking the details :)11:56
MerioIt's to know the current program we want the statistics for?11:56
dhansbecause scope field for statistic model means related program11:57
dhansI think it's reasonable11:57
Meriook ^_^11:58
*** arvind_khadri has quit IRC11:58
dhansto be sure, I have to ask sverre about this part, because I just copied it11:58
Merioeheh ok ^__^ Then you come with the properties to send to statistic logic (students per age)11:59
dhanssome time ago there was a function that returned entity based on scope_path and now this function is gone11:59
dhansjust don't look at these properties:) I should have removed those lines12:00
Merioaahhah ok :D12:00
dhansit was there because later I called  # logic.updateOrCreateFromFields(properties) which just addes a new stat to model12:01
Meriowhat's this? => list_params = self.getParams().copy()12:01
dhansit is stupid, but it was the easiest way to add new stats to model;/12:01
dhansok, so later in this function we use standard melange method for displaying tables12:02
Meriohmm sorry can't follow :)12:02
dhansit is about list_params12:03
MerioOk, I think all that stuff is to give to Django the correct templates12:04
dhanshmm I think it's true12:05
MerioOk so updateOrClearStats is ok, it justs call the right logic function depending on what's on the GET12:06
MerioJust this => +    return http.HttpResponseRedirect(12:06
Merio+           '/%(url_name)s/collect_stats/%(scope_path)s' % fields)12:06
MerioIt redirects to an HTML page, can't understand the % fields part12:07
dhansso, we want to create a correct url for showing list of all stats12:08
dhansand this correct url is: statistic/collect_stat/google/gsoc/12:09
dhansstatistic is url_name12:09
dhansit's basically name of module12:09
Merioyes, it's only the % fields that I can't get12:10
dhansand google/gsoc is scope_path. why?12:10
dhansbecause our statistic's scope is gsoc (programs' link_id)12:10
Merioright :)12:11
dhansand google summer of code is owned by Google (so gsoc entity has its own scope which is google)12:11
dhansyou can think about scope_path as it was a string of link_ids12:12
dhansfor example, if one entity A has A.scope = B, and B.scope = C and C.scope = D then A.scope_path = D.link_id/C.link_id/B.link_id12:13
dhansyou can think about the Model as if it was a tree12:14
MerioYes, I've got it :) About % fields, as far as I can understand, is just that it substitutes the url_name, scope_path that are in the fields params12:15
dhansis something unclear with that?12:16
Meriono that's ok :)12:17
MerioIn views/model/ you just add rights and links to statistics12:18
Merioto be shown in the sidebar of the program12:19
dhansbut I am not sure if rights['collect_stats'] is necessary12:20
dhansI have to check what will happen when I remove it:)12:20
Merioand in you put the path12:20
MerioThe html are ok with me12:21
MerioThen the logic seems easy to understand12:22
dhansI described it on wiki if you want:)12:22
MerioNo problems, the main issue for me is to connect pieces together :)12:23
MerioWe can then watch the logic together to see what can we do for JSON stuff and to try to fix together the memcache issue, if it's ok with you12:24
MerioGoing with point (4)12:25
MerioI propose 10 minutes break, too :)12:25
dhansactually I have to leave in like ten minutes:(12:26
dhanson the other hand I am already late:)12:27
MerioSo just stop it for the moment, when can you rejoin IRC? Tomorrow?12:27
MerioSo we can have the second part of the meeting and going with memcache stuff12:27
dhanstomorrow or today in the evening12:28
dhansbut it's champions league final, so it may be a late evening:)12:28
Merioeheheh I see ^__^ No problems, just leave the rest for tomorrow, I'll try to see something myself in the meantime for the memcache12:29
MerioJust join IRC whenever you start working on Melange tomorrow12:29
MerioI'll be here as soon as I wake up :)12:29
dhansme too12:30
MerioOk, have a nice evening, and thank you for the hints12:30
dhansthank you:)12:30
MerioBye :)12:30
*** dhans has left #melange12:31
*** SRabbelier has joined #melange12:47
*** ChanServ sets mode: +o SRabbelier12:47
*** Merio has quit IRC13:02
*** Merio has joined #melange13:03
*** SRabbelier has quit IRC13:04
*** florinciu has quit IRC13:05
*** madrazr has quit IRC13:20
*** SRabbelier has joined #melange13:32
*** ChanServ sets mode: +o SRabbelier13:32
*** madrazr has joined #melange13:34
*** dr__house has quit IRC13:40
*** dhaun has joined #melange13:40
*** dr__house has joined #melange13:42
*** dr__house has quit IRC13:45
*** SRabbelier has quit IRC13:47
*** dr__house has joined #melange13:48
*** MatthewWilkes has quit IRC14:04
*** penyaskito has joined #melange14:07
*** solydzajs has joined #melange14:09
*** ChanServ sets mode: +o solydzajs14:09
*** SRabbelier has joined #melange14:09
*** ChanServ sets mode: +o SRabbelier14:09
*** penyaskito has quit IRC14:15
*** dr__house has quit IRC14:47
*** dr__house has joined #melange14:47
*** mwilkes|phone has joined #melange14:52
mwilkes|phoneSRabbelier: what's the g2 like, then?14:53
*** madrazr has quit IRC15:07
*** ajaksu has quit IRC15:10
*** ajaksu has joined #melange15:11
SRabbeliermwilkes|phone: HTC Magic15:15
SRabbeliermwilkes|phone: no keyboard15:15
*** solydzajs has quit IRC15:21
mwilkes|phoneSRabbelier: ah, the magic15:22
mwilkes|phonedon't feel too bad now15:23
mwilkes|phonegot cupcake anyway15:23
ianmarcinkowskiHow is the Magic?15:26
ianmarcinkowskimy carrier is launching it this June15:26
*** mwilkes|phone has quit IRC15:29
*** SRabbelier has quit IRC15:33
*** dr__house has quit IRC15:55
*** dr__house has joined #melange15:55
*** dr__house has quit IRC15:57
*** MatthewWilkes has joined #melange15:59
*** ajaksu has quit IRC16:21
*** madrazr has joined #melange16:37
*** madrazr1 has joined #melange16:48
*** madrazr has quit IRC16:48
*** madrazr1 is now known as madrazr16:48
*** SRabbelier has joined #melange17:02
*** ChanServ sets mode: +o SRabbelier17:02
*** MatthewWilkes has quit IRC17:11
*** MatthewWilkes has joined #melange17:13
*** dhaun has quit IRC17:30
*** penyaskito has joined #melange17:56
*** solydzajs has joined #melange18:11
*** ChanServ sets mode: +o solydzajs18:11
*** madrazr has quit IRC18:51
*** solydzajs_ has joined #melange19:17
*** solydzajs has quit IRC19:18
*** SRabbelier has quit IRC19:21
*** SRabbelier has joined #melange19:52
*** ChanServ sets mode: +o SRabbelier19:52
*** ankitg|circ2009 is now known as ankitg|ZZZzzz20:13
*** ankitg|ZZZzzz has quit IRC20:20
*** solydzajs_ has quit IRC20:20
*** Merio has quit IRC20:21
*** mithro_ has joined #melange20:22
*** ChanServ sets mode: +v mithro_20:22
*** solydzajs has joined #melange20:28
*** ChanServ sets mode: +o solydzajs20:28
*** MatthewWilkes has quit IRC21:21
*** ankitg has joined #melange21:30
*** solydzajs has quit IRC21:35
*** SRabbelier has quit IRC21:55
durin42Anyone here awake?22:35
durin42I think I might have gotten polling set up for Mercurial.22:35

Generated by 2.13.1 by Marius Gedminas - find it at!