#5918: [with patch; needs review] bring doctest coverage for posets to 100%
---------------------------+------------------------------------------------
 Reporter:  saliola        |       Owner:  saliola   
     Type:  task           |      Status:  new       
 Priority:  major          |   Milestone:  sage-3.4.2
Component:  combinatorics  |    Keywords:            
---------------------------+------------------------------------------------

Comment(by saliola):

 Replying to [comment:5 ddrake]:
 > I'm going to upload a patch which corrects a bunch of typos and
 formatting bits. I do have a couple comments:
 >
 >   * before, the definitions for order ideal and filter were both
 obviously wrong. I corrected the definition and took the liberty of
 rewriting it; please check those.

 Thanks for catching these. I checked your corrected definitions, and they
 are correct. (It seems that a bunch of > and < symbols disappeared at some
 point; most likely during the automatic conversion to ReST).

 >   * you need a blank line between {{{EXAMPLES::}} (or {{{TEST::}}}) and
 the first line of the doctest; otherwise, the documentation doesn't get
 typeset correctly.

 Thanks for pointing this out. Obviously, I didn't know this.

 >   * doing {{{`M\"obius`}}} doesn't work; it automatically uses LaTeX in
 math mode, and gets messed up. For now I just removed the backticks. (If
 we add a utf-8 encoding declaration, you can use the umlaut and everything
 works, but for now, the official rule is that Sage library code is 7-bit
 clean.)

 It seems that you are somehow typesetting the documentation. How do you do
 this? That would obviously make it easier for me to catch these mistakes.

 > Also. there seems to be a lot of duplication between posets.py and
 hasse_diagram.py. This makes fixing documentation hard, since you have to
 fix things in two places. Is it possible to somehow combine this stuff so
 code and documentation doesn't need to be copied? (I'm asking this of
 everyone, not necessarily Franco.)

 Yeah, it is a bit of a pain. The original code was my first Sage/Python
 coding project, and some of my design decisions were not great. At some
 point the code needs to be updated to deal with more general posets (like
 very large/infinite posets), and I imagine at that point the two classes
 will merge into something like {{{FinitePosetWithHasseDiagram}}}.

 Even though there are planned changes, I thought it was very much worth
 the effort to add the doctests and fix the bugs in the current code.

 Thanks for taking a look at the patch. I agree with all your changes.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5918#comment:6>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to