#10358: New interface with OEIS
-------------------------------------+--------------------------------------
Reporter: was | Owner: tmonteil
Type: defect | Status: needs_info
Priority: critical | Milestone: sage-5.11
Component: combinatorics | Resolution:
Keywords: Cernay2012 days49 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Thierry Monteil | Merged in:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------------------
Comment (by tmonteil):
Here is the first review patch.
Suggested by Karl-Dieter:
- I do recommend that all references to is broken for more than a year be
changed to is broken or perhaps has been broken for some time.
- Done.
- Also, it would be nice to have references like
class:`sage.databases.oeis.OEIS`_ or whatever the correct format is.
- Done
- I added :mod:`OEIS <sage.databases.oeis>`
- I also added similar cross references between the three Sloane-
related modules.
Suggested by Nathann:
- find_by_description does not use first_result
- Done.
- I think it disapeared when migrating from my first patch and the new
framework.
- ``absolute_value`` - (bool, default False) expliquer le bordel.
- Done.
- Why did my en_GB spell checker did not alert me about that ? ;)
- Shouldn't OEISSequence.fields be renamed to _fields ? It's weird to have
this constant among so many functions in the tab-completion.
- Done.
- I like to see it exists, but i agree this may be confusing, and
perhaps
someone that need this will find it even if it is called _fields.
- In your deprecation warnings could you replace "oeis" by "oeis()" ? To
emphasize that "oeis" is a function that should be used instead of
"sloane_find" ?
- Done.
- I am not a big fan of the design of first_terms which builds the list of
all
terms, and that is subsequently called by __call__ and __getitem__ that
ignore most values and return only one. But of course efficiency is not
really a problem here :-P
- Done.
- Actually, the result we get from the website is a string from which
we
have to extract the first terms, and if i want the 10th term, id no
not
see how to find it without parsing the whole string (or at least a
big
part of it since i do not know the length of the 9 previous integers
of
the sequence). There used to be a @cached_method here (and i forgot
to
remove the associated import_statement), so i put it back, hence
many
calls to __call__ or __getitem__ will cost string parsing only the
first
time.
- Also, i think it is good to have such a separate method to say that
those first terms come from the online database. This might be
useful
when interfacing with `sloane_functions`, and then have a differnt
method like `further_terms` or so, to distinguish them (and allow
cross
testing).
- The documentation of the OEIS module begins a tad harshly. A sentence
saying
"The OEIS is an online database for integer sequences, you can query it
through Sage in order to guess how an integer sequence contiues and what
it
may mean" would be nice before all Sage examples are given :-)
- Done.
Moreover, i took the opportunity to fix a few things:
- I added empty default values to the variables of sloane_find() and
sloane_sequence() so that calling them without argument will lead to the
deprecation warning instead of an error.
- Thanks to the patchbot, i noticed that Sage startuptime was slower with
oeis, this is due to the import of modules that are not imported
elsewhere
in Sage: `HTMLParser` and `webbrowser`. Therefore, i now import them in
the
right methods only, and make oeis lazy_imported as well.
- Thanks to the patchbot, i put doctest coverage of oeis.py to 100% (i
forgot
to doctest `.__init__()` and untestable functions like `.browse()`)
- I removed an old unused option in `FancyTuple`, and fixed some typos.
- I added a .browse() method to OEIS class.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10358#comment:28>
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.
For more options, visit https://groups.google.com/groups/opt_out.