IRC log of #schooltool for Monday, 2012-03-05

*** menesis has quit IRC01:11
*** aks has joined #schooltool05:11
*** aks has quit IRC06:57
*** aks has joined #schooltool06:57
*** yvl has joined #schooltool09:29
*** alga has joined #schooltool11:27
*** menesis has joined #schooltool11:31
*** alga has quit IRC13:05
*** aks has quit IRC14:23
*** th1a has joined #schooltool15:57
th1ahi aelkner_, yvl, menesis.16:30
yvlgood morning16:31
aelkner_morning16:31
th1aIt is invoice time, gentlemen.16:33
th1aOh, for the sprint...16:33
th1aWhat did we say yvl?16:33
th1a8 hour days Mon - Fri,16:33
th1aplus two half days the first weekend?16:34
yvlyes16:35
yvlIIRC16:35
th1aOK with that aelkner_?16:35
aelkner_i have just the five days on my invoice16:36
aelkner_the first two weekend days i counted as a finish up of the task that i was working on the previous week16:37
th1aOK.16:37
th1aSo I had a frustrating week with D3, but replaceafill finally figured out that I wasn't always loading the page before I tried to run my Javascript on it.16:38
th1a(that is, that issues screwed up a couple days, not the whole week ;-)16:38
aelkner_isn't that what $(document).ready(function() is for?16:39
th1aIn jquery.16:39
th1aI suppose I might be able to use it...16:39
th1aBut I can also just put the script at the bottom of the page.16:39
th1aFor now at least.16:39
aelkner_we can use jquery anytime we wnat because we include it on all pages16:39
th1aI suppose I could use it at the beginning of the D3 script... I'm not trying to learn jquery at the same time though.16:40
th1aBut yes, I'll look into that.16:41
aelkner_but yes, the old way was to include stuff at the end16:41
th1aOK, yvl, would you like to start us off?16:41
yvlok16:41
yvlI was smoothing the rough edges of our Selenium test runner16:42
yvlI took the liberty to work on that today also16:42
yvlbut that's it16:43
th1aDo you want to keep working on that through Wednesday?16:43
yvlwell, I can take a pause16:43
yvland do the CanDo data model16:44
yvlwhich reminds me16:44
yvlcan you send me photos of the nice drawings on the wall? :)16:44
* yvl kind of remembers, but it would be nice to have them16:44
th1aOh...16:45
th1aYes, I guess we didn't actually take pictures there?16:45
yvldid you throw them out?16:45
th1aI brought some home... which ones are you thinking of?16:46
yvlthis one and the other one :)16:47
yvlumm16:47
th1aI might have not brought the right ones.  :-(16:47
yvlany would do16:47
* yvl can work from memory btw16:47
th1aI think I only have the task lists.16:48
yvlI think you didn't send us any pictures (because I remeber some photos being taken)16:48
th1aWhich is not what you want, I don't think.16:48
th1aaelkner_?16:48
th1aAnything on your phone?16:48
th1aThis is what yvl and I get for being phone luddites.16:49
aelkner_nothing on my phone, sorry16:49
th1aI think you're out of luck yvl.16:50
th1aMy bad.16:50
yvlok16:51
yvldon't worry guys :)16:51
*** alga has joined #schooltool16:52
th1aOK, so starting on CanDo Thursday?16:52
*** replaceafill has joined #schooltool16:54
yvlI was thinking late Tuesday16:54
th1aOK.  Cool.16:54
replaceafilltesting...16:54
th1aAnd you'll want to come back to testing at some point?16:54
aelkner_somebody overslept :)16:54
yvlEarth to replaceafill16:54
yvlEarth to replaceafill16:54
yvlcan you hear us16:54
replaceafillgood morning16:54
yvlmorning!16:55
replaceafillsorry i'm late, i'm at the mall near home16:55
yvlyes, th1a16:55
replaceafillwe have no electricity at home16:55
* replaceafill goes read the logs16:55
aelkner_bummer replaceafill16:55
th1aDo you know the cause replaceafill?16:56
* menesis hi16:56
replaceafillyes, it's very windy since yesterday, and it seems like a post went down16:56
th1aAh.16:56
th1ahi menesis.16:56
th1aThanks yvl.16:57
th1aaelkner_?16:57
aelkner_ok, i got the javascript to work for locking out sending email if no recipient with email was chosen16:57
aelkner_and i created a modal for after the email was sent16:58
aelkner_http://69.164.203.135:36660/schooltool.interventions/2011-2012/student10916:58
aelkner_as teacher00116:58
aelkner_i set up the email on my test instance to go to my gmail account16:58
aelkner_actually, i should say, to come from that account16:59
aelkner_is you'd like, you could change teacher001's email to your own email address16:59
aelkner_so that you can see proof that the email got there16:59
th1aLets fix that hint under email.16:59
aelkner_what should it be instead?17:00
th1a"Send a copy of the message to recipients with contact email addresses?"17:00
aelkner_is that a question? :)17:01
th1aThe choices are "Yes" and "No."17:01
aelkner_yeah, i shouldn't joke, one could in theory use questions for any boolean hint17:01
aelkner_anyway, click around on the people and note that the email is disabled if no person has mail icon17:02
th1aYes.17:02
menesisneither yes or no are selected by default17:02
aelkner_is that wrong?17:03
th1aI would make it yes by default.17:03
menesisit is confusing17:03
menesiswhat happens if I do not select anything?17:03
aelkner_we have that issue in other places in the app17:04
th1a?17:04
aelkner_in zope, if the value of a boolean is None, then neither button is selected17:04
aelkner_look at demo fields17:04
th1aShouldn't we just give it a default value?17:04
*** replaceafill_ has joined #schooltool17:05
aelkner_th1a, if you'd like it to be Yes by default, i can do that17:05
aelkner_btw, i should count the fact that the email server is disabled17:05
aelkner_when i decide whether the Email field is enabled or not, right?17:06
th1aYes.17:06
aelkner_yeah, i'll do that17:06
*** replaceafill has quit IRC17:07
aelkner_anyway, i made one of the parent's email an invalid address to test handling email errors17:07
aelkner_replaceafill_is having connectivity problems (:17:07
aelkner_i was hoping for his input on one question17:08
aelkner_interestingly, if one recipient has valid email and the other invalid17:08
aelkner_the server returns the queued email with invalid status code17:08
aelkner_and a list of the invalid addresses are stored in the email17:08
aelkner_which end up in the message17:08
aelkner_the thing is, should i give a more informative message17:09
th1aYes.17:09
aelkner_showing that the email was sent to the people it got to17:09
th1aAnd explicitly noting that the email has not been sent.17:09
aelkner_have you tried it out yet?17:10
th1aYes.17:10
aelkner_it already notes that it didn't send the email to the invalid address17:10
aelkner_i'm using the status_messages dict from mail.py as yvl suggested17:11
aelkner_any messages, that way, will match what the email manager gives17:11
th1aWell, it is telling me it couldn't log in to the SMTP server.17:11
th1aBut not that the mail wasn't sent.17:11
aelkner_i mean, i shouldn't be creating my own email error messages, right?17:12
th1aAlan, USERS.17:12
th1aThe user shouldn't have to imply the significance of the error message.17:12
aelkner_th1a, consistency17:12
aelkner_shouldn't we change mail.py, and hence, the way the email tab works?17:13
th1aWhat the user must know from this message is that the email wasn't set.17:13
th1aSecondarily why.17:13
th1awasn't sent.17:13
aelkner_replaceafill_, what do you think about status_messsages, should it change?17:14
th1aThere is no reason the first line of the dialog can't be "The message was not sent as an email to the following addresses: ..."17:14
th1aReason: couldn't log in to smtp server.17:14
replaceafill_aelkner_: change it as you need17:15
aelkner_replaceafill_, ok, will do17:15
replaceafill_aelkner_: just take into account i18n please17:15
aelkner_one problem with status_messages is that there is no paragraph break17:15
aelkner_implied in the content of the messages17:16
aelkner_so having a multi-line message like what th1a suggests requires a plan17:16
aelkner_should we imbed \n in status_messages when we want multi-line messages17:16
aelkner_and then i would split('\n') and make separate paragraphs in my modal?17:17
aelkner_i should ask, does anyone have anything invested in the way our email message work now17:18
th1aI wouldn't put line breaks in the status_messages.17:18
aelkner_or should i just change then to do whatever i want17:18
th1aWhy do you need them?17:18
aelkner_the email utility does the job of sending email17:19
aelkner_there are some seven possible exceptions that can happen17:19
aelkner_and when that happens, the email gets queued with a status code17:19
th1aYEs...17:19
aelkner_the status_messages dict is used to translate that code into a meaningful message17:20
*** replaceafill has joined #schooltool17:20
th1a Why do you need line breaks?17:20
aelkner_you suggested a multi-line message17:20
aelkner_the email was not send to the following addresses: one, two, three17:21
aelkner_is one <p>17:21
aelkner_Reason: the email addresses are invalid17:21
aelkner_is another <p>17:21
*** replaceafill_ has quit IRC17:21
*** alga has quit IRC17:22
aelkner_so, if that is in fact the message in that case, status_messages would need to have some \n17:22
aelkner_or something to allow the client code to break up the message into multiple <p>s17:22
th1aOr you could compose the dialog text some other way.17:23
th1aIt seems to me you're saying "The email was not sent..." has to be added to the status message, when it seems to me that it is a separate message anyhow.17:24
*** alga has joined #schooltool17:24
th1aAt least, that's the way it seems to me.  ;-)17:24
aelkner_whatever we do for email delivery messages, it should be done in the view itself17:25
aelkner_these things should be handled in the utility as it is now17:26
aelkner_and right now, the utility doesn't have email messages that contain the fact that the email was not delivered17:26
aelkner_jsut the reason17:26
aelkner_and17:26
aelkner_the messages are one-liners17:27
aelkner_the point it: it should be handled by the utility17:27
th1aWell, I'd say we've beaten this into the ground, but I don't see why the utility needs to be the source of a more general prompt to the user like "This email was not sent."17:27
yvlfollowed by the message from utility17:28
th1aRight.17:28
aelkner_if the email was sent to one user and not to the other17:28
aelkner_"This email was not sent."17:28
aelkner_that would not be correct17:28
aelkner_and besides, the utility should handle creating the message17:29
aelkner_yvl, i thought this was your idea?17:29
aelkner_and a good one, in fact17:29
aelkner_we don't need various views deciding how to give email error messages17:29
th1aThe utility doesn't have to provide all text related to the event.17:29
yvl???17:29
yvlaelkner_, I really do not get what you're trying to say17:30
aelkner_ok, what i'm saying is that we have this email utility17:30
aelkner_it sends email and reacts to exceptions17:30
*** replaceafill has quit IRC17:30
aelkner_translates those exceptions into message intended for the user17:30
*** replaceafill has joined #schooltool17:31
aelkner_if those messages are wrong in the utility, then they should be fixed there17:31
th1aDoes it just change the numeric code into text?17:31
aelkner_not in a particular view that serves as a client of the utility17:31
yvlyes th1a17:31
aelkner_more than that17:31
yvland adds parameters17:31
aelkner_it also uses the queued email message for info17:31
aelkner_like which email addresses were invlid17:32
yvlyes17:32
aelkner_the point is, that needs to be handled in the utility17:32
yvlwhy?17:33
th1aYou're not going to want to use the exact same text for, say, a log viewed by an admin and an error message for a very non-technical user.17:33
aelkner_we could add a method to mail.py that returns a list of message to be used in <p> elems17:33
aelkner_th1a, ah, i see17:33
aelkner_well, wait17:33
aelkner_you did suggest putting a reason in the message17:34
aelkner_what are you saying would go there?17:34
yvlaelkner_, maybe you could just copy the status_messages dict17:34
yvland put whatever text th1a wants there?17:34
yvlbtw17:34
th1aI would just divide the utility's output into a data structure and let the view arrange it as made sense.17:35
yvlkeep in mind, that once the email sending becomes asynchronous17:35
yvlyou will only get "sent" statuses17:35
yvlbecause it will fail way later17:35
aelkner_really>17:35
aelkner_?17:35
aelkner_so this is all going to change later?17:36
yvlunless we don't make it asynchronous17:36
aelkner_hell, if that's the case, why don't i ignore the email status17:36
aelkner_and just say that it was sent17:36
th1alol17:36
th1aIt is pretty much done already.17:36
menesisschooltool.email is not used by anything else, only intervention.17:37
aelkner_for now17:37
menesisit it does somehting wrong, fix it17:37
yvlyes17:37
yvl*if*17:37
th1aAll I was really asking for in the first place was a line explaining that the significance of the error is that the email is not sent.17:37
yvl:)))17:38
th1aBecause that is not obvious.17:38
aelkner_heck, i'll change the email utility to do whatever i want if noone cares about it changing17:38
yvlis it broken, aelkner_ ?17:38
* th1a can't understand why a line can't be added directly to the dialog.17:38
yvlwell it can!17:39
yvlvia magic of page templates17:39
th1aJust do it!17:39
yvlaelkner_, please just hard-code it17:39
yvlif email failed17:39
yvl<p i18n:translate="">The email could not be delivered to all people</p>17:39
th1arecipients.17:40
aelkner_status_messages = {17:40
aelkner_    10: _('The SchoolTool mail service is disabled'),17:40
aelkner_    20: _("Couldn't connect to the SMTP server (${info})"),17:40
aelkner_    30: _('Error sending HELO to the SMTP server (${info})'),17:40
aelkner_    40: _("Couldn't login as ($username) to SMTP server (${info})"),17:40
aelkner_    50: _('The server (${info}) rejected the From address: ${from_address}'),17:40
aelkner_    60: _('The server (${info}) rejected the following recipient addresses: '17:40
aelkner_          '${addresses}'),17:40
aelkner_    70: _('The server (${info}) replied that the message data was malformed'),17:40
aelkner_    }17:40
aelkner_should it not use this list of messages for status codes17:41
yvlbut it can!17:41
*** replaceafill has quit IRC17:41
th1aaelkner_:  We just need an additional explanation of what all of these status codes mean.17:41
yvlyou can put *both* a generic paragraph17:41
yvlnotifying of failure17:41
yvland also the failure message next to it17:41
aelkner_ok, one line for for notifying the failure17:42
yvlin a second paragraph17:42
aelkner_he email could not be delivered to all17:42
aelkner_and then the status_messages for the reason17:42
yvlright17:42
aelkner_i could live with that17:42
aelkner_so if person one got the email and person two didn't, we are covered by the 'not to all' part17:42
yvlright17:43
aelkner_sounds like a plan17:44
th1aThank God.17:44
aelkner_thank sober discussion17:44
th1aOK, so... whatever you do with this, finish it by the end of the day tomorrow.17:44
th1aI wish I wasn't sober.17:45
th1aAnd then I guess section locations still need to be done?17:45
aelkner_yes, that would be next17:46
aelkner_this email thing was a distraction that interrupted that17:46
th1aOK.17:47
th1aOh... I did just assign a bug to you at the end of the week about importing custom demographics.17:47
th1aCan you check to see if that works before moving on to section locations, aelkner_?17:47
aelkner_yes17:47
aelkner_ok17:47
th1aOK.  Cool.17:48
th1aThanks aelkner_.17:48
th1amenesis?17:48
menesisnot much17:48
menesisadded more options to start-schooltool-instance script17:49
menesisfixed some tests broken by recent merges17:49
menesistried to package schooltool-book, but stumbled17:51
menesiscannot apply a patch on native package17:51
th1a?17:51
menesisthat is a branch that has debian/ directory in upstream branch17:52
menesisI needed to modify Makefile so that buildout is not used17:52
menesiswill fix it some other way17:52
th1aOK.17:53
menesisalso looked at zope2.12 build failure on ubuntu.17:53
menesisit is not my responsibility..17:53
th1aThat's what I was thinking.  ;-)17:54
menesisbut still I though I could make it build with python2.717:54
menesisor zope2.12 will be removed17:54
menesisnot that we need it17:55
menesisok17:55
menesisso you want a beta release this week17:55
menesisbut I should expect some fixes land today/tomorrow17:56
menesis?17:56
th1aUh... there's this mail thing, maybe a critical spreadsheet bug.17:56
menesiscustom demographics import?17:57
th1aYes.17:57
th1aYou can start now or after Wednesday, whichever makes sense to you.17:58
th1aWhatever else is going in will be smallish bugfixes.17:58
menesisok17:59
th1aUse your discretion.17:59
th1aOK, no replaceafill now, so I guess we're done.18:00
th1aSend me your invoices.18:00
th1aI'll see you Wednesday.18:00
th1aHave a great week.18:00
menesisthanks18:00
* th1a drops the bag of gravel.18:00
aelkner_cya guys wed18:01
yvlgood luck guys!18:02
*** replaceafill has joined #schooltool18:36
* replaceafill 's home has electricity again!18:36
replaceafilli had a "you've got to be kidding me" moment at the mall18:36
replaceafillelectricity went down(?) there too!18:37
replaceafill*went off18:39
*** ignas has joined #schooltool18:59
aelkner_hey replaceafill19:01
*** th1a has quit IRC19:09
*** aelkner_ has quit IRC19:17
*** aelkner has joined #schooltool19:23
*** aelkner has quit IRC19:28
*** aelkner has joined #schooltool19:31
yvlreplaceafill, you may find this interesting19:34
yvlhttp://bazaar.launchpad.net/~schooltool-owners/schooltool.lyceum.journal/flourish/revision/32619:34
* replaceafill goes to see19:34
yvlbrowser UI extension: http://bazaar.launchpad.net/~schooltool-owners/schooltool/flourish/revision/3341#src/schooltool/basicperson/ftesting.py19:34
yvlweb element level extension: http://bazaar.launchpad.net/~schooltool-owners/schooltool/flourish/revision/3341#src/schooltool/skin/flourish/ftesting.py19:35
replaceafill!!!19:35
replaceafillmanager.ui.person.add!!!19:35
yvlbwahahahaha!19:35
replaceafill:))19:35
yvloh19:35
yvland if you add in buildout.cfg a line at eggs=19:36
yvlipdb19:36
yvlyou'll get ipdb when running tests with -D19:36
replaceafillwhat's the advantange of ipdb?19:37
* replaceafill has never used it19:37
yvlassaults your senses with many colours19:37
replaceafill:D19:37
yvland autocompletion mostly19:37
yvlit's like its based on IPython19:37
replaceafillah19:38
yvl* it's19:38
replaceafilli like the way you "hide" browser.wait_no :)19:38
replaceafillinside type_ind_date19:38
replaceafilltype_in_date19:38
yvlwell19:39
yvlbetter than nothing :)19:39
replaceafillthis means we're good to go with the schoolyear/term set up views, right?19:39
yvlworks for me :P19:39
replaceafilli mean, the datepicker shouldn't be a problem anymore19:39
yvlcorrect19:39
yvland please add helpers like ui.person.add19:40
yvland ui.enter_date19:40
yvlas you go19:40
replaceafillah ok19:40
yvlone thing...19:40
yvlyou may notice the name "person.add"19:41
yvlit splits the line by '.'19:41
yvland then builds the objects19:41
yvlso you get browser.ui.person.add19:41
yvlbut it19:41
yvlit's probably obvious19:41
replaceafillcan you point me to the line about the splitting?19:42
replaceafilli don't see it19:42
yvlregisterExtension19:42
yvlin testing/selenium.py19:42
replaceafillah got it19:43
replaceafilllol19:43
replaceafillblack magic19:43
replaceafill:D19:43
yvlIn modern times, some find that the definition of "black magic" has been convoluted by people who define practices that they disapprove of as "black magic"19:44
yvlthus spoketh Wikipedia19:44
replaceafill:O19:45
*** th1a has joined #schooltool19:45
th1aHi replaceafill.19:45
replaceafillyvl, so the helpers need to be registered inside the test setup19:46
replaceafillcorrect?19:46
replaceafillhi th1a19:46
replaceafillsorry i got disconnected also at the mall19:46
th1anp19:46
yvlwell, I'd like them registered in registry19:46
th1aSorry I had to take advantage of the good weather here and having the car to go skate.19:46
yvlsay, registerSeleniumSetup is called when basicperson/ftesting.py  is imported19:46
*** ignas has quit IRC19:47
yvland it is imported in basicperson/__init__.py19:47
replaceafillyvl, ah got it19:47
replaceafillshould we add the same helpers we used to have: to add school years, terms, courses, sections?19:47
yvlok... happy testing! ;)19:47
yvlif by we you mean you19:48
yvlthen be my guest :P19:48
yvlsorry19:48
replaceafillnp19:48
yvlyes, we should19:48
replaceafillthanks yvl19:48
replaceafillno i have to think of a test to write :D19:48
yvlbut yes, helpers would be greatly appreciated19:48
yvlsee you soon ;)19:48
*** yvl has quit IRC19:48
* replaceafill goes to set up his selenium test runner19:49
replaceafillth1a, i like vinny's idea about putting the url at the bottom of the pdf :)19:50
replaceafillsee online at: ...19:50
th1aOn the report card?19:50
replaceafillyes19:50
replaceafillit's maybe not possible, but i like it19:51
th1aWell, aside from the fact that parents can't.19:51
replaceafillright19:51
replaceafillmaybe it's just me, but selenium exceptions are definitely more understandable now20:27
replaceafillWebDriverException: Message: u'Element is not clickable at point (255.5, 430). Other element would receive the click: ...20:28
th1areplaceafill:  Could I mix in that jquery ready() thing with my D3 script?21:05
replaceafillth1a, i think so21:05
th1aOK.  I'll note that for the future.21:05
replaceafillyou could also use window.onload i think21:06
replaceafillif you dont want to use jquery21:06
th1aProbably I'll make you figure it out eventually.  ;-)21:06
replaceafilloops sorry21:06
replaceafillbody.onload21:06
replaceafill:)21:06
th1aPart of the inevitable cleanup.21:07
replaceafillhttp://stackoverflow.com/questions/3698200/window-onload-vs-document-ready21:07
replaceafilliirc ready is faster21:08
replaceafillbut they both make sure you have the dom loaded21:08
replaceafillwhich is what you need21:08
th1areplaceafill:  Btw, the reason my scripts worked sometimes is because often the page was drawn before the json could be parsed, depending on the sequence in the script.21:16
replaceafillah21:16
* replaceafill goes to get lunch21:29
* replaceafill back22:13
*** alga has quit IRC22:18
th1areplaceafill:  What's up with this message in my console -- Resource interpreted as Font but transferred with MIME type font/woff: "http://themes.googleusercontent.com/static/fonts/ubuntu/v4/0ihfXUL2emPh0ROJezvraD8E0i7KZn-EPnyo3HZu7kw.woff"23:01
replaceafillth1a, we still use the fontapi from google in flourish23:03
replaceafill<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&amp;subset=Latin" />23:04
th1aYes... Have you seen that message before?  I assume it is harmless.23:04
replaceafilli think i have23:04
replaceafillbut i dont remember when exactly23:04
th1aI'll google it...23:04
th1aEh, just something Google should fix.23:05
*** alga has joined #schooltool23:45

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!