#6525: [with patch, needs work] Enabling some GraphLatex options that were hard
coded.
--------------------------+-------------------------------------------------
Reporter: fidelbarrera | Owner: rlm
Type: enhancement | Status: new
Priority: minor | Milestone: sage-feature
Component: graph theory | Keywords: latex, graph, graphlatex
Reviewer: | Author: Fidel Barrera-Cruz
Merged: |
--------------------------+-------------------------------------------------
Comment(by rbeezer):
Hi Fidel,
This looks good and passes all tests. I like setting an option back to
its default when None is passed in on the {{{set_option()}}} and putting
the input checks there look good.
One concern, which I should have thought of earlier.
{{{
sage: G=graph.PetersenGraph()
sage: opts = G.latex_options()
sage: opts
}}}
prints a dictionary, whose order is not guaranteed, so doctests that use
this construction could fail just for being in the "wrong" order. Even
though the new tests all passed for me. When there was only one option,
it wasn't a problem.
Two options would be:
1. Use {{{G.get_option('foo')}}} to just test specific option(s) that are
affected in a test.
2. Do something like
{{{
sage: G=graph.PetersenGraph()
sage: opts = G.latex_options()
sage: sorted(list(opts._options.items()))
}}}
which will provide unique output. I don't like this as much since it uses
the "hidden" atrribute {{{_options}}} which is best not exposed in the
reference manual. Maybe you could add a {{{get_options()}}} method that
simply returned {{{_options}}} which could be mashed into the sorted list
in a doctest which needs to see the whole range of options (like testing
all the defaults at once).
Again, I should have thought of this sooner, but I think it needs to be
changed before this gets merged. I'll try to look at it right away once
you make the changes.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6525#comment:4>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---