#2364: [with patch, needs review] animate .show() method is poorly documented
---------------------------------------------+------------------------------
 Reporter:  cwitty                           |        Owner:  tba     
     Type:  defect                           |       Status:  new     
 Priority:  major                            |    Milestone:  sage-3.2
Component:  documentation                    |   Resolution:          
 Keywords:  animate, documentation, doctest  |  
---------------------------------------------+------------------------------
Changes (by jhpalmieri):

  * keywords:  => animate, documentation, doctest
  * summary:  animate .show() method is poorly documented => [with patch,
              needs review] animate .show() method is poorly
              documented

Comment:

 Here's a patch, based on 3.1.3.alpha2. I started working on animate.py
 before I knew about this ticket, so the patch does more than is required:

 1. It improves the documentation for {{{show}}} and {{{animate}}}, as
 requested.

 2. It adds docstrings and doctests to several functions for which they
 were missing; the file now has over 90% coverage.  (Only {{{__init__}}} is
 undocumented now.)

 3. Many doctests used to be optional, things like
 {{{
 sage: a = animate([sin(x + float(k)) for k in srange(0,2*pi,0.3)],
 ...                xmin=0, xmax=2*pi, figsize=[2,1])
 }}}
 These don't need to be optional -- the optional part comes in calls to
 {{{a.show()}}}, which calls the {{{convert}}} program -- so I've removed
 lots of optional tags. This way more of the code is actually doctested.

 4. I also deleted one method: {{{_set_axes}}}. This method was
 undocumented. It was short and pretty simple. It was also called every
 time an animation was created; indeed, that was its only appearance in the
 code. So I just copied its contents (only 5 lines) to where it was called
 in the {{{__init__}}} method.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2364#comment:2>
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