#8680: untabify Sage again, and make it stick
------------------------------+---------------------------------------------
Reporter: jhpalmieri | Owner: jason
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-4.5
Component: doctest | Keywords:
Author: John Palmieri | Upstream: N/A
Reviewer: David Loeffler | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by jhpalmieri):
Replying to [comment:20 leif]:
> Replying to [comment:19 jhpalmieri]:
> > > it's IMHO undesirable to slow down every doctesting by scanning each
file twice in addition.
> > [...]
> > If I run it on sage/combinat/sloane_functions.py, which is pretty big
for a Sage library file (241510 bytes), running inside Sage and using
"timeit", it takes 400-500 microseconds. For the roughly 2500 files in
the Sage library, this adds between 1 and 2 seconds, total. [...]
>
> Well this obviously depends on the CPU, amount of cache, available or
free memory, disk speed etc.
The same with all of doctesting. The point is, this adds very little,
percentagewise, to the time.
> The main problem with such things is that they accumulate. Everybody
thinks he can add some little inefficiency; once it got in it's likely to
never be removed or improved again, that's the sad story.
Not if you open another ticket and post a patch implementing what you're
talking about. Do the same for other inefficiencies you see, and if you
feel that they're not getting the proper attention after a while, post
about them on sage-devel.
> Another point is the concept of adding such functionality to where it
IMHO does not belong; there have been discussions on what to (hopefully
automatically) check before new or modified code gets in - even on this
ticket.
>
> For me, the minimum requirement is to provide a way to disable it
''somehow'' (for a whole doctest job, not just by a tag specific to an
individual file being tested); I don't mind if it's enabled by default.
Obviously reviewers should either enable or otherwise not disable tab-
checking, but as said before, I'd implement it in another script. There's
e.g. no need to look for tabs on dozens of platforms, since they'll most
probably be present on all or none of them.
Having a way to disable it is a fine idea, but it's much lower priority
than implementing a test for tabs in the first place, so that more don't
get into the Sage library. As Voltaire said, sometimes "The perfect is
the enemy of the good". Anyway, if testing on every platform costs each
person doing doctests 1 second, or 10 seconds, or 100 seconds, out of 3 or
4 thousand, it's not a big deal.
> > I would propose including this now, since it shouldn't slow things
down much and it will keep more tabs from creeping into the Sage library,
and then modifying it later if you want.
>
> If that was the only thing postponed... ;-)
Don't just complain about it, post a patch here or open a new ticket and
fix what you think needs fixing. Not implementing this because it's not
perfect is worse, I think, than implementing it and fixing it up later.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8680#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.