1 2014-05-28T02:20:41  *** sl33k_ has quit IRC
   2 2014-05-28T05:15:27  *** penguinRaider has quit IRC
   3 2014-05-28T05:31:24  *** penguinRaider has joined #moin-dev
   4 2014-05-28T06:41:40  *** randomax has joined #moin-dev
   5 2014-05-28T08:38:29  *** greg_f has joined #moin-dev
   6 2014-05-28T11:11:03  *** sl33k_ has joined #moin-dev
   7 2014-05-28T12:42:21  *** dave_largo has joined #moin-dev
   8 2014-05-28T12:57:14  *** sl33k_ has quit IRC
   9 2014-05-28T13:06:24  *** randomax has quit IRC
  10 2014-05-28T13:27:20  *** sl33k_ has joined #moin-dev
  11 2014-05-28T14:27:25  *** skathpalia has joined #moin-dev
  12 2014-05-28T14:41:18  *** sl33k_ has quit IRC
  13 2014-05-28T14:45:13  *** RogerHaase has joined #moin-dev
  14 2014-05-28T15:02:50  *** randomax has joined #moin-dev
  15 2014-05-28T16:10:50  <ThomasWaldmann> skathpalia: did you meanwhile find out what to do with the getter fn?
  16 2014-05-28T16:12:58  <skathpalia> Yeah I tried but I am not able to get how is it to be implemented
  17 2014-05-28T16:13:36  <ThomasWaldmann> you just give the getter function as a parameter instead of the key
  18 2014-05-28T16:14:41  <skathpalia> You mean passing the function from ticket.py in the ticketreference?
  19 2014-05-28T16:14:47  <ThomasWaldmann> label_getter=itemid_short_summary
  20 2014-05-28T16:15:05  <ThomasWaldmann> instead of label_meta_key=ITEMID
  21 2014-05-28T16:17:16  <skathpalia> Ok I think I got some of it
  22 2014-05-28T16:17:26  <skathpalia> I am trying to code it :)
  23 2014-05-28T16:20:42  <skathpalia> I think that I have to pass the function names as string
  24 2014-05-28T16:20:54  <skathpalia> as they are not defined in ticket.py
  25 2014-05-28T16:20:59  <ThomasWaldmann> no, as a function object
  26 2014-05-28T16:21:30  <ThomasWaldmann> and you just define it where you need it
  27 2014-05-28T16:23:14  <skathpalia> It is needed in forms.py but I have to use the pass that from ticket.py
  28 2014-05-28T16:26:21  <ThomasWaldmann> so?
  29 2014-05-28T16:27:05  <skathpalia> I mean how I would be able to pass the function?
  30 2014-05-28T16:27:12  <skathpalia> as it is defined somewhere else
  31 2014-05-28T16:27:59  <ThomasWaldmann> def f(x):
  32 2014-05-28T16:28:08  <ThomasWaldmann>     return ...
  33 2014-05-28T16:28:40  <ThomasWaldmann> Foo.with_properties(label_getter=f)
  34 2014-05-28T16:29:38  <ThomasWaldmann> now find out what x should be in your case
  35 2014-05-28T16:30:24  <skathpalia> But in our case f is defined in some other file (forms.py)
  36 2014-05-28T16:30:59  <skathpalia> and it should be there as x= rev needs to be passed to f which is generated in forms.py only
  37 2014-05-28T16:32:12  <ThomasWaldmann> the definition of a function and the usage of it doesn't need to be in same module
  38 2014-05-28T16:32:33  <ThomasWaldmann> you just give it to where you need it as a parameter
  39 2014-05-28T16:33:07  <ThomasWaldmann> if the parameter is label_getter=f then you can later do:
  40 2014-05-28T16:33:14  <ThomasWaldmann> label = label_getter()
  41 2014-05-28T16:36:35  <skathpalia> yeah I did this only I added label_getter = itemid_short_summary which is a method defined in forms.py and used label_getter(rev) in forms.py
  42 2014-05-28T16:36:53  <skathpalia> But it shows error
  43 2014-05-28T16:36:59  <ThomasWaldmann> (with import, you do such stuff all the time btw. - the name you are importing is also just a reference to a function (or class or ...) object defined in another module
  44 2014-05-28T16:38:17  <ThomasWaldmann> guess i can't follow / do not see what the problem is. show code, on codereview, please.
  45 2014-05-28T16:38:48  <skathpalia> I was thinking of some other way I mean without  the importing one
  46 2014-05-28T16:41:23  <skathpalia> Okay making a codereview for that error
  47 2014-05-28T16:42:59  * ThomasWaldmann gtg in 10mins, hurry :)
  48 2014-05-28T16:45:00  <skathpalia> cr https://codereview.appspot.com/99560043
  49 2014-05-28T16:53:26  <ThomasWaldmann> see there
  50 2014-05-28T16:53:29  * ThomasWaldmann away
  51 2014-05-28T16:59:53  <RogerHaase> skathpalia: did you catch that you can see tw's comments by viewing ps1 x ps2 or base x ps1, but not base x ps2?
  52 2014-05-28T17:00:36  <RogerHaase> randomax: what are you working on today?
  53 2014-05-28T17:08:13  <skathpalia> RogerHaase, I got his comments and accordingly updated the cr
  54 2014-05-28T17:08:47  <skathpalia> I saw base x ps1 :)
  55 2014-05-28T17:10:36  <dimazest> skathpalia: have a look to https://docs.python.org/2/library/functions.html#sorted
  56 2014-05-28T17:11:02  <dimazest> especially to the cmp argument
  57 2014-05-28T17:11:17  <dimazest> the sorted() function doesn't know how to compare things
  58 2014-05-28T17:11:27  <dimazest> but the code that call this function might now
  59 2014-05-28T17:11:36  <dimazest> your task is quite similar
  60 2014-05-28T17:15:31  <dimazest> skathpalia, you've already solved it
  61 2014-05-28T17:16:14  <skathpalia> Yeah :)
  62 2014-05-28T17:24:47  <skathpalia> dimazest, I have updated the cr used .format instead of concatenation
  63 2014-05-28T17:29:21  <dimazest> see my comments :)
  64 2014-05-28T17:30:28  *** sl33k_ has joined #moin-dev
  65 2014-05-28T17:39:40  <skathpalia> dimazest, updated the cr made the code more readable
  66 2014-05-28T17:41:45  <dimazest> just a minor thing
  67 2014-05-28T17:43:03  <randomax> RogerHaase, i was looking at whoosh queries.. i wasnt able to pinpoint the error in the quicklinks last night so thought to start off with week 2 work and revisit quicklinks later instead of blocking..
  68 2014-05-28T17:45:44  <skathpalia> dimazest, updated the cr done those minor changes
  69 2014-05-28T17:54:38  *** greg_f has quit IRC
  70 2014-05-28T17:58:47  *** skathpalia has quit IRC
  71 2014-05-28T18:08:49  <RogerHaase> randomax: I was looking at whoosh as well.  Seems search is broken -- if I search for table, I only get one hit in html item, but I expected several more.
  72 2014-05-28T18:55:37  *** dave_largo has quit IRC
  73 2014-05-28T20:28:35  *** sl33k_ has quit IRC
  74 2014-05-28T20:57:50  *** penguinRaider has quit IRC
  75 2014-05-28T20:58:08  *** ahaerpfer has left #moin-dev
  76 2014-05-28T20:59:13  *** penguinRaider has joined #moin-dev
  77 2014-05-28T21:25:18  <RogerHaase> ThomasWaldmann: fix traceback on "moin index-build -s -i"  https://codereview.appspot.com/98660043/
  78 2014-05-28T21:51:13  *** RogerHaase has left #moin-dev
  79 2014-05-28T22:19:27  *** penguinRaider has quit IRC
  80 2014-05-28T22:19:31  *** randomax has quit IRC
  81 2014-05-28T23:33:42  *** sl33k_ has joined #moin-dev
  82 2014-05-28T23:41:43  *** magu_cic has joined #moin-dev
  83 2014-05-28T23:44:52  *** magu_cic_ has quit IRC
  84 

MoinMoin: MoinMoinChat/Logs/moin-dev/2014-05-28 (last edited 2014-05-28 02:30:02 by IrcLogImporter)