Opened 12 years ago

Closed 12 years ago

#7749 closed enhancement (fixed)

Add names.gz to the Sloane OEIS

Reported by: ssivek Owned by: tbd
Priority: minor Milestone: sage-4.3.1
Component: packages: optional Keywords:
Cc: Merged in: sage-4.3.1.alpha0
Authors: Steven Sivek Reviewers: Jaap Spies
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Add access to the names.gz file (http://www.research.att.com/~njas/sequences/names.gz) to sloane.py so that users can access sequence names while offline.

Change the output from Python ints to Sage (see SloaneEncyclopedia?[111111] for an example).

Attachments (1)

trac_7749.patch (11.5 KB) - added by ssivek 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by ssivek

I plan to add a function SloaneEncyclopedia?.sequence_name(n), rather than changing the output of getitem or anything like that, to avoid backwards compatibility issues.

This will require the patch from ticket #7692.

Changed 12 years ago by ssivek

comment:2 Changed 12 years ago by ssivek

  • Authors set to ssivek
  • Status changed from new to needs_review

I've uploaded a patch that does exactly what the ticket description says. Note that the names.gz database file remains optional, in the sense that users can choose not to install it (e.g. by "SloaneEncyclopedia?.install(names_url=None)"). This way, if you apply this patch with the stripped.gz database file already installed the only thing that shouldn't work is SloaneEncyclopedia?.sequence_name(), which should raise an error when names.gz is not installed. The only way to install names.gz is to install stripped.gz from scratch as well, though, to avoid renumbering and other possible incompatibility issues between different versions of the OEIS.

comment:3 Changed 12 years ago by ssivek

  • Authors changed from ssivek to Steven Sivek

comment:4 Changed 12 years ago by jsp

  • Reviewers set to Jaap Spies
  • Status changed from needs_review to positive_review

Worked for me. Looks good. All tests passed.

3 items had no tests:
    __main__
    __main__.change_warning_output
    __main__.warning_function
16 items passed all tests:
  13 tests in __main__.example_0
   2 tests in __main__.example_1
   2 tests in __main__.example_10
   3 tests in __main__.example_11
   2 tests in __main__.example_12
   2 tests in __main__.example_13
   4 tests in __main__.example_14
   3 tests in __main__.example_15
   2 tests in __main__.example_2
   2 tests in __main__.example_3
   2 tests in __main__.example_4
   2 tests in __main__.example_5
   2 tests in __main__.example_6
   2 tests in __main__.example_7
   2 tests in __main__.example_8
   2 tests in __main__.example_9
47 tests in 19 items.
47 passed and 0 failed.
Test passed.
	 [11.8 s]

So positive review.

Jaap

comment:5 Changed 12 years ago by mhansen

  • Merged in set to sage-4.3.1.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.