IRC log of #schooltool for Monday, 2013-12-09

*** menesis has quit IRC02:02
*** th1a has quit IRC02:35
*** yvl has joined #schooltool10:02
*** menesis has joined #schooltool10:48
*** th1a has joined #schooltool13:19
*** menesis has quit IRC13:45
*** menesis has joined #schooltool14:53
*** mibofra has quit IRC15:13
*** mibofra has joined #schooltool15:15
*** replaceafill has joined #schooltool15:26
*** mibofra has quit IRC15:27
th1ahi replaceafill, menesis, yvl.15:30
replaceafillgood afternoon15:30
yvlgood morning /afternoon15:30
*** mibofra- has joined #schooltool15:32
th1aSo I got an email Friday evening from David Ally explaining he needed to have a working Schooltool ready for a meeting this morning.15:32
th1aAlways an adventure.  ;-)15:32
th1aI sent an email about a locale issue he ran into.15:32
th1aAny thoughts about this?15:33
th1aOr maybe we need to wait for menesis.15:33
th1aTo be clear, I don't let myself get stressed over David's last minute requests.15:33
menesisI saw the question and looked into it last night15:34
menesisbut did not quite understand what's wrong15:35
th1aWell, SchoolTool didn't start.15:36
th1aMaybe the locale issue was hiding the real problem in the log because we still needed to blow away the db for SchoolTool to work.15:37
menesisit does work for me with lang en_NG in schooltool.conf15:38
menesisthere is only one string translated differently (Journal -> Register)15:38
th1aIt would have been set up as a locale on his laptop.15:39
menesismaybe the locale is not generated in the system? but it works for me with other locales I don't have generated15:40
th1aI don't actually understand locales very well.15:42
menesisthere is a list of supported locales on the system15:43
menesisthat you select during install15:45
menesisbut as I said translations work for me even for "unsupported" locales15:45
menesisso I'm not sure what the problem is15:46
th1aUnsupported by your system.15:47
th1aCan you suggest something for him to try?15:48
menesisI can add "lang zz_ZZ" to schooltool.conf and it still starts and can be selected :-/15:49
th1aShould I have him send you a full log?  Just reinstall?  rund something to re-generate something?15:50
menesisI can suggest "sudo dpkg-reconfigure locales"15:51
th1aOK.  Let's try that!15:51
menesisor "sudo locale-gen en_NG"15:51
menesisbut since I cannot reproduce anything like that, not sure what would help15:52
menesiscomplete log would be useful15:52
th1aHe is going to be setting up several production servers, so I'd just rather not shrug the whole thing off at this point.15:53
menesisnowadays it is error.log15:54
th1aOK, on a similar note, do you have any idea replaceafill where the old niepa server even is?15:54
th1aIf it is still... someplace?15:55
th1aOK, thanks menesis.15:55
replaceafillbut it doesn't start iirc15:55
replaceafilli tried several months ago15:55
replaceafillwhen i formatted the vps15:55
th1aThanks menesis.15:55
th1aI'll send David an email.15:56
th1aWell, I guess you might as well report menesis.15:56
menesisI have finished fixing intervention errors15:57
menesisand all its tests now pass15:57
menesismade a release15:57
* menesis reminds himself: copy intervention to precise15:58
menesisthere is a test failure regarding contacts15:59
menesisand names in the Students group are not visible to teachers, even if teacher can see it elsewhere15:59
menesisi fixed the test differently, but haven't found a solution to this particular issue16:00
menesisthen, got a question about newest schooltool not starting16:00
menesisanswered with a workaround16:01
menesisbut its a fresh db, so delete the database is enough16:01
menesisfixed the offending evolution script16:01
th1aWas it like this: 677, in openDB16:02
th1adb =
th1aFile "/usr/lib/python2.7/dist-packages/ZODB/", line 127, in open16:02
th1aFile "/usr/lib/python2.7/dist-packages/ZODB/", line 459, in __init__16:02
th1aFile "/usr/lib/python2.7/dist-packages/ZEO/", line 1098, in tpc_vote16:02
th1areturn self._check_serials()16:02
th1aFile "/usr/lib/python2.7/dist-packages/ZEO/", line 929, in _check_serials16:02
th1araise s16:02
th1aZODB.POSException.ConflictError: database conflict error (oid 0x00, class persistent.mapping.PersistentMapping, serial this txn started with None, serial currently committed 0x03a350f58327cb22 2013-12-09 05:41:30.739557)16:02
th1aDavid also got that this morning.16:03
menesisKeyError: ''16:03
menesisConflictError... I don't think we can do anything about that16:04
menesisa little piece of data entered might be lost16:04
menesisor something16:04
menesisI do sometimes see conflict errors but they just litter the logs, no visible problem16:05
th1aAh, yeah.16:05
menesis"oid 0x00" looks suspicious16:06
menesisI have a few emails to reply16:07
menesisthen I plan to commit my unfinished jquery-1.10 upgrade for Douglas to see16:08
menesisthen revive another unfinished task, zope.html fixes and move to ckeditor16:09
* menesis done with report16:09
th1aOK.  Thanks menesis.16:10
yvlcleaned up the code a bit, pushed to lp, sent link to replaceafill16:11
yvlstarted working on temporal relationships for contacts16:11
yvlnearly done16:11
yvlthey were really duplicating the functionality, just in a different way16:12
yvlalso loosening up / fixing security along the way16:12
yvlother minor "API" fixes16:12
yvlwhat's left...16:13
yvlport manage contacts view to temporal rel. UI16:13
yvland evolution16:13
th1ayou and/or replaceafill need to make levels temporal for people.16:13
yvlreplaceafill, are you up for it?16:14
replaceafillsure, it'll help me understand the code better16:14
replaceafilli was thinking more on the gradebook16:14
replaceafillbut this sounds good16:14
replaceafillth1a, we're setting the level in the person add/edit forms?16:15
th1aIf it made it much easier, it could be a separate form.16:15
th1aGenerally you're going to initially set it when you create the person and then do mass-promotion.16:16
th1aOnly occasionally would you manually change that for someone.16:16
th1aSo it wouldn't necessarily need to be in the regular edit info form.16:16
th1aBut you would want to set it when you added someone.16:16
replaceafillah ok16:17
th1aProbably a separate "Promote" link would be fine for updtes.16:17
replaceafillit's one level per person, correct?16:17
replaceafillyvl, i have a question about this type of relationships16:18
yvlso no16:18
yvlnot one level per person :D16:18
replaceafilli mean, a person will be associated to one level only :)16:18
yvlI think we'll end up with relationships to all levels a person has taken, is learning, or is enrolled to16:18
yvlbut states will be pre-enrolled, active and completed16:19
yvlor similar16:19
yvlthe way to think about such relationships is16:20
replaceafilloh, so the "temporal" part doesn't mean "we're going to remove it at some point"16:20
replaceafillit means "from this date to this date"16:20
yvlwell, strictly speaking16:20
yvlit means "from this date forward"16:20
replaceafillah ok16:20
yvl2012-07-01, Person -> level1, "pre-enrolled"16:21
yvl2012-09-01, Person -> level1, "enrolled"16:21
th1aI thought this would be a good way to get replaceafill up to speed.16:21
yvl2013-07-01, Person -> level1, "graduated"16:21
yvlso if it is 2012-08-15 today, the person will be displayed as pre-enrolled across the system16:21
yvlonce date hits 09-01 he becomes enrolled16:22
yvlyou can also do things like "consider him enrolled from two months ago"16:22
yvlalso you can query "return all levels completed"16:23
yvlor "all levels completed by 2010-05-07"16:23
yvl"people not completed level 4 by 2012-04-12"16:24
yvland so on16:24
yvlbtw, I'll push some minor API changes today16:24
replaceafillyvl, could you point me to the query machinery specifically?16:24
yvlit's wildly undocumented16:24
th1aWell, replaceafill is going to have to know how it works.16:25
yvlit's done via relationship properties16:25
replaceafillso i could do person.levels.something?16:26
yvlthose calls return the relationship property with filtering options16:26
replaceafillgot it16:26
yvlby default, they query active, today16:26
yvlyou can also do person.sections.all().on(today)16:26
yvlwhat else..16:27
yvlyou can look at SectionMemebersStartUp for example16:27
yvltemporal states are configurable, so that inits defaults16:28
yvlstates are composed of two things16:28
yvlmeaning and code16:28
yvlmeaning is a string (of letters)16:28
yvlfor querying withing app16:28
yvlyou'll see most of them hard-coded16:29
yvlACTIVE -> display; not invalid/deleted/hidden16:29
yvlCOMPLETED -> for reports16:29
yvlstates.describe(ACTIVE+COMPLETED, _('SOMETHING'))16:30
yvladds this value to a dropdown16:30
yvlthat users select when they add new codes16:30
yvlcode is something arbitrary16:30
replaceafillwhat's the last letter in:16:30
replaceafillstates.add(_('Pending'), INACTIVE, 'p')16:30
yvlthat's the code16:30
replaceafillthe code for "pending"16:30
replaceafillnot for inactive16:30
yvland user can add16:31
yvl"Even More Pending", INACTIVE, 'pm'16:31
*** mibofra- has quit IRC16:31
yvlvia UI16:31
*** mibofra has joined #schooltool16:31
yvland that should be exported to XLS and so on16:31
yvl(not done yet)16:31
yvlalso, when clerks add persons to a section16:32
yvlthey see the Pending , Withdrawn titles16:32
yvlor any their admins added16:32
yvlI think that covers the basics16:33
replaceafillso we'll need "level-membership" states for my work, right?16:35
yvloh right :)16:35
yvlalso, use TemporalURI for relationship type16:35
yvlsee app/membership.py16:35
yvlnote app_states_name16:36
yvlsame as states in startup16:37
replaceafillthat's the link between the view and the type of relationships it affects?16:37
yvlbasically "use this code dictionary here"16:37
*** mibofra has quit IRC16:38
yvlapp_states_name is a property16:39
yvlwith hardcoded students16:39
replaceafillah, it can be dynamic16:39
replaceafillas in flourishmemberviewpersons16:39
replaceafillquick question16:40
yvllistening :)16:40
replaceafillcan you remind me what the .describe of state does?16:40
replaceafillyou add the state16:40
*** mibofra has joined #schooltool16:40
replaceafillwith a i18n, "global code", "local code"16:40
replaceafillsorry, not sure about the right terms to use :)16:41
replaceafilland then you use describe16:41
replaceafillwith a different "global codes" combination16:41
replaceafilli'm looking at SectionMemberStatesStartup16:41
yvlthese "global codes" are hard-coded in application16:43
yvlas global variables in modules16:43
yvlACTIVE = 'a'16:43
yvlwhen users configure new "local" codes with some title to explain them16:44
yvlthey have a dropdown of "meaning"16:44
yvland that dropdown is basically a list of global codes16:44
yvlsince "i" is not very informative to the user16:44
yvlthere's the .describe16:44
yvldescribe("i", 'Inactive')16:45
yvlalso, I wrote it so that we must describe all possible permutations16:45
yvlso on16:45
yvlthere should not be a lot of them IMHO16:46
yvldescriptions are per-dictionary16:47
yvlACTIVE in student enrollment is "Enrolled"16:47
yvlACTIVE for asset leader is something different16:47
replaceafillgot it16:47
replaceafillsame global code16:47
replaceafilldifferent meaning16:47
yvlthe descriptions will be used in few places really16:48
yvlin dropdowns in School -> Membership States -> (edit some dictionary)16:48
yvlwhen you want to add a new code/title for example16:49
yvland in temporal relationship edit views16:49
yvllike edit section students16:49
yvlinstead of removing, we now have edit16:49
yvlthat shows a popup16:49
*** mibofra has quit IRC16:50
yvland if there are historical changes to that person in that section16:50
yvlthere's a table16:50
th1aOK... I'm going to have to go in 10 minutes, so maybe replaceafill should give me a quick report and then you guys can finish.16:50
replaceafillth1a, well i just worked on Telly's story at the end of last week16:51
replaceafilli'm able to convert the pdfs quicker now16:51
th1aI've not heard back from her, so just hold off on doing more on that.16:51
th1aIt is a good skill to have in the toolbox.16:51
replaceafilli guess it's a good time to start with the temporal work16:52
replaceafillsince i don't have much in the queue16:52
replaceafillthat's it i guess16:52
th1aOK, I'll try to nail David down to his needs and actual timeline.16:53
th1aI'm not going to drop everything until we know clearly what is going on.16:53
th1aWell, and even then not necessarily drop everything.16:53
replaceafilldo you want me to take a look at the current niepa branch?16:54
replaceafilli mean, try to make it start at least?16:54
th1aPoke at it a bit.16:54
replaceafillwill do16:54
th1aOK.  That should do it.16:55
th1aThanks guys.16:55
* th1a drops the bag of gravel.16:55
replaceafillthanks everybody16:55
replaceafillok yvl a few questions and i'll let you go :)16:56
yvlthanks th1a16:56
yvlsee you Mon :)16:56
yvlsure replaceafill16:56
replaceafillyou think we need a "levels" relationship for persons now?16:56
yvlno evolution, but with hackily ported contacts16:56
replaceafillor do you think we should handle it differently16:56
yvlI would say yes16:57
replaceafilli don't get the pending state for sections16:58
replaceafillso i don't see it for levels either16:58
*** mibofra has joined #schooltool16:58
yvlit's like pre-enrolled16:58
replaceafillit's like you're enrolled, but not quite yet....16:58
yvlnot sure if it's needed16:58
replaceafillyeah, i'm trying to think of the use case in a regular school16:59
replaceafillbut it doesn't hurt anyway16:59
yvlI can think of only one case actually16:59
yvlwhen you want to add a student in the future16:59
yvlyou set him enrolled in say Oct 1516:59
replaceafilllike for next year?16:59
yvland he is not active until Oct 1517:00
replaceafillgot it17:00
yvlbut if you don't know the date...17:00
replaceafilli keep forgetting the date handling part of this :D17:00
yvlit's a whole new dimension! :D17:00
replaceafillhow's that set btw?17:00
replaceafillthe date17:00
replaceafillfrom the on() method?17:00
yvlby default - today17:01
yvlso the good old17:01
yvl.add and .remove work17:01
*** basic` has quit IRC17:01
yvlrelationship links17:01
yvland relationship info17:01
yvl(when you iterate section.members.relationships for example)17:02
yvlhave .state17:02
yvlstate is accessed via....17:02
yvlso for temporal relationships it will give one thing17:02
yvlfor simple relationships - another17:02
replaceafillso suppose i want to iterate on section members that are... "enrolled" only17:02
yvlsame goes for relationship properties17:02
yvlso for setting... check the contact/browser/contact.py17:04
yvlof the branch I gave17:04
yvlsearch for self.relationship.state.set(17:04
yvlself.reationship is RelationshipInfo there17:04
yvlan alternative is:17:04
yvlIContactable(person).contacts.on(today).relate(some_contact, meaning=ACTIVE, code='a')17:05
yvlnow, on to your question :)17:05
yvlor list(section.members.on(today).any(ACTIVE))17:06
*** replaceafill has quit IRC17:07
*** mibofra has quit IRC17:07
*** basic` has joined #schooltool17:09
*** replaceafill has joined #schooltool17:12
replaceafillit took me 5 minutes to realize i had been disconnected...17:13
replaceafillyvl, what's the coded method for?17:14
*** mibofra has joined #schooltool17:14
replaceafillit's different from "meanings"17:14
*** mibofra has quit IRC17:14
replaceafillnever mind :D17:14
*** mibofra has joined #schooltool17:15
*** mibofra has joined #schooltool17:15
replaceafilland every filter method returns a new property back?17:16
yvlbtw, replaceafill17:16
replaceafillgot it17:17
* yvl is going home :)17:18
yvlunless more questions :)17:18
replaceafillyou were going to say something?17:19
yvland there may or may not be bugs17:19
replaceafill"btw, replaceafill"?17:19
yvllinks have shared state now17:19
yvland extra_info is moved there17:19
* replaceafill barely remembers what extra_info does17:20
yvlshared state is a dict, it is also catalloged17:20
yvlit's for storing data on a relationship link17:20
replaceafilllike the type of contact, right?17:21
replaceafillparent, guardian.../17:21
replaceafillgot it17:21
yvlnow most of it is moved to temporal relationships17:21
yvltype of contact also17:21
yvlbut if you need it in the future17:21
yvllook for methods that return SharedInfo17:21
yvlyou can use irelationshiplinks adapter to iter over links17:22
yvland do link.shared_state['special_school_data'] = 517:22
replaceafill    @property17:23
replaceafill    def extra_info(self):17:23
replaceafill        return self.shared_state['X']17:23
replaceafillis that 'X' on purpose?17:23
yvlshared_state is a dict17:23
yvlnow 'X' and 'tmp' are used17:24
yvl'X' for extra info17:24
yvl'tmp' for temporal states17:24
replaceafillah, just saw the assignment a few lines above17:24
replaceafillgot it17:24
replaceafillok, i'll experiment with the branch17:25
replaceafilland will try to do something with levels17:25
yvllemme know what you think17:25
yvlit may be messy17:25
replaceafillbased on the sections examples17:25
replaceafillthank you very much yvl17:25
replaceafillyou wont be around on wed?17:25
yvltoday is Monday17:26
yvlyes, I will be there17:26
yvlI thought today is Wed for some reason :S17:26
replaceafillok, thanks man17:26
replaceafillsee you wed17:26
yvlsee you soon17:26
*** menesis has quit IRC18:02
*** timatic has joined #schooltool20:50
th1areplaceafill: ayt?21:28
replaceafillth1a, i'm back22:06
th1aDid you get a chance to try starting David's server yet?22:07
replaceafillno, not yet22:07
*** menesis has joined #schooltool23:36

Generated by 2.15.1 by Marius Gedminas - find it at!