1 2011-06-17T00:00:25 <sinha> like if on a page i receive offset as 11
2 2011-06-17T00:01:01 <sinha> then there i have to traceback from offset 11 and see the last offset having given number of results
3 2011-06-17T00:01:17 <dreimark> i think i would first
4 2011-06-17T00:02:49 <dreimark> for item_group in item_groups.values():
5 2011-06-17T00:04:56 <dreimark> while iterating, i would collect, per day how much entries it has in an dictionary as key given the date
6 2011-06-17T00:07:22 <dreimark> by that you know afterwards how much dates you have and how much entries each day has
7 2011-06-17T00:14:04 <sinha> okay i can iterate on them backwards from the current offset date and can find the last offset
8 2011-06-17T00:14:30 <sinha> i will try this one out.
9 2011-06-17T00:15:19 <dreimark> ok
10 2011-06-17T00:15:31 <dreimark> ThomasWaldmann: see ML good news for us
11 2011-06-17T00:15:41 <dreimark> no not ML just mail
12 2011-06-17T00:18:46 <ThomasWaldmann> nice
13 2011-06-17T00:28:08 <ThomasWaldmann> https://bitbucket.org/mchaput/whoosh/changeset/fb3ac9f4b717 that was quick :)
14 2011-06-17T00:28:12 <ThomasWaldmann> Marchael: ^^
15 2011-06-17T00:40:13 *** ronny
16 2011-06-17T00:47:28 <dreimark> gn
17 2011-06-17T01:07:17 *** ronny
18 2011-06-17T01:17:30 *** MattMaker
19 2011-06-17T01:19:01 *** eSyr
20 2011-06-17T01:27:54 *** eSyr
21 2011-06-17T01:34:41 *** ronny
22 2011-06-17T01:47:02 *** sinha
23 2011-06-17T01:49:56 *** ronny
24 2011-06-17T02:23:23 *** eSyr
25 2011-06-17T02:27:02 *** brunomartin
26 2011-06-17T02:30:57 *** eSyr
27 2011-06-17T02:53:59 *** m4k3r
28 2011-06-17T04:36:27 *** Marchael
29 2011-06-17T04:43:24 *** Marchael
30 2011-06-17T04:44:22 <Marchael> moin
31 2011-06-17T05:35:14 <Marchael> if I want to use -c as option flask-script doing strange things
32 2011-06-17T07:13:23 <dreimark> Marchael:that means ?
33 2011-06-17T07:13:32 <Marchael> seems strange, but I don't see content field in extacted fields from backend
34 2011-06-17T07:13:42 <Marchael> dreimark: --clean
35 2011-06-17T07:14:11 <Marchael> I think what better change it to "purge"
36 2011-06-17T07:15:42 <dreimark> you mean your script not flask-script in general
37 2011-06-17T07:16:34 <dreimark> the meaning from purge is to delete everything
38 2011-06-17T07:16:46 <dreimark> and then it starts from null?
39 2011-06-17T07:17:20 <dreimark> why should it be different as from the first run?
40 2011-06-17T07:20:18 <Marchael> The problem was flask-script for some reason can't process "-c" option, but I got 2 options: "--clean" and "-c". For "-clean" it's working normal
41 2011-06-17T07:20:35 <Marchael> s/process/process correctly/
42 2011-06-17T07:22:11 <Marchael> > /usr/bin/moin: error: argument -c/--config: expected one argument
43 2011-06-17T07:22:13 <Marchael> hehe
44 2011-06-17T07:22:44 <Marchael> seems it busy, and I should use another option for that
45 2011-06-17T07:22:56 <dreimark> yeah, that is occupied and
46 2011-06-17T07:23:04 <dreimark> yes
47 2011-06-17T07:23:07 <Marchael> the cli was moin rebuild_indexes -c
48 2011-06-17T07:23:45 <dreimark> for now don't implement the shourtcut. so it is always --clean?
49 2011-06-17T07:24:10 <Marchael> ok
50 2011-06-17T07:24:33 <Marchael> but also I see what index won't grow up
51 2011-06-17T07:25:15 <Marchael> after each index build(without cleaning) they should enlarge in size, but they don't
52 2011-06-17T07:25:39 <Marchael> du -sh wiki/index/
53 2011-06-17T07:25:39 <Marchael> 72K wiki/index/
54 2011-06-17T07:25:54 <dreimark> s/what/that/
55 2011-06-17T07:26:44 <dreimark> hmm, you should have a unittest for that. which tests if you get something new in it
56 2011-06-17T07:27:16 <dreimark> or why should it enlarge?
57 2011-06-17T07:27:32 <dreimark> if it is like a set internal it won't
58 2011-06-17T07:27:37 <dreimark> for same data
59 2011-06-17T07:31:42 <Marchael> hm, but why is it not enlarge when I created new document in wiki?
60 2011-06-17T07:34:03 <Marchael> and also, why I don't see content field in extracted items from backend?
61 2011-06-17T07:36:04 <Marchael> I use iter_items_noindex()
62 2011-06-17T07:43:27 <dreimark> do you have a unittest i can try ?
63 2011-06-17T07:44:24 <dreimark> I think for tracking this down it is important to have one
64 2011-06-17T07:46:59 <dreimark> bbl
65 2011-06-17T08:02:02 <Marchael> I guess what it is something related with yerstaday whoosh issue with writelock
66 2011-06-17T08:02:35 <Marchael> and seems like issue in add_document()
67 2011-06-17T08:02:40 <Marchael> ThomasWaldmann: ^
68 2011-06-17T08:20:01 <dreimark> Marchael: have you pulled the fixed version?
69 2011-06-17T08:20:40 <dreimark> always if you say "what" I think you want to say "that"
70 2011-06-17T08:52:18 <Marchael> I can pull my current version
71 2011-06-17T08:52:27 <Marchael> *push
72 2011-06-17T08:53:37 <TheSheep> dreimark: in Russian it's the same word
73 2011-06-17T08:53:39 <Marchael> but it won't be working at least Matt won' realize bugfix
74 2011-06-17T08:53:50 <Marchael> :D
75 2011-06-17T08:58:29 <Marchael> btw, I simple index writer working normal
76 2011-06-17T08:59:24 <Marchael> dreimark: right, we need unittest for that script
77 2011-06-17T09:27:17 *** m4k3r
78 2011-06-17T09:56:23 <ThomasWaldmann> moin
79 2011-06-17T10:06:00 <Marchael> hi ThomasWaldmann
80 2011-06-17T10:30:01 *** greg_f
81 2011-06-17T10:40:11 <ThomasWaldmann> Marchael: btw, I will be mostly unavailable from 19. .. 27. June (similar for dreimark, btw).
82 2011-06-17T10:41:17 <Marchael> yes, you told about it
83 2011-06-17T10:41:44 <ThomasWaldmann> if you have questions for that time, ask them soon. if you have questions while that time, you have these options: ask someone else here on the channel (do not expect us reading backlog), ask on etherpad, ask via email.
84 2011-06-17T10:42:44 <ThomasWaldmann> and try to ask precise questions, giving enough information so that a direct answer is possible.
85 2011-06-17T10:43:11 <Marchael> seems like MultiSegmentWriter has issue with add_document()
86 2011-06-17T10:43:41 <Marchael> and may be it related with writelock
87 2011-06-17T10:43:54 <ThomasWaldmann> that, for example, is neither precise, nor a question :P
88 2011-06-17T10:47:19 <Marchael> ThomasWaldmann: Is there example for writing flask-script test?
89 2011-06-17T10:48:00 <ThomasWaldmann> did you read the flask-script docs?
90 2011-06-17T10:48:24 <Marchael> partly :)
91 2011-06-17T10:49:48 <ThomasWaldmann> in general, test YOUR code. if you can modularize your code in a way so that it is easily testable, the testing might have nothing to do with flask-script (as you are just testing your code, not whether flask-skript works correctly)
92 2011-06-17T10:50:14 <Marchael> btw, please review http://codereview.appspot.com/4539114
93 2011-06-17T11:09:38 <ThomasWaldmann> Marchael: review done
94 2011-06-17T11:09:43 <Marchael> thx
95 2011-06-17T11:55:14 <Marchael> ThomasWaldmann: please, review http://codereview.appspot.com/4539114
96 2011-06-17T11:56:31 *** pkumar
97 2011-06-17T12:24:27 *** ronny
98 2011-06-17T12:36:48 *** ronny
99 2011-06-17T12:47:04 <pkumar> ronny , ThomasWaldmann : The tests are running fine. only thing we need to do is at few tests initialize the app to refresh the backend. So calling init_test_app at setup_method of tests serves the purpose
100 2011-06-17T12:47:41 <pkumar> also, the time to run the tests is reduced and memory usage too
101 2011-06-17T12:48:02 <pkumar> in my system it goes from 350mb to 500mb
102 2011-06-17T12:49:07 <pkumar> though, I still need to verify some stuffs
103 2011-06-17T13:53:53 <pkumar> bbl
104 2011-06-17T13:53:57 *** pkumar
105 2011-06-17T14:57:32 * Marchael bbl
106 2011-06-17T15:22:46 *** brunomartin
107 2011-06-17T17:14:07 *** sinha
108 2011-06-17T17:40:53 *** sinha
109 2011-06-17T17:47:32 <Marchael> ThomasWaldmann: ping
110 2011-06-17T17:49:55 <ThomasWaldmann> pong
111 2011-06-17T17:51:47 <Marchael> I use choices because I not found how flask-script can accept option without parameter
112 2011-06-17T17:52:17 <ThomasWaldmann> for booleans?
113 2011-06-17T17:52:47 * ThomasWaldmann would expect that they are False if not given and True if given
114 2011-06-17T17:54:03 <Marchael> and choice only one(True) because if user use --clean for rebuilding, he perhaps wants erasing and then building
115 2011-06-17T17:54:31 <Marchael> and I don't understand why he may wants something else
116 2011-06-17T17:54:41 <Marchael> --clean = True
117 2011-06-17T17:55:07 <Marchael> clean isn't required
118 2011-06-17T17:55:08 <ThomasWaldmann> what happens if you do not give choice?
119 2011-06-17T17:55:25 <Marchael> so if user don't want it, he won't specify --clean
120 2011-06-17T17:56:05 <Marchael> flask-script will show help for that option
121 2011-06-17T17:58:01 <Marchael> > can't you just call your WhooshIndex method to do this?
122 2011-06-17T17:58:01 <Marchael> but if you remember, WhooshIndex.open_document first try to open it
123 2011-06-17T17:58:10 <ThomasWaldmann> it shows help if you do not give --clean?
124 2011-06-17T17:58:16 <Marchael> nope
125 2011-06-17T17:58:29 <Marchael> it shows help for --clean
126 2011-06-17T17:58:35 <Marchael> (without parameters)
127 2011-06-17T17:59:40 <ThomasWaldmann> maybe give default as False?
128 2011-06-17T17:59:50 <Marchael> why?
129 2011-06-17T18:00:13 <Marchael> if user don't want cleaning he won't use --clean
130 2011-06-17T18:00:21 <ThomasWaldmann> because choices seems unnatural for a boolean
131 2011-06-17T18:01:52 <ThomasWaldmann> parser.add_argument('--foo', action='store_true')
132 2011-06-17T18:01:58 <ThomasWaldmann> maybe like that?
133 2011-06-17T18:01:59 <Marchael> I understand, but flask-script doesn't allow me to call script with --clean without parameters.
134 2011-06-17T18:02:04 <ThomasWaldmann> (that's from argparse docs)
135 2011-06-17T18:02:11 <Marchael> hm
136 2011-06-17T18:04:59 <Marchael> but how "action" can helps me?
137 2011-06-17T18:07:14 * Marchael reads dox
138 2011-06-17T18:08:31 *** sinha
139 2011-06-17T18:09:23 <ThomasWaldmann> if nothing else helps, read the docs :)
140 2011-06-17T18:09:50 <Marchael> oh ,seems jsut what I want
141 2011-06-17T18:09:51 * ThomasWaldmann assumes if they give that as an example, it is hopefully working
142 2011-06-17T18:13:48 *** m4k3r
143 2011-06-17T18:16:11 <Marchael> working
144 2011-06-17T18:16:15 <Marchael> thx ThomasWaldmann
145 2011-06-17T18:20:49 <Marchael> > can't you just call your WhooshIndex method to do this?
146 2011-06-17T18:20:49 <Marchael> what exactly?
147 2011-06-17T18:21:07 <Marchael> open_document first tries to open it
148 2011-06-17T18:23:29 <Marchael> ThomasWaldmann: ^
149 2011-06-17T18:31:36 <ThomasWaldmann> Marchael: if you want to stay with that class, it would be great if it had some useful methods
150 2011-06-17T18:32:04 <ThomasWaldmann> so that you don't need to do such getattr/setattr stuff from the outside
151 2011-06-17T18:32:14 <Marchael> ok
152 2011-06-17T18:54:00 <sinha> ThomasWaldmann: i ran into some problem and thus deleted the wiki directory, and after that i restarted moin ( as it has created wiki directory again), but i am getting this error http://paste.pocoo.org/show/413856/
153 2011-06-17T18:54:11 <sinha> how to get rid of this ?
154 2011-06-17T18:58:07 <ThomasWaldmann> database is locked
155 2011-06-17T18:58:30 <ThomasWaldmann> looks like you have an issue with the sqla database it creates for indexing
156 2011-06-17T18:58:53 <ThomasWaldmann> if you just remove all backend stuff and that ROUTER... db, it'll create all fresh
157 2011-06-17T18:59:44 <ThomasWaldmann> if you disabled load_xml/index_rebuild, you need to reenabled it once
158 2011-06-17T19:29:00 <sinha> ThomasWaldmann: in paging, how to use the count param, i mean do we need to save it in user object, such that we can remember the preference for logged in user, or any kind of user should have the option to set it on page.
159 2011-06-17T19:35:43 <ThomasWaldmann> give it via url-qs-param and just use some sane default for now
160 2011-06-17T19:36:22 <sinha> how about 50 as default ?
161 2011-06-17T19:36:31 <ThomasWaldmann> we can decide later whether we need configuration for this, or even user profile storage
162 2011-06-17T19:36:36 <ThomasWaldmann> yes
163 2011-06-17T19:36:55 <ThomasWaldmann> (depends a bit on 50 what :)
164 2011-06-17T19:37:00 <dreimark> hehe
165 2011-06-17T19:37:04 <ThomasWaldmann> 50 history entries are ok
166 2011-06-17T19:37:17 <ThomasWaldmann> but 50 days for recent changes are too much usually
167 2011-06-17T19:37:43 <dreimark> sinha: i will be at the europython next week - I won't be all the time online
168 2011-06-17T19:38:28 <ThomasWaldmann> same for me and ronny, btw
169 2011-06-17T19:38:49 <dreimark> we can use the common communitcation pathes but expect some delay
170 2011-06-17T19:41:56 *** greg_f
171 2011-06-17T19:42:21 <ThomasWaldmann> hmm, looks like they may have a room size problem at EP
172 2011-06-17T19:46:47 <dreimark> not only at one room+
173 2011-06-17T19:47:06 <dreimark> i have not seen a openspace room yet
174 2011-06-17T19:49:36 * ThomasWaldmann prints EP schedule
175 2011-06-17T19:53:12 <ThomasWaldmann> btw, the font is barely readable with 2-on-1 printing
176 2011-06-17T19:53:51 <dreimark> btw. next week is a holiday day and a free day where I am "working"
177 2011-06-17T19:54:18 <ThomasWaldmann> hehe
178 2011-06-17T19:54:30 <xorAxAx> dreimark: which holiday?
179 2011-06-17T19:55:06 <ThomasWaldmann> dreimark: you mean next week or the week after ep?
180 2011-06-17T19:55:51 <ThomasWaldmann> brb
181 2011-06-17T19:57:33 <dreimark> someone told me on thursday
182 2011-06-17T19:57:45 <dreimark> hmm
183 2011-06-17T19:57:47 <dreimark> brb
184 2011-06-17T20:19:43 *** Marchael
185 2011-06-17T20:29:18 *** pkumar
186 2011-06-17T20:31:37 <pkumar> xorAxAx : hi, I was working on the issue regarding 'setup for wsgi app from scratch'.
187 2011-06-17T20:32:02 <xorAxAx> yeah
188 2011-06-17T20:32:04 <xorAxAx> url?
189 2011-06-17T20:32:16 <pkumar> xorAxAx : I made few changes in conftest.py and the tests are faster now.
190 2011-06-17T20:32:19 <pkumar> just a mom
191 2011-06-17T20:35:33 <CIA-70> pkumar <contactprashantat@gmail.com> * a9a8d49bb4f1 r272 pytest2/MoinMoin/conftest.py: MoinTestFunction in conftest.py modified so that init_test_app is not called for every test item and thereby making the test execution faster.
192 2011-06-17T20:35:33 <CIA-70> pkumar <contactprashantat@gmail.com> * 0ada641eaaf0 r273 pytest2/MoinMoin/_tests/test_test_environ.py: new app initialized in test_test_environ.py to refresh the app.
193 2011-06-17T20:36:20 <pkumar> xorAxAx : https://bitbucket.org/pkumar/pytest_moin
194 2011-06-17T20:37:02 <pkumar> xorAxAx : though, for tests there is a need to initialize the app as it also refreshes the backend
195 2011-06-17T20:37:39 <pkumar> xorAxAx : so in those cases just calling init_test_app() sserves the purpose.
196 2011-06-17T20:37:48 <xorAxAx> you mean manually in the tests?
197 2011-06-17T20:37:55 <pkumar> number of such tests are very few
198 2011-06-17T20:37:57 <pkumar> yeah
199 2011-06-17T20:38:23 <pkumar> some in storage
200 2011-06-17T20:38:24 <xorAxAx> all tests should clean up, then such an init is not necessary
201 2011-06-17T20:38:31 <pkumar> I've done a few and it works
202 2011-06-17T20:39:24 <pkumar> actually, at present time we do not initialize a new app for every test item. Thats what makes the tests faster
203 2011-06-17T20:40:12 <pkumar> we just use the previous app for the current one with some conditions
204 2011-06-17T20:40:46 <pkumar> so in cases where a new app is need we can initialize it.
205 2011-06-17T20:41:19 <pkumar> though those cases are very few.
206 2011-06-17T20:45:23 <pkumar> xorAxAx : any suggestions?
207 2011-06-17T20:48:46 <xorAxAx> pkumar: did you read my last message?
208 2011-06-17T20:49:27 *** dreimark
209 2011-06-17T20:49:33 *** dreimark
210 2011-06-17T20:50:31 <pkumar> xorAxAx : can you please explain, what do you exactly mean by test clean up?
211 2011-06-17T20:53:11 <xorAxAx> a unittest should clean up the environment
212 2011-06-17T20:53:18 <xorAxAx> i.e. the items it changed etc.
213 2011-06-17T20:53:36 <xorAxAx> the whole storage for example should be invariant for/after the test run
214 2011-06-17T20:53:52 <xorAxAx> i.e. the same
215 2011-06-17T20:57:01 <xorAxAx> pkumar: does that make sense?
216 2011-06-17T20:57:07 <pkumar> xorAxAx: MoinMoin tests were default like this as you are saying, like initialize app for a test item and de - initialize as the test ends.
217 2011-06-17T20:57:28 <xorAxAx> no, i am not saying a testshould initialize an app
218 2011-06-17T20:57:36 <xorAxAx> it should just restore what it changed
219 2011-06-17T20:59:40 <pkumar> isn't before_wiki() and after_wiki() which are in init_test_app and deinit_test_app take care of that?
220 2011-06-17T21:00:01 <pkumar> i.e restoring what is changed
221 2011-06-17T21:01:04 <pkumar> xorAxAx : ^
222 2011-06-17T21:01:52 *** ThomasWaldmann
223 2011-06-17T21:02:28 <xorAxAx> pkumar: i dont see before_wiki here - https://bitbucket.org/pkumar/pytest_moin/src/0ada641eaaf0/MoinMoin/conftest.py#cl-56
224 2011-06-17T21:02:56 *** ThomasWaldmann
225 2011-06-17T21:02:56 *** ThomasWaldmann
226 2011-06-17T21:04:58 <pkumar> xorAxAx : ok, lemme try that, thanks.
227 2011-06-17T21:06:30 <xorAxAx> huh?
228 2011-06-17T21:11:21 <pkumar> xorAxAx : no, I was talking about_before and after_wiki in the code previous to changes made by me.
229 2011-06-17T21:11:53 <pkumar> before_wiki
230 2011-06-17T21:11:55 <pkumar> *
231 2011-06-17T21:12:24 <pkumar> I mean in the default code
232 2011-06-17T21:14:12 *** m4k3r
233 2011-06-17T21:15:33 <ThomasWaldmann> re
234 2011-06-17T21:22:18 <xorAxAx> pkumar: url?
235 2011-06-17T21:23:03 <pkumar> xorAxAx : url of?
236 2011-06-17T21:23:11 <xorAxAx> the code you are talking about
237 2011-06-17T21:28:00 <pkumar> xorAxAx : http://paste.pocoo.org/show/413935/
238 2011-06-17T21:28:54 <xorAxAx> those look like event callbacks
239 2011-06-17T21:28:59 <xorAxAx> not like cleanup code
240 2011-06-17T21:30:26 <pkumar> xorAxAx : so, is it that clean up is done only after destroying app as in destroy_app(app) line no.65
241 2011-06-17T21:31:07 <xorAxAx> no, neither does destroy_app clean up what i mean
242 2011-06-17T21:34:05 <pkumar> xorAxAx : if I follow destroy_app(app) I find this - app.storage.close()
243 2011-06-17T21:34:08 <pkumar> app.unprotected_storage.close()
244 2011-06-17T21:34:30 <xorAxAx> ... which doesnt delete items that were created by the tests
245 2011-06-17T21:34:47 <pkumar> xorAxAx : yeah, seems so.
246 2011-06-17T21:49:28 <dreimark> xorAxAx: 23.06.2011 Fronleichnam
247 2011-06-17T21:49:49 <xorAxAx> dreimark: indeed
248 2011-06-17T21:57:48 <pkumar> xorAxAx : in http://paste.pocoo.org/show/413935/ can you please help me out finding where it is cleaning up the code?
249 2011-06-17T21:58:52 <pkumar> or a hint?
250 2011-06-17T22:05:56 *** Marchael
251 2011-06-17T22:54:28 <xorAxAx> there is no cleaning up, sigh
252 2011-06-17T22:59:22 *** sinha
253 2011-06-17T22:59:26 *** sinha1
254 2011-06-17T23:07:57 <pkumar> xorAxAx : so, what about default conftest.py code. is there cleaning up there. or cleaning up is taking place some where else. may be in pytest internal codes.
255 2011-06-17T23:09:29 <pkumar> xorAxAx : http://paste.pocoo.org/show/413980/ , default conftest code
256 2011-06-17T23:10:36 <xorAxAx> pkumar: i dont understand the question
257 2011-06-17T23:11:57 <pkumar> normally, cleaning up code should be present or called from somewhere in conftest.py right?
258 2011-06-17T23:12:09 <pkumar> if it is there.
259 2011-06-17T23:12:37 *** brunomartin
260 2011-06-17T23:18:47 <pkumar> xorAxAx : you said there is no cleaning up. Does it mean there is no cleaning up in the particular code or it doesn't occur in MoinMoin tests itself ?
261 2011-06-17T23:19:30 <xorAxAx> in the code you showed me
262 2011-06-17T23:19:34 <xorAxAx> tests should clean up
263 2011-06-17T23:20:32 <pkumar> ok so wat about http://paste.pocoo.org/show/413980/ , default code of MoinMoin.
264 2011-06-17T23:20:33 <pkumar> xorAxAx : where is it cleaning up?
265 2011-06-17T23:21:26 <xorAxAx> nowhere, as i just said
266 2011-06-17T23:23:43 <pkumar> xorAxAx : ok. so currently what do I do? try to add clean up or temporarily call init_test_app at few places where tests are failing?
267 2011-06-17T23:25:22 <xorAxAx> the former :)
268 2011-06-17T23:25:26 <xorAxAx> if feasible
269 2011-06-17T23:26:50 <pkumar> ok, I'll give that a try. :)
270 2011-06-17T23:46:23 <pkumar> gn everyone :)
271 2011-06-17T23:46:27 <pkumar> bbl
272 2011-06-17T23:47:12 *** pkumar
273