#13192: some code clean up for sage/graphs/graph.py
----------------------------------+-----------------------------------------
Reporter: eisermbi | Owner: jason, ncohen, rlm
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.2
Component: graph theory | Resolution:
Keywords: sparse6_string | Work issues:
Report Upstream: N/A | Reviewers: Nathann Cohen, Karl-Dieter
Crisman
Authors: Birk Eisermann | Merged in:
Dependencies: #13109 | Stopgaps:
----------------------------------+-----------------------------------------
Changes (by kcrisman):
* status: needs_review => needs_work
* reviewer: Nathann Cohen => Nathann Cohen, Karl-Dieter Crisman
Comment:
Your update apparently added a lot of whitespace changes again. Also,
what was the doctest error? Did you change the code at all?
I think generally in doctests we go with
{{{
doctest:...: DeprecationWarning: compare
}}}
instead of
{{{
doctest:1: DeprecationWarning: compare
}}}
in case things were to go in a different order. At any rate, that's what
I've seen.
Also, even if you aren't removing the function, presumably it was still
testing something useful. Would it be possible to add a graph like the
kind Nathann suggests (with non-integer vertices) that shows that this new
code is properly comparing, as well as showing it properly compares the
edges tested before? I agree that it's good (or at least I said I did
above!), just that we want to have documentation.
Basically, what you could do is move the tests in the old function to the
tests for the actual meaningful function, and then leave only a very
minimal doctest in the old function that states that this is deprecated in
the docstring, and has ''one'' test exactly to test the deprecation
warning.
Sorry that this is more work, but I think it's good as a model for others
as well.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13192#comment:13>
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.