IRC log of #schooltool for Thursday, 2011-01-27

*** menesis has quit IRC01:39
*** alga has joined #schooltool01:40
*** alga has quit IRC02:59
*** yvl has joined #schooltool07:54
*** th1a has quit IRC08:00
*** replaceafill has quit IRC10:01
*** menesis has joined #schooltool11:10
*** ignas has joined #schooltool11:23
aelkner_yvl, ayt?12:13
yvlaelkner_, here!12:41
yvlwas away to lunch12:42
aelkner_i just read your response, and i have a couple of comments12:42
aelkner_first, i think you are confusing the word reference and request12:43
aelkner_Manage->Reports brings up a app context view that list all reports in the system12:43
aelkner_you can't request reports there12:43
aelkner_the context is app12:43
yvlI understand that12:43
aelkner_One adapter to define the link in Manage->Reports.  Another to define the link in a reference view.12:44
aelkner_that sonds like you are saying they are two different things when they are in fact on in the same12:44
yvlmy point was - that they are not12:45
aelkner_so Manage->Reprots is not the reference view12:46
aelkner_what is it then, the request view12:46
aelkner_that would be impossible12:46
yvlthe system should not care12:46
aelkner_let's not get overly abstract12:46
aelkner_i'm not a system, i'm a person12:46
yvlok12:46
yvl...12:47
aelkner_and i need to define terms in a way that i can know that i'm talking about the same thing as someone else12:47
aelkner_so12:47
aelkner_Manage->Reports brings up a reference view12:47
yvlok12:47
aelkner_the links in the table will not request any reports, they can't12:47
aelkner_they will take the user to a context view, depending on the type of report12:48
aelkner_there the user can find the obnject12:48
yvland what do you call the other views?12:48
aelkner_once a schooltool or term or section or person is the actual context12:48
yvllemme find an example...12:48
aelkner_there will be a Reprots action link12:49
aelkner_that brings p the report request view12:49
yvlah, ok then12:49
aelkner_listing links for requesting the various reports for that context12:49
yvlmy point was, that for the link collection mechanism12:50
yvlthey are same views12:50
yvlsources of links12:50
yvlto something that you can get reports from12:50
aelkner_no, the links are different in the two different cases12:51
yvlbut mechanism is the same12:51
yvlthe links are indeed different12:51
aelkner_ok, for each report, i need the following12:52
aelkner_1) a title to display in the reference view12:52
aelkner_2) a description for the reference view12:52
aelkner_3) a context type (human readable) for the reference view12:52
aelkner_4) a url that is the same for all of the above three in the particlar row of the table12:53
aelkner_then, additionally, for the request view, i need:12:54
aelkner_1) the same title for the link text12:54
aelkner_2) the link url for requesting the report12:54
aelkner_couldn't one adapter provide 1-4, then 212:55
aelkner_and the two different views would be interested in different things12:55
aelkner_so, for the reference view, the adapter lookup would get all adapters12:56
aelkner_regardless of what they adapt, to get all reports in the system12:56
aelkner_but the report request view would only get the adatpers for the given context12:56
aelkner_does that make sense?12:56
yvl[thinking]12:58
aelkner_btw, perhaps 1) from section two could be a differerent lin k text12:59
aelkner_like, "Request Failure Report" in the request view13:00
aelkner_but "Failure Report" in the reference view13:00
aelkner_or just "Failures" as report is redundant13:01
yvlso, you want 1-4 for one context, and 5-6 for other context13:01
yvlall mashed up in one adapter on the first context?13:01
aelkner_the app context is not a relevant context13:01
aelkner_so i'm not sure what you mean13:01
yvl[a]13:02
yvl[thinking again ;) ]13:02
yvlhow do you plan to deal with multiple school years?13:04
aelkner_i don't13:04
yvlok13:05
yvlwell then13:05
aelkner_how do you mean?13:05
yvlfailures by term in 3 years13:05
yvlwhat links should show app in Manage->Reports?13:05
aelkner_show app?13:05
yvl"show in Manage Reports"13:06
yvlsorry :)13:06
aelkner_think Mnage->persons13:06
yvl"show up in Manage Reports"13:06
aelkner_it's a table view13:06
aelkner_multiple columns13:06
yvlno13:06
yvlI am asking13:06
yvlManage->Reports13:06
yvlabsences by day13:07
yvlor any other per-year report13:07
aelkner_every report in the system, period13:07
yvlhow do you access reports of previous years?13:07
yvldefine every report in the system13:07
aelkner_ok, you're assuming something that is clouding your view here13:08
yvlfrankly, I don't think that my view is clouded at all13:08
aelkner_Manage->Reports has as it's link:13:08
yvlin this case13:08
aelkner_localhost:7080/reports.html13:08
aelkner_note the app context13:08
aelkner_that view list every report in the system, all context types13:09
aelkner_reports for schoolyear, term, section, person13:09
aelkner_all of them13:09
aelkner_one row per report13:09
aelkner_three columns, title, description, context type13:09
aelkner_all three cells have the same url13:09
yvlok13:09
yvldefine again every report in the system13:10
yvlis it every type of report in the system13:10
yvlor every generatable report in the system13:10
aelkner_?13:10
yvllook13:10
yvlsay person13:10
yvlhas a gradebook13:10
yvland say, he can print his report13:11
yvla simple student13:11
yvlwants to print a report of his grades13:11
yvlnow13:11
yvl"report grades for 2011" -> a report type13:11
aelkner_no, no13:11
aelkner_way off13:11
aelkner_look, ther is only one gradebook report13:11
aelkner_you have to navigate to the gradebook itself to request it13:12
aelkner_but in the reference view13:12
aelkner_it wold be list once as a gradebook report13:12
aelkner_climing on it would take the user to the gradebook13:12
yvlwhich one?13:12
yvl2010, 2011?13:12
yvlwich gradebook?13:12
aelkner_you hit the Gradebook tab, whta do you get?13:12
yvlso, no historical data13:12
yvlI see.13:13
aelkner_yeah, i never said anything of the sort13:13
yvlok13:13
yvlso, you want to simply list 10 or so links13:13
aelkner_tom wants the user to be able to see what kind of reports exist, plain and simple13:13
aelkner_10 or so rows13:13
aelkner_three links per row13:13
yvlseriously13:13
yvlhard-code them13:13
yvlno utilities, no nothing13:14
yvlat best13:14
yvluse viewlets13:14
aelkner_missing the point again13:14
aelkner_the idea is to have a view that knows what reports exist without knwoing they exist13:14
aelkner_it knows becuase they are registered13:14
yvlfirst13:14
yvlseriously13:15
yvlread what viewlets are13:15
yvlsecond13:15
yvlI stand by with what I suggested13:15
yvlin the email13:15
yvlthe thing you think is the same - it's not the same13:15
yvland yes13:15
yvlthere are two contexts13:15
yvland yes, one of them is app13:15
aelkner_i know what viewlets are13:16
yvlah, ok good :)13:16
aelkner_there is the viewlet manager13:16
yvlno, I believe you13:16
aelkner_and the viewlets that are registered against them13:16
yvljust didn't seem so from the context13:16
yvlmy mistake13:17
yvlapologies13:17
aelkner_that's ok13:17
aelkner_i just don't see why i would want to create a viewlet manager to make a table view13:17
aelkner_it's over-engineering13:18
aelkner_table views are complex enough13:18
aelkner_so i can write one using the person container view as an example13:18
aelkner_and the view would need to look up all registered reports in order to create the data source13:18
yvlwell13:19
yvlit'll probably be best to leave the details to you13:19
yvljust don't do if interface.providedBy13:19
yvlanywhere13:19
aelkner_why not?13:19
yvlbecause I said so13:20
aelkner_is zope deprecated thgat feature?13:20
yvlyou need explicit permission from me :)13:20
yvlfor the code to get merged :)13:20
aelkner_why provide the methid if it isn't to be used?13:20
* yvl takes the dictator-something batton13:20
yvllook13:20
yvlin the case you described13:20
yvlit's a clear design flaw13:21
yvldon't do that13:21
yvlthere are exceptions13:21
yvlwhere hacks are appropriate13:21
yvland that's why it is there13:21
yvlalso - legacy13:21
yvlI don't like hacks in core13:21
yvlmakes things icky to maintain13:22
yvlthen again13:23
yvlthe release is near13:23
yvlso whatever13:23
aelkner_yeah, well i am trying to get something done in that short time13:23
aelkner_but i think i see your general desire to use adapters rather than pvovidedBy13:24
aelkner_and where i see added complexity with tons of adapters, you see tranquility13:24
aelkner_god help me if i don't know why something is working because zeop doesn't tell you why an adapter lookup fails13:25
aelkner_it just fails13:25
aelkner_at least when i write code that tests things myself, i can pdb trace and see what happened13:25
aelkner_zope adapters are very hostile when they don't work13:25
aelkner_example, AppInit13:26
aelkner_if the code fails, nothing happens13:26
aelkner_you don't get an exception or something that tells you what went wrong13:26
aelkner_just nothing13:27
aelkner_because exceptions while adapting mean you can't adapt13:27
aelkner_it's very hostile13:27
aelkner_so while i recognize that we need adpaters13:28
aelkner_i don't rush out to create ten thousand of them13:28
aelkner_but i know that zope is like a religion for you guys a POV13:28
aelkner_anyway, if you are going to reject code that has providedBy, i'll just have to write the stupid adapters13:29
aelkner_btw, i don't mean to sound hostile myself, just expressing my own opinion, for what it's worth13:32
aelkner_yvl, i hope i haven't driven you away, throwing your hands up13:33
aelkner_this report reference view is complicated with the table and filtering and all13:34
aelkner_i was hoping that we could agree on what to do there13:35
yvlI went to smoke ;)13:35
yvland went out a bit ;)13:35
aelkner_and i could use you help with the table view13:35
yvlby the way, AppInit silent failures are on my ever-so-inifinite TODO list13:36
yvlit's a bug13:36
yvlthing is13:36
yvlthat when you write ifs13:36
yvlyou are mimicking the way the adapters work13:36
aelkner_yeah, but with no magic13:37
aelkner_i can see it13:37
yvlI understand13:37
yvlI saw same reaction in good ol' C++ days13:37
yvlyou know13:39
yvlyou could write the first implementation whatever way you feel comfortable with13:40
yvlI can bake some magic later on13:40
yvlso that people could extend that logic13:40
yvlbut still13:41
yvlit's not a religion thing13:41
aelkner_yeah, well i admit that was harsh13:41
yvlfrankly, I find it hard to explain via IRC13:42
aelkner_another thing for the sprint13:42
aelkner_tom jokes that i say that about everything13:42
yvl;)13:42
aelkner_as a practical matter, how would you suggest i write the table view13:42
aelkner_what example table view would have a formatter that is similar to what i need to write?13:43
yvl[looking for it]13:45
aelkner_i mean, table formatters always need containers, right?13:45
aelkner_perhaps i should just write the view using my own page template and forget the complexities of TAbleFormatter13:46
aelkner_i could have the text box and the drop-down for filtering, and have a <table> in my template13:47
yvlprobably that would be for the best13:47
aelkner_sometimes writing a template is easier than trying to use the magic stuff that turns out to fail for a magic reason13:47
yvlI doubt you need batching and other features13:47
aelkner_right13:48
yvland speed is probably not an issue13:48
yvlalso, no catalogs to speak of for report links13:48
aelkner_right, more magic needed13:48
yvlyes, table formatter would be overkill13:48
aelkner_so for now schooltool.gradebook has about ten reports, like you said13:49
aelkner_so he view would be short13:49
yvl(I mentioned catalogs as a speedup for containers and a benefit of using table formatter - and you don't need speedup here)13:49
aelkner_but what if the system grew in the next couple years13:49
aelkner_and we eneded up with 100 reports13:50
yvlthen we remade the view to use batched tables13:50
aelkner_ok, so i don't worry about it for now13:50
aelkner_do i even need to have filtering?13:50
yvland report groups might be not enough by then13:50
yvlsubgroups might get introduced, or something13:50
aelkner_i'm not sure why you say report groups13:50
yvl(frankly, I think grouping is enough)13:50
aelkner_i keep saying context type13:51
aelkner_you say group13:51
aelkner_are we talking about the same thing13:51
yvlcontext type -> Basic Person13:51
yvlgroup -> human readable type13:51
yvlthat was another point in my email13:51
yvlhuman readable types != context types13:51
aelkner_lke student versus teacher13:51
yvla sad thing I found out when writing security descriptions :)13:52
aelkner_but still, group is already a schooltool concept13:52
aelkner_so i don't lke reusing it for this13:52
aelkner_report type?13:52
yvlI already did :)))13:52
yvlin schooltool/security/*13:53
yvlyou can name it type13:53
yvlor category13:53
aelkner_ok, type it is13:53
aelkner_now as far as the registration13:54
aelkner_i would like to only have to register one adapter for each report13:54
yvl(now I suddenly started leaning towards "category") :))))))13:54
aelkner_category is ok13:54
aelkner_now, getting back to the registration/lookup13:55
aelkner_each report should only need to be registered once13:55
aelkner_with all the info needed by either view13:55
yvlthat I don't like13:55
yvlwhen you sit in Manage->Reports13:55
yvlyou have traversed as far as SchoolToolApplication13:56
yvland you have your request13:56
yvlyou can look up an object13:56
yvlsay school year13:56
yvlfrom the data model13:56
yvland you can get it's absolute url13:56
yvlas in - the way to traverse to it13:56
aelkner_yes, for all schoolyear reports, the urls wold be for the active schoolyear13:57
yvland you can be bold and append "/request_reports.html"13:57
yvlnow13:57
aelkner_well for the schoolyear perhaps13:57
yvlwhen you get to the view, you never know what class it uses13:57
yvlor anything13:57
aelkner_but not for a term13:57
yvlit might be skinned13:58
aelkner_what class?13:58
yvlthe view class13:58
aelkner_what view class what uses?13:58
yvlyou expect it to be your TermRequestReportView13:58
aelkner_no13:58
aelkner_you keep trying to do that13:58
yvllocalhost/.../2011/request_reports.html13:58
yvlyou never, ever know what's there13:59
aelkner_we can't go directly to a report request view from the reference view13:59
yvlmight be an empty page13:59
yvlok13:59
yvlyou go to the page13:59
yvlthe reference view is there13:59
yvlor maybe it's not!14:00
yvlyou never know that14:00
aelkner_why would the reference view not be there?14:00
yvlsomebody removed it14:00
yvlsomebody skinned it14:00
aelkner_fine take away the feature, what do we care?14:00
aelkner_i don't see why they would want to remove the reports reference view for administrators14:01
aelkner_but even if they did, what harm?14:01
yvlok14:02
yvllet me put it this way14:02
yvlit doesn't matter that much to me now14:02
yvlit's wrong in my opinion to do it in a single adapter14:02
yvlbut it would be a very long discussion to prove it14:02
yvlsimply because it is really hard to explain things14:02
yvlthat are very obvious to you14:03
yvlso you can do it either way14:03
yvlif you feel that having one adapter is easier to get things done14:04
yvlgo for it :)14:04
aelkner_it's not about easy to get things done14:04
aelkner_it's ore about not making it overly complex forthe writer of the report to register it14:04
yvlthat we can fix14:04
yvlwe can write zcml directives14:05
yvlwe can write helper methods14:05
yvlthere is freedom in that14:05
yvlI really think I'll cook up some directive at some point :)14:05
yvl<schooltool:report />14:06
yvlor maybe something else14:06
yvlbut logically - those two adapters are separate for me14:06
yvlthey work on different contexts14:06
yvlthey work on different views14:06
aelkner_adn teh idea would be that one directive would be enough for each report?14:06
yvlthey share nothing14:06
yvlin the end - of course14:07
yvlwell, using common sense14:07
aelkner_and the meat code would register both adapters?14:07
yvlif we see that it takes a bazillion parameters, maybe there will be two :)14:07
aelkner_meat14:07
aelkner_meta14:07
aelkner_i can't type in the right order14:07
yvl:)))14:08
aelkner_am i right, though?14:08
yvlyes14:08
yvlI can't promise you that14:08
yvlI'm not a politician ;)14:08
aelkner_ok, so i'll agree to create two adapters14:08
yvlbut that's my intent14:08
aelkner_on that adapts app so that the lookup returns all reports14:08
aelkner_the other that adapts the actual context so that i can find the reports for the request view14:09
aelkner_i'll have to register both, but eventually we'll replace them wth the directive, right?14:10
yvlit is very likely14:10
yvlI hate when you have to write myriads of zcml directives14:10
yvlit's a bad style :)14:10
yvlwe will definitely bring this topic up in the sprint :)14:11
aelkner_sure :)14:11
yvlthe report topic14:11
yvlI was tossing with several ideas last year14:11
yvlso we might come up with something interesting14:12
yvlfor example...14:12
yvlwhat if the report page would be a special directive14:12
yvlall pages know interfaces that they are built for14:12
yvlwhat if... we used catalogs of objects for quick lookup of all possible pdfs in the system...14:13
yvlor something along the lines14:13
yvlthat would be interesting to search through14:14
aelkner_catalogs of what objects?14:14
yvlall objects in the system14:15
yvlpersons, schoolyears, everything :)14:15
aelkner_use a catalog of oersons to find person reports?14:15
yvluse a super-catalog-of-everything14:16
yvlpersons+schoolyears+groups+sections+crouses, etc.14:16
aelkner_i see, sounds complex14:17
yvlit's a long shot :)14:17
yvlwell, we'll see :)14:17
aelkner_ok, to summaraize, and then i need to try to sleep again:14:17
aelkner_for each report, i will register two adapters14:18
aelkner_1) for the context of the report that has the url and link text for the report request view14:18
aelkner_2) for ISchooltoolApplication that has the title, description, category and link for all three urls14:19
yvlumm14:19
yvlI suggest you re-use the IReportLink in both cases14:20
yvlwith title/description/category/url14:20
yvlthen you can re-use the Manage->Reports view for all request views14:21
aelkner_???14:21
aelkner_why do you keep wanting to merge the reference and the request views14:21
yvlhmm, you know14:22
aelkner_the concepts are completely separate14:22
aelkner_you can't reuse one view for the other14:22
yvlbetter use one adapter for now14:22
aelkner_hugh?!14:22
aelkner_no you're changing that idea back to what i suggested earlier?14:22
yvlI still want to merge reference and request views because they are identical14:23
yvlor will be in the future14:23
yvllikely14:23
aelkner_look, i got to get something done here14:23
yvlok then14:24
yvl<aelkner_> for each report, i will register two adapters14:24
yvlthis14:24
aelkner_so i have to have a simple definition of the task14:24
yvlbut both implement same IReportLink14:24
aelkner_the reference view is not a request view14:24
yvlright, sorry for doing this to you in the middle of the night14:24
yvldo not merge the views14:24
yvlbut keep same IReportLink interface14:24
aelkner_what does it have in it?14:25
yvlif you don't like it, make two interfaces14:25
aelkner_your email does not cover both cases14:25
yvlit does, and it implies merger of request and reference views -- but I went too far there14:26
aelkner_i would prefer IReportRequest and IReportRerefence14:26
yvlok14:26
yvlthat's fine :)14:26
aelkner_the first has link text and url14:26
aelkner_the second title, description, category and url for all three links in the row14:26
aelkner_it's still an html table, just not a table formatter table14:27
yvlyep14:27
aelkner_so IReportRequest will be registered fot the context and IReportRerefence for app14:28
aelkner_sound right?14:28
yvlyes :)14:28
aelkner_yay!14:28
yvl;)))))14:28
aelkner_btw, before i go, one last thing14:28
aelkner_the idea is to move the Reports action link registrations for the various contexts out of schooltool.grabook14:29
aelkner_and put them in schooltool.report14:29
aelkner_one action link registration per context type14:29
aelkner_the lnk would be the same in all cases, '/request_report.html'14:30
aelkner_i could have one view class that i reuse for all the contexts14:30
aelkner_and it can use the adpater fo self.context to get the report links14:31
yvlyes14:32
yvlthe zcml should be in gradebook14:32
yvlbecause registers gradebooky things14:32
aelkner_what i want to do is remove all of the zcml and view calsses from gradebook14:32
yvlbut the view class implementation should be reused from schooltool.report14:32
aelkner_and move them to schooltool.report14:33
yvlno14:33
aelkner_the idea is that not only schooltool.gradebook14:33
aelkner_but any package that wants to define a report need only define it and register the adapter14:33
yvlah, then yes14:33
aelkner_schooltool.report will be in change of registering the zcml for the action links and view classes, yes?14:34
yvlI misunderstood what classes you wanted to move to schooltool.report :)14:34
aelkner_oh, ok14:34
yvlzcml that registers gradebook-related action links will be in gradebook14:34
aelkner_what gradebook-related action links?14:35
aelkner_you're confusing me again14:36
yvlfor example - student reports14:36
yvlyou can only make student reports if you have a gradebook14:37
yvlso - zcml that registers the student reports is written in gradebook14:37
aelkner_oh, the pdf view classes them selves you speak of, rght?14:37
yvlthe pdf view classes14:38
yvland the adapters to IReportRequest and IReportReference14:38
aelkner_and that's it14:38
yvlthat point to those classes14:38
yvlyes14:38
aelkner_cool, we're on the same page14:38
yvlcool :)14:38
aelkner_ok, i will try to sleep now14:39
aelkner_thanks for you input14:39
yvlgood night aelkner_14:39
yvlsorry for the fuss :)14:39
aelkner_quite alright, we can always cut threw to the best solution14:39
aelkner_did i just spell through as threw?!!!14:40
aelkner_i AM tired14:40
aelkner_anyway, zzzzzzzzzzzzzzzzzzzzzzzzzzz14:40
yvlgood zzzzzzzzz to you then ;)))14:42
*** yvl has quit IRC15:45
*** replaceafill has joined #schooltool16:42
*** ignas has quit IRC16:44
*** th1a has joined #schooltool16:46
replaceafillaelkner_, zyt?17:27
*** ignas has joined #schooltool18:10
*** ignas has quit IRC18:55
aelkner_replaceafill, hey20:44
replaceafillhey aelkner_20:54
replaceafilli've been digging more and more in the gradebook, and i realized why you used key.startwith(...)20:55
replaceafill(Pdb) root.deployed.keys()20:57
replaceafill[u'2005-2006_spring', u'2005-2006_spring-2']20:57
replaceafillboth of them have to be deployed in new sections, and the key is '2005-2006', 'spring'20:58
replaceafillhowever this method breaks when you have terms that have similar names: quarter, quarter-2, quarter-3, etc20:59
replaceafillwe would have deployed report sheets with ids like:21:00
replaceafillu'2005-2006_quarter', u'2005-2006_quarter-2', u'2005-2006_quarter-2-2'....21:00
replaceafillgood luck splitting by ('_') :(21:00
*** th1a has quit IRC22:06
*** th1a has joined #schooltool22:06
*** fsufitch has joined #schooltool23:46

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