#13891: Default parameters for Graph.plot() and Graph.show()
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.7
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Punarbasu Purkayastha,
Sébastien Labbé
Authors: Nathann Cohen | Merged in:
Dependencies: #13862 | Stopgaps:
---------------------------------+------------------------------------------
Comment (by slabbe):
Great for the second patch. I like the improvements in the documentation.
However, here are some issues:
1. The following used to work, but is broken by the actual patches. A
deprecation warning is needed :
{{{
sage: g = graphs.PetersenGraph()
sage: p = g.graphplot()
sage: p.plot(my_favorite_useless_option_I_always_used_in_my_code=45)
Traceback (most recent call last):
...
TypeError: plot() got an unexpected keyword argument
'my_favorite_useless_option_I_have_used_in_my_code'
}}}
2. (Suggestion) I don't know of another way of sending warning to the
user, but in our case it is not really a deprecation warning. Because for
instance `'scaling_term'` was used as an argument by some code and was not
used if I understand correctly. Hence, there will be no deprecation as it
was not used and will still be unused. Therefore, I suggest to improve the
message like this:
{{{
#!diff
from sage.misc.superseded import deprecation
-deprecation(13891, (str(opt)+" is not a registered argument for"+
- "GraphPlot ! Please tell us that if it "+
- "should be by writing to sage-devel !"))
+deprecation(13891, (str(opt)+" is not a registered argument for "
+ "GraphPlot and never was! Please tell us that
if it "
+ "should be by writing to sage-devel ! "
+ "In a future version of Sage, it might raise
"
+ "an error instead so you should fix it."))
}}}
3. (Remark) BTW, the `+` are not necessary above. For instance:
{{{
sage: ('first line'
....: 'second line\n'
....: 'third line')
'first linesecond line\nthird line'
}}}
4. There are some errors reported by the buildbot:
{{{
sage -t -force_lib devel/sage-13891/sage/graphs/generic_graph.py
# 1 doctests failed
sage -t -force_lib
devel/sage-13891/sage/combinat/posets/posets.py # 2 doctests failed
sage -t -force_lib
devel/sage-13891/sage/combinat/cluster_algebra_quiver/quiver.py # 1
doctests failed
sage -t -force_lib
devel/sage-13891/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py
# 1 doctests failed
sage -t -force_lib
devel/sage-13891/sage/rings/semirings/non_negative_integer_semiring.py # 1
doctests failed
sage -t -force_lib
devel/sage-13891/sage/categories/coxeter_groups.py # 1 doctests failed
sage -t -force_lib
devel/sage-13891/sage/categories/finite_coxeter_groups.py # 3 doctests
failed
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13891#comment:26>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.