<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 11, 2009, at 7:37 PM, Kevin Horn wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Wed, Nov 11, 2009 at 5:56 PM, Glyph Lefkowitz <span dir="ltr">&lt;<a href="mailto:glyph@twistedmatrix.com">glyph@twistedmatrix.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; ">
<div class="im"><br>
On Nov 11, 2009, at 5:52 PM, Kevin Horn wrote:<br>
<br>
&gt; Please let me know what you think.<br>
<br>
</div>Initial reaction: awesome!<br>
<br></blockquote><div>Well, that's encouraging. :)<br></div></div></blockquote><div><br></div><div>Please! &nbsp;Be encouraged! &nbsp;And therefore maintain our documentation and documentation toolchain! :)</div><br><blockquote type="cite"><div class="gmail_quote"><div></div><div>There's lot's of other work being done in the Sphinx testing arena, though, notably: ...</div></div></blockquote><div><br></div>It's great to see that the testing vibe is out there!<br><br><blockquote type="cite"><div class="gmail_quote"><div></div><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; ">Can sphinx do that out of the box?<br></blockquote><div><br>Yes.&nbsp; The "literalinclude" directive pulls in an external file and sticks it in a literal block (the ReST equivalent of a &lt;pre&gt; tag). &nbsp;So you could use whatever testing framework you wanted and just reference those files.<br></div></div></blockquote><div><br></div><div>Excellent. &nbsp;In that case (modulo several weeks of work on your part), I'm sold.</div><div><br></div><blockquote type="cite"><div class="gmail_quote"><div>Hmmm...I hadn't considered the Divmod stuff, but you're right. <br></div></div></blockquote><div><br></div><div>I'm glad you think so. &nbsp;I do tend to be, especially about Twisted ;-).</div><br><blockquote type="cite"><div class="gmail_quote"><div>I think the automated conversion plan is the way to go...up to a point. &nbsp;As I laid out in the proposal, I think at some point, the Sphinx docs (and the automated conversion process) will become "good enough", and then edits should be done manually to the ReST/Sphinx source files, rather than the Lore files. &nbsp;Otherwise you just end up with another tool to maintain forever.</div></div></blockquote><div><br></div><div>Well, sure. &nbsp;The goal of this process is to delete all the lore files and check in a bunch of sphinx files which replace them. &nbsp;This should be done in a branch, and reviewed like usual; the automated tool is just to make the process easier and more reliable.</div><div><br></div><div>You have two options regarding the Divmod projects; either you can make the tool good enough that you just run it, or you can commit to putting the work into the minor edits to correct the tool's deficiencies on the Divmod lore docs _before_ you can remove / desupport twisted.lore.</div><div><br></div><div>Another thing to note in the migration plan: despite &lt;<a href="http://twistedmatrix.com/trac/wiki/CompatibilityPolicy">http://twistedmatrix.com/trac/wiki/CompatibilityPolicy</a>&gt;, no deprecation period should be necessary for lore, it can just be removed. &nbsp;It has no users that I'm aware of, and if anyone does still use it they can manually copy their 'twisted/lore' directory and 'lore' script into new installations until they have a chance to run your script. &nbsp;It's not designed to be used as a library anyway; it's a bit of an accident that it's even present in the twisted/* tree.</div><div><br></div><div>One thing to note in the mig<span class="Apple-tab-span" style="white-space:pre">        </span>ration plan is the closing of outstanding branches with lore changes in them. &nbsp;This would be a good topic for a sprint.</div><br><blockquote type="cite"><div class="gmail_quote"><div>And in my opinion, Twisted needs to get away from having it's own collection of self-maintained tools as much as possible. :)<br></div></div></blockquote><div><br></div><div>Not just your opinion :).</div><br><blockquote type="cite"><div class="gmail_quote"><div>I have some basic code for the conversion process, but it's in a VERY preliminary state, and needs a fair bit of work. &nbsp;There's still several tags it doesn't handle at all (including tables, which _might_ be a real beast), and it needs to be refactored some. &nbsp;I mostly wrote it as a proof-of-concept for myself to prove (to myself) that automated conversion was feasible. &nbsp;That said, it _will_ generate a buildable Sphinx project (though it's currently VERY ugly, and generates warning in the hundreds).<br>
<br>If there's interest, I can put up what I can generate to this point, though it's awfully early days yet.<br></div></div></blockquote><div><br></div><div>Release early, release often. &nbsp;Most efforts like this end up moribund: you sound serious right now, but never underestimate the extent to which life will get in the way. &nbsp;If you put up what you've got somewhere public ASAP, (A) some people will probably show up to egg you on, (B) it's possible for them to contribute (and those contributions will be a motivation on days when this seems like a ridiculous amount of effort just to make Twisted's docs look nicer), and (C) they can pick up the slack if you need to disappear, either temporarily or permanently.</div><div><br></div><div>*don't* try to get your migration tools to the state where they can get through Twisted code review, etc. &nbsp;Hopefully we can throw these away quickly.</div><br><blockquote type="cite"><div class="gmail_quote"><div>Also:<br>Were my claims/assumption about Lore pretty much correct? &nbsp;Did I miss anything?<br></div></div></blockquote></div><br><div>Your claim about highlighting only python is correct. &nbsp;See twisted.lore.tree.munge (is it any wonder that we need to replace this thing), specifically the bit where it calls fontifyPython and there is no definition of fontifyAnythingElse.</div><div><br></div><div>The "docs errors throw build warnings" thing is an extremely confusing header, although I understand what you're saying. &nbsp;I'd re-word the whole thing in terms of test integration. &nbsp;But the important point has nothing to do with doctest, it's that sphinx has various bits of testing support, including "leave the examples outside the documentation so they're just regular python and don't need to be parsed".</div><div><br></div><div>There's a "*" for "requires plugin" - it's worth mentioning that Sphinx has a usable, and more importantly *actually used by some people*, extension API, whereas lore's extension mechanisms are... ahem. &nbsp;Let's not talk about lore's extension mechanism.</div><div><br></div><div>You do need to address linking *from* sphinx documentation *to* API documentation, and ideally, vice versa. &nbsp;Lore can do the former, via 'class="API"', although pydoctor still has no way to do the latter (see &lt;<a href="http://twistedmatrix.com/trac/ticket/2801">http://twistedmatrix.com/trac/ticket/2801</a>&gt;).</div><div><br></div><div>I don't know of any other projects (besides the ones on <a href="http://divmod.org">divmod.org</a>) which currently use lore. &nbsp;The only other one I'm aware of that ever did is &lt;<a href="https://launchpad.net/thinkcspy">https://launchpad.net/thinkcspy</a>&gt;, and they switched to using sphinx input a while ago. &nbsp;Maybe you could bug Jeff Elkner and see if he did any automation which might help?</div><div><br></div><div>You're correct that lore cannot include partial external files.</div><div><br></div><div>In your description of 'phase 0', you say "once it has been verified": be specific here. &nbsp;Nobody is going to want to be the one who actually pulls a trigger on a change this big, but it needs to get done. &nbsp;Propose a specific mechanism for the verification. &nbsp;Lay out a timeline which culminates in the ReST files being committed to trunk. &nbsp;It's too early for specific dates, but you can say "first we will do X, then we will do Y".</div><div><br></div><div>In general though, your representation of Lore seems accurate.</div><div><br></div><div>Thanks again for taking this on. &nbsp;Good luck!</div><div><br></div></body></html>