#17818: Interface to FindStat
-------------------------------------+-------------------------------------
       Reporter:  mantepse           |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.6
      Component:  interfaces         |   Resolution:
       Keywords:  FindStat           |    Merged in:
        Authors:  Martin Rubey       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:  public/findstat-   |       Commit:
  interface                          |  4ba6ef012b4581b8dc5bd277c556c8290b84d441
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by stumpc5):

 * status:  needs_review => needs_work


Comment:

 Hi Martin, thanks for all your work on that!

 1. Several doctests currently fail:

 {{{
 sage -t src/sage/databases/findstat.py
 **********************************************************************
 File "src/sage/databases/findstat.py", line 637, in
 sage.databases.findstat.FindStatStatistic.id
 Failed example:
     findstat(1).id()                              # optional -- internet
 Expected:
     <BLANKLINE>
     (process:...): GLib-CRITICAL **: g_slice_set_config: assertion
 'sys_page_size == 0' failed
     1
 Got:
     1
 **********************************************************************
 File "src/sage/databases/findstat.py", line 719, in
 sage.databases.findstat.FindStatStatistic.function
 Failed example:
     findstat(lambda pi: pi.length(), "Permutations").function() # optional
 -- internet
 Expected:
     <function <lambda> at ...>
 Got:
     <BLANKLINE>
     (process:21380): GLib-CRITICAL **: g_slice_set_config: assertion
 'sys_page_size == 0' failed
     <function <lambda> at 0x7fb420e806e0>
 **********************************************************************
 File "src/sage/databases/findstat.py", line 1294, in
 sage.databases.findstat.FindStatCollection.first_terms
 Failed example:
     c.first_terms(lambda x: 1, max_values=10))                       #
 optional -- internet
 Exception raised:
     Traceback (most recent call last):
       File "/home/stumpc5/progs/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 488, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/home/stumpc5/progs/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 848, in compile_and_execute
         compiled = compiler(example)
       File "/home/stumpc5/progs/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 486, in <lambda>
         example.source, filename, "single", compileflags, 1)
       File "<doctest
 sage.databases.findstat.FindStatCollection.first_terms[2]>", line 1
         c.first_terms(lambda x: Integer(1), max_values=Integer(10)))
 # optional -- internet
                                                                    ^
     SyntaxError: invalid syntax
 **********************************************************************
 File "src/sage/databases/findstat.py", line 1505, in
 sage.databases.findstat.FindStatMap.id
 Failed example:
     m = findstat(lambda pi: pi.length(), "Permutations")[1][1][0] #
 optional -- internet
 Expected nothing
 Got:
     <BLANKLINE>
     (process:21392): GLib-CRITICAL **: g_slice_set_config: assertion
 'sys_page_size == 0' failed
     <BLANKLINE>
     (process:21402): GLib-CRITICAL **: g_slice_set_config: assertion
 'sys_page_size == 0' failed
 **********************************************************************
 4 items had failures:
    1 of   4 in sage.databases.findstat.FindStatCollection.first_terms
    1 of   3 in sage.databases.findstat.FindStatMap.id
    1 of   2 in sage.databases.findstat.FindStatStatistic.function
    1 of   2 in sage.databases.findstat.FindStatStatistic.id
     [77 tests, 4 failures, 12.80 s]
 ----------------------------------------------------------------------
 sage -t src/sage/databases/findstat.py  # 4 doctests failed
 ----------------------------------------------------------------------
 Total time for all tests: 13.1 seconds
     cpu time: 5.7 seconds
     cumulative wall time: 12.8 seconds
 }}}


 2. The documentation doesn't build (unless I made a mistake, I haven't
 been building docs in a while):

 {{{
 Error building the documentation.

 Note: incremental documentation builds sometimes cause spurious
 error messages. To be certain that these are real errors, run
 "make doc-clean" first and try again.
 Traceback (most recent call last):
   File "/home/stumpc5/progs/sage-git/src/doc/common/builder.py", line
 1618, in <module>
     getattr(get_builder(name), type)()
   File "/home/stumpc5/progs/sage-git/src/doc/common/builder.py", line 503,
 in _wrapper
     x.get(99999)
   File "/home/stumpc5/progs/sage-
 git/local/lib/python/multiprocessing/pool.py", line 558, in get
     raise self._value
 OSError: [databases] /home/stumpc5/progs/sage-git/local/lib/python2.7
 /site-packages/sage/databases/findstat.py:docstring of
 sage.databases.findstat:16: ERROR: Unexpected indentation.
 }}}

 3. I wonder whether it is okay that doctests open browser windows,
 @vdelecroix, @ncohen.

 4. How should doctests that change from the FindStat side over time be
 handled, @vdelecroix, @ncohen. One (possibly not the best) example is

 {{{
     sage: [FindStatCollection(c.first_terms(lambda x: 0,
 max_values=1)[0][0]) for c in cl]
         [Cc0001: Permutations,
          Cc0002: Integer partitions,
          Cc0005: Dyck paths,
          Cc0006: Integer compositions,
          Cc0007: Standard tableaux,
          Cc0009: Set partitions,
          Cc0010: Binary trees,
          Cc0012: Perfect matchings,
          Cc0013: Cores,
          Cc0014: Posets,
          Cc0017: Alternating sign matrices,
          Cc0018: Gelfand-Tsetlin patterns,
          Cc0019: Semistandard tableaux,
          Cc0020: Graphs,
          Cc0021: Ordered trees,
          Cc0022: Finite Cartan types,
          Cc0023: Parking functions]
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17818#comment:35>
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/d/optout.

Reply via email to