/srv/irclogs.ubuntu.com/2009/03/11/#launchpad-meeting.txt

=== salgado is now known as salgado-afk
=== mrevell is now known as mrevell-lunch
=== mrevell-lunch is now known as mrevell
barry#startmeeting14:00
MootBotMeeting started at 09:00. The chair is barry.14:00
MootBotCommands Available: [TOPIC], [IDEA], [ACTION], [AGREED], [LINK], [VOTE]14:00
barryhello everyone and welcome to this week's ameu reviewer's meeting.  who's here today?14:00
gmbme14:00
gary_posterme14:00
sinzuima14:00
sinzuima14:00
marsme14:00
gary_poster:-)14:00
sinzuiwhere is my e14:00
sinzuime14:00
noodles775moi14:00
allenapme14:00
marsnoodles775, you need to step one country to the right14:01
noodles775mars: ah, wrong one... :/14:01
barrybac: ping14:01
bacargh14:01
bacme14:01
barrybigjools, cprov, danilo_ ping14:01
barryintellectronica: ping14:02
intellectronicame14:02
barryrockstar: ping14:02
barrysalgado: ping14:02
salgadome!14:02
barrytoday's a light day, so let's start off with the fun stuff14:02
cprovme14:02
flacosteme14:02
barry[TOPIC] agenda14:03
MootBotNew Topic:  agenda14:03
barry * Roll call14:03
barry * Peanut gallery (anything not on the agenda)14:03
barry * Mentoring update14:03
barry * Action items14:03
barry[TOPIC]  * Peanut gallery (anything not on the agenda)14:03
MootBotNew Topic:   * Peanut gallery (anything not on the agenda)14:03
danilo_me14:03
=== danilo_ is now known as danilos
barrydoes anybody have any reviewy type stuff they want to bring up that's not on the agenda?14:03
sinzuime14:03
barrysinzui: the floor is yours14:04
sinzuibac discovered that there were a few places in our templates where we were making insane links.14:04
sinzuiBad14:04
sinzui    <a tal:content="structure person/fmt:link" />14:04
sinzui    becomes14:04
sinzui    <a><a href="...">text</a></a>14:04
sinzuiGood14:04
sinzui    <a tal:replace="structure person/fmt:link" />14:04
sinzui    becomes14:04
sinzui    <a href="...">text</a>14:04
sinzuiWhen reviewing tal, please verify anything that uses `structure` works in the containing elements.14:04
barrythat's wacky14:05
marssinzui, would html-tidy catch that?14:05
sinzuimars yes14:05
gary_posterafter rendering, yes, but not before rendering (in our templates)14:06
marsyep, of course14:06
sinzuimars: any HTML validator can see that is not permitted14:06
marsnot that we have any good or automated way to run said validator...14:06
baci have a branch that attempt to ferret them all out.  even our 'featured projects' listing on the front page had the problem.14:06
flacostegood catch sinzui and bac14:07
barrybac: by visual inspection or through some tool?14:08
bacwell, when sinzui says "bac discovered" he means "bac repeated the problem flagrantly" such that sinzui discovered it.14:08
marswhat if we made the doctest runner do HTML validation on page open?14:08
gary_poster:-)14:08
bacbarry: just grep and examing them all14:08
sinzuibarry 'content="structure .*link' catches most of them14:09
barrymars: interesting idea, but i'm affraid it would slow things down alot14:09
sinzuiof course we can write tal on multiple lines14:09
gary_poster[blue sky] we could have a nightly buildbot for what mars suggests14:10
marsbarry, we could bind it to 'make check'14:10
sinzuimars: too slow, as is updating find_main_content14:10
marsbarry, since we'll have to do so for windmill tests anyway14:10
marswhich are even slower14:10
sinzuiOur link checker could take on the extra work. or...14:11
barrymars: yeah14:11
marssinzui, yes, that's another good hook point14:11
sinzui    >>> view = create_initialized_view(person, '+index', principle=person)14:11
sinzui    >>> is_valid_html(view.render())14:11
sinzui    True14:11
marssinzui, but the link-checker isn't under developer control14:11
marsis it?14:11
bacgary_poster: +1  -- a periodic scan should be enough to trap infrequent offenders14:12
marsat least I could do ./test.py --validate-markup or something14:12
barrysinzui: i think i like that approach best.  cons: it's up to the dev to add the check, pros: you can decide to check only when you think it's necessary14:13
barrydoes someone want to take this on as an action item?14:14
flacostei think the buldbot story is better14:14
flacostehere14:14
baccons: it slows down our tests14:14
flacostedoesn't slow down the test suite14:14
flacosteit's not a big problem14:14
flacostei mean this has been broken for long and didn't cause any problems14:15
flacosteinvalid markup is ugly, but not a show-stoppers14:15
flacostethanks to the way browsers are implemented14:15
barrywe don't need to solve it here, but i'd like someone to own it and offer some options14:15
marsflacoste, does our build process have provisions or the concept of warnings?14:15
flacosteit sounds like a foundations issue14:15
flacostebut it would be a very low priority to me14:15
flacosteso no point putting it down as an actino14:16
barryflacoste: okay14:16
barrythanks.  any other topics not on the agenda?14:16
barry[TOPIC] mentoring update14:18
MootBotNew Topic:  mentoring update14:18
barryany mentor or mentat updates today?14:18
rockstarme14:18
=== ursula_ is now known as ghost
=== ghost is now known as Ursinha
barryrockstar: you don't have a mentoring update, right?14:19
rockstarNo, I'm just screwed by DST again.14:19
barry[TOPIC] action items14:19
MootBotNew Topic:  action items14:19
barry * gary to add `getStore()` as an alias for `_get_store()`14:20
barrygary_poster: ^^14:20
flacostebarry: i still suck at mine, but do keep it open, i plan to suck less14:21
flacostesee, i'm pro-active :-)14:21
barryflacoste: that's a start! :)14:21
barry * gary will check to see if there's a bug open for adding a hook to `bzr send`, and submit one if there isn't14:21
barrygary_poster: ^^14:21
barry * bigjools to take crack at helper functions for backpatching schemas to avoid circular imports14:22
barry * barry to add `field_id` to coding guideline14:22
barry * barry to update guidelines to never call `_foo()` methods from outside a class14:22
barry * barry to add `pretty()` functions to reviewers docs14:22
barryi actually do NOT suck today!  i did all three of these :)14:22
bigjoolsgoddamn it and the time changes14:23
* bigjools sucks at helper functions AND timekeeping14:23
barryno worries14:24
barryanyway, that's all i have today.  anything else going on?14:24
barry514:24
rockstarI have something14:25
barryrockstar: go ahead14:25
rockstarIt looks like sinzui already quoted to code above...14:25
rockstarI was reviewing a branch of sinzui's where he was using a doctest to test a view's API.14:25
rockstarNow, I understand that our team has an unusual fetish for doctests, but I think that if we're doing something where we can use unittests, we should use them.14:26
flacostehmm14:27
* mars sees the testing debate from the ML creeping in...14:27
flacostethat's a controversial topic14:27
flacosterockstar: what are the arguments?14:27
barryi might make the counter argument :)14:27
flacosteyeah14:28
sinzuiShall we wall read the 2008 June, July debate.14:28
rockstardoctests are good for telling a user story, but if we're just testing the methods of a view, why not use what unittests for what they were made for?14:28
sinzuiI believe thumper wanted a paintball battle to decide the matter14:28
flacostelol14:28
barrysinzui: M-x paintball14:28
flacosterockstar: we have usually refrained from enforcing a policy there14:28
flacostelet developers choose which technology they prefer here14:28
barryflacoste: right.  i think that still works as a policy14:29
rockstarflacoste, and I think that leads to a mess.14:29
intellectronicai think that unless we lose coverage because of that, we should allow teams to choose what format they prefer14:29
intellectronicafor individuals to choose is already a bit extreme14:29
rockstarIf I change a view, I can't easily discern where the hell the test is that I need to edit.14:29
rockstarIs it it doc?  Is it in browser/tests?14:30
sinzuiI'm agnostic on the issue. Since all the registry view tests are in doctest, I wan to add to them instead of storing two kinds of tests in two areas14:30
barryrockstar: conversely without a doctest if i'm trying to learn how a view works, it's much more difficult to discern that from its docstrings and unittest14:30
rockstarbarry, why can't you look at the unittest?  You'll be doing essentially the same thing.14:30
sinzuirockstar: doctests do not normally explain WHY the view does soemthing14:31
barryrockstar: unittests lack the narrative that sets the context of the api14:31
marsright14:31
flacosterockstar finding the tests is different than the format14:31
bigjoolsunittests are superior ways of testing, I'm pretty tired of having a doctest halt when one of its tests fails14:31
barrythe "ties it all together" bits14:31
flacosteit should be browser/tests14:31
flacostewhatever the format14:31
flacosteunless it's an API description14:32
flacosteand even then14:32
flacostei'm starting the Launchpad-tree-apocalypse today14:32
bigjools /o\14:32
* sinzui hand flacoste the fuel and a torch14:32
rockstarI think mixing and matching tests is going to bite us one of these days.14:32
flacostethat will makes things clearer for finding stuff and tests14:32
flacostefor answers14:32
flacosteand registry will they their apocalyspe next week14:32
flacostegary_poster, zope has a lot of experience in that area14:33
* sinzui is bringing marshmallows.14:33
flacosteanything to share here?14:33
rockstarAnytime you say "In this folder, you might find unittests or doctests" it makes me think that one or the other is being misused.14:33
gary_poster_flacoste: sorry, having connectivity issues and buildbot issues simultaneously14:34
barryrockstar: personally, i'd like to see doctests in a 'docs' directory14:34
barrysanitizing our testing infrastructure is definitely on the list of monsters to pitchfork14:34
rockstarbarry, personally, I'd like to see the doctests use testbrowser to tell a user story, or unittests to test a unit.14:35
flacostebarry: well, if it's docs, it belongs in a docs directory14:35
flacostebut many doctest are not docs14:36
barryrockstar: what about documentation for internal components and subsystems?14:36
intellectronicarockstar: do you never use the doctests to learn about functionality? i often do, and i think that if we don't have doctests, we won't have documentation at all14:36
barryflacoste: yes, that's a problem :)14:36
flacostedocs is about API description14:36
flacostewell, it's not14:36
rockstarflacoste, isn't that the benefit of doctests?  They are docs AND they are tests?14:36
sinzuirockstar: model/components need to be doctests because their are the develop documentation.14:36
flacostewell14:36
flacostei don't think a view is an API14:36
flacosteinteresting to document14:36
flacostemost of them aren't14:36
flacostea few might be14:36
flacostebut they are the exception14:36
rockstarflacoste, a view has an API.14:37
flacostewell, not really14:37
flacostethe only API is __call__14:37
flacostewhich renders the view14:37
flacostethat's it14:37
marsflacoste, and the properties14:37
flacosteno14:37
rockstarintellectronica, I look at unittests all the time to learn about functionality.14:37
flacostewell, maybe14:37
barryrockstar: i'm thinking about the multistep view i just refactored.  i think documentation for it is essential so that others can understand how to reuse it.14:37
flacostei would argue that the properties are internal implementation details14:38
gary_poster_My thoughts on this: (1) doctest for unittest purpose is emacs vs. vi IMO/IME.  I think that using doctest for unittest purposes works well.  Other people disagree.  I tend to find that people think about these things differently.  I can acknowledge the points people make (like bigjools, IRT doctests failing at the beginning) but I prefer doctests.14:38
gary_poster_(2) I would much prefer it if our tests were closer to the pertinent code14:38
flacostei agree with both points14:38
gary_poster_that appears to be (part of) the topic I lost while I was dealing with various issues14:38
rockstargary_poster, +1 on (2)14:38
flacosteand my apocalyspe branch will improve 214:38
marsflacoste, rockstar, maybe reorganize the tree, and wait and see?14:39
* flacoste can't spell apocalypse14:39
marsyou can run more experiments, say with the view tests, after14:39
barryflacoste: maybe that should be apocalisp?14:39
flacostelol14:39
gary_poster_:-)14:39
marsa smaller sandbox will make experimenting on a per-team basis easier14:39
rockstarmars, I don't think that's the answer.14:39
sinzuimars: I think teams have already made their decision14:39
bigjoolsI see doctests primarily as documentation that carry examples, it's easy to abuse them to be full-blown tests14:40
barrymars: yes, and it will make things much more discoverable and comprehensible14:40
rockstarThe per-team thing just makes things messier. That's why it's good to have cross-team-reviews14:40
sinzuiI think that teams that will not release their code are using unittests.14:40
rockstarsinzui, :(14:40
=== gary_poster_ is now known as gary_poster
intellectronicarockstar: well, not really per-team. what i meant, at least, is that the division should be thematic, not personal14:41
barryi think it's just too controversial to mandate at this point.  i agree with gary that it feels like mandating vi or emacs14:41
rockstarintellectronica, depending on the "theme" I agree with you.14:41
bacperhaps emacs users could use doctests...14:41
gary_poster:-)14:41
barryi personally think that both doctests and unittests have their place, both have positives... and negatives14:42
rockstarbarry, I don't see why.  I think they serve two different purposes.  It's like mandating motor oil v. beer.14:42
marsrockstar, yuck14:42
gary_posterrockstar: right, but...other people disagree with you :-)14:42
gary_posterthat's the point14:42
barryrockstar: is that: unittests are greasy and icky but good for your motor, while doctests are fun, festive and easy to consume?14:42
sinzuiI think the crucial point that rockstar is making is that to test a class of problems, we should use one kind of test so that we know where and how to test it.14:42
cprovbarry: lol14:43
rockstarsinzui, yes!  Thank you!14:43
sinzuiMy concern is that if I switch to unittest, I then have lots of tests in doctest14:43
sinzuiinsert old in the above sentece somewhere14:43
bigjoolsdo we agree that doctests are not tests, they're documentation?14:43
gary_posterno14:44
rockstarbigjools, no14:44
gmbnot as we use them atm.14:44
barryno14:44
cprovno14:44
flacostedoctests are tests14:44
bigjoolsbecause I remember a mail thread from 2 years ago14:44
barryit's not either or. doctests are documentation /first/ but they are tests too14:44
rockstarI think doctests are great at telling a story about a user experience, and asserting that the story actually works with code.14:44
bigjoolsthat said they are not tests14:44
flacostebarry: i would even argue that some doctests are not even doc first and that's fine too14:44
bigjoolsand that writing words like "should" are not acceptable14:44
barrys/user experience/developer experience/14:44
intellectronicadoctests CAN be tests. unit tests CAN'T be documentation14:45
* noodles775 suddenly realizes why the email discussion the other day stopped so quickly...14:45
bigjoolsbarry: right, testable documentation14:45
barryintellectronica: i agree with that statement (flacoste's too)14:45
rockstarbarry, why would there need to be a story about developer experience.  "The developer can instantiate this class, and then you have these functions..."14:45
gmbThe problem comes with - to pick an example at random - things like doc/externalbugtracker-comment-pushing.txt14:45
gmbIn which we create a load of mock objects in the doctest in order to be able to run the tests.14:46
gmbThat seems unit-testy.14:46
sinzuibigjools: s/should/can|expected|required/14:46
barryrockstar: ever tried to understand how a class is supposed to be used by pydoctor api reference?  it sucks.  unittests are the same14:46
bigjoolssinzui: "will"14:46
intellectronicagmb: actually, i think that's a good example to the contrary. as someone who doesn't know that system as good as you, i really benefit from having documentation whenever i need to work on it14:46
barryrockstar: otoh, once you understand how a class is to be used, api reference is great14:46
sinzuibigjools: +114:47
bigjoolsdoctests are statements of intent14:47
rockstarI would like to withdraw my request to use unittest to test units.  It seems that it's not getting anywhere.14:47
sinzuiThe meeting is getting close the the end. I just read unit-testies14:47
gmbintellectronica: Hmm, okay. Then I'd argue that the mock objects should at least be factored out into ftests/somethingorother for cleanliness.14:47
bigjoolssinzui: lol14:47
barrysinzui: on that note...14:47
gary_posterfwiw, footnotes can help with this14:47
intellectronicarockstar: gracious of you. as a reviewer, you still have the option of asking that something be unit tested if you think it makes more sense14:48
barryi propose we close the meeting for today and schedule a mud wrasslin' contest to settle this once and for all14:48
barryat all hands14:48
gary_posterand fwiw, this example has been pointed to in the past by others as a reasonable unit test/doc test combo: http://svn.zope.org/zc.queue/trunk/src/zc/queue/queue.txt?view=auto14:48
rockstarintellectronica, as a reviewer, I don't think that makes a lot of sense if there isn't really a standard.  :/14:48
gary_poster(I wrote it, so this the importance of "by others")14:48
gary_posterI will propose footnotes at another mtg :-)14:49
barryokay, thanks everyone for a spirited debate!14:49
barryapologies for going over.  i'm sure we'll continue this at another time14:50
barry#endmeeting14:50
MootBotMeeting finished at 09:50.14:50
intellectronicathanks barry14:50
bigjoolsbarry: https://launchpad.canonical.com/TestsStyleGuide#Style%20to%20Avoid14:50
* mars packs the pitchfork away for another day14:50
bigjools"A very important consideration is that documentation tests are really documentation that happens to be testable."14:50
barrybigjools: couldn't agree more!14:50
bigjoolsso why did everyone disagree with me? :)14:51
* barry -> #launchpad-code14:51
gmbbigjools: Because you're you :)14:51
bigjoolsfigures14:51
=== salgado is now known as salgado-lunch
=== salgado-lunch is now known as salgado
=== salgado is now known as salgado-afk

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