#12891: Invite for contributing a doctest, if a user reads an untested function
or
method
------------------------------------------+---------------------------------
Reporter: SimonKing | Owner: was
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.1
Component: user interface | Resolution:
Keywords: documentation untested | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
------------------------------------------+---------------------------------
Comment (by SimonKing):
Replying to [comment:5 jhpalmieri]:
> By the way, would it make sense to eliminate the Sage version of
sageinspect.py, and just use the version from sagenb all the time? Since
sagenb is part of Sage, we would always have access to this file, but it
still allows sagenb to be a standalone project. (This requires updating
the version of sageinspect.py currently in sagenb, of course.)
From my perspective, it does not make sense that ''any'' version of
sageinspect is in sagenb, if the sage notebook wants to pretend to be
standalone.
sageinspect is supposed to know how to find sources ''in the
`SAGE_ROOT/devel/sage/` repository'', but I don't think that the notebook
should try to find files in `SAGE_ROOT/devel/sage/` if it is used in a
project that has nothing to do with Sage.
Off topic:
A better solution for the notebook as a standalone project would be to
create a hook for the relevant functionality: The relevant functions are
supposed to return the doc of a given object or to find the source of a
given object or to determine the arguments of a function.
In other words, there should be a module sagenb.inspect containing
placeholder functions such as get_doc and get_sourcelines (perhaps
defaulting to inspect.getdoc and inspect.getsourcelines), and the notebook
should entirely rely on these functions. Now, if one wants to use the
standalone notebook for Sage, then one has to do
{{{
sagenb.inspect.getdoc = sage.misc.sageinspect.sage_getdoc
sagenb.inspect.getsourcelines = sage.misc.sageinspect.sage_getsourcelines
sagenb.inspect.getargspec = sage.misc.sageinspect.sage_getargspec
...
}}}
and if one wants to use the notebook in, say, mathematica, then one has to
use other definitions (assigning sagenb.inspect.getsourcelines to a
function that raises a `NotImplementedError` or so...),
The advantage for the topic of this ticket would be that we only needed to
change one location, not two. The advantage for me would be: I am not a
notebook user, and I don't really want to learn github for something that
I don't use.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12891#comment:6>
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.