Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 internet doctests failing in findstat.py #27838

Closed
seblabbe opened this issue May 16, 2019 · 16 comments
Closed

5 internet doctests failing in findstat.py #27838

seblabbe opened this issue May 16, 2019 · 16 comments

Comments

@seblabbe
Copy link
Contributor

With 8.8.beta5, Release Date: 2019-05-11, the command

$ sage -t --long --optional=sage,internet src/sage/databases/findstat.py 

gives

Using --optional=internet,memlimit,sage
Doctesting 1 file.
sage -t --long src/sage/databases/findstat.py
**********************************************************************
File "src/sage/databases/findstat.py", line 1416, in sage.databases.findstat.FindStatStatistic.generating_functions
Failed example:
    st.generating_functions()                                     # optional -- internet
Expected:
    {2: q + 1,
     3: q^3 + 2*q^2 + 2*q + 1,
     4: q^6 + 3*q^5 + 5*q^4 + 6*q^3 + 5*q^2 + 3*q + 1,
     5: q^10 + 4*q^9 + 9*q^8 + 15*q^7 + 20*q^6 + 22*q^5 + 20*q^4 + 15*q^3 + 9*q^2 + 4*q + 1,
     6: q^15 + 5*q^14 + 14*q^13 + 29*q^12 + 49*q^11 + 71*q^10 + 90*q^9 + 101*q^8 + 101*q^7 + 90*q^6 + 71*q^5 + 49*q^4 + 29*q^3 + 14*q^2 + 5*q + 1}
Got:
    {1: 1,
     2: q + 1,
     3: q^3 + 2*q^2 + 2*q + 1,
     4: q^6 + 3*q^5 + 5*q^4 + 6*q^3 + 5*q^2 + 3*q + 1,
     5: q^10 + 4*q^9 + 9*q^8 + 15*q^7 + 20*q^6 + 22*q^5 + 20*q^4 + 15*q^3 + 9*q^2 + 4*q + 1,
     6: q^15 + 5*q^14 + 14*q^13 + 29*q^12 + 49*q^11 + 71*q^10 + 90*q^9 + 101*q^8 + 101*q^7 + 90*q^6 + 71*q^5 + 49*q^4 + 29*q^3 + 14*q^2 + 5*q + 1}
**********************************************************************
File "src/sage/databases/findstat.py", line 1423, in sage.databases.findstat.FindStatStatistic.generating_functions
Failed example:
    st.generating_functions(style="dictionary")                   # optional -- internet
Expected:
    {2: {0: 1, 1: 1},
     3: {0: 1, 1: 2, 2: 2, 3: 1},
     4: {0: 1, 1: 3, 2: 5, 3: 6, 4: 5, 5: 3, 6: 1},
     5: {0: 1, 1: 4, 2: 9, 3: 15, 4: 20, 5: 22, 6: 20, 7: 15, 8: 9, 9: 4, 10: 1},
     6: {0: 1,
      1: 5,
      2: 14,
      3: 29,
      4: 49,
      5: 71,
      6: 90,
      7: 101,
      8: 101,
      9: 90,
      10: 71,
      11: 49,
      12: 29,
      13: 14,
      14: 5,
      15: 1}}
Got:
    {1: {0: 1},
     2: {0: 1, 1: 1},
     3: {0: 1, 1: 2, 2: 2, 3: 1},
     4: {0: 1, 1: 3, 2: 5, 3: 6, 4: 5, 5: 3, 6: 1},
     5: {0: 1, 1: 4, 2: 9, 3: 15, 4: 20, 5: 22, 6: 20, 7: 15, 8: 9, 9: 4, 10: 1},
     6: {0: 1,
      1: 5,
      2: 14,
      3: 29,
      4: 49,
      5: 71,
      6: 90,
      7: 101,
      8: 101,
      9: 90,
      10: 71,
      11: 49,
      12: 29,
      13: 14,
      14: 5,
      15: 1}}
**********************************************************************
File "src/sage/databases/findstat.py", line 1445, in sage.databases.findstat.FindStatStatistic.generating_functions
Failed example:
    st.generating_functions(style="list")                         # optional -- internet
Expected:
    {2: [1, 1],
     3: [1, 2, 2, 1],
     4: [1, 3, 5, 6, 5, 3, 1],
     5: [1, 4, 9, 15, 20, 22, 20, 15, 9, 4, 1],
     6: [1, 5, 14, 29, 49, 71, 90, 101, 101, 90, 71, 49, 29, 14, 5, 1]}
Got:
    {1: [1],
     2: [1, 1],
     3: [1, 2, 2, 1],
     4: [1, 3, 5, 6, 5, 3, 1],
     5: [1, 4, 9, 15, 20, 22, 20, 15, 9, 4, 1],
     6: [1, 5, 14, 29, 49, 71, 90, 101, 101, 90, 71, 49, 29, 14, 5, 1]}
**********************************************************************
File "src/sage/databases/findstat.py", line 1492, in sage.databases.findstat.FindStatStatistic.oeis_search
Failed example:
    st.oeis_search()                                              # optional -- internet
Expected:
    Searching the OEIS for "1,1  1,2,2,1  1,3,5,6,5,3,1  1,4,9,15,20,22,20,15,9,4,1  1,5,14,29,49,71,90,101"
    0: A008302: Triangle of Mahonian numbers T(n,k)...
Got:
    Searching the OEIS for "1  1,1  1,2,2,1  1,3,5,6,5,3,1  1,4,9,15,20,22,20,15,9,4,1  1,5,14,29,49,71,90"
    0: A008302: Triangle of Mahonian numbers T(n,k): coefficients in expansion of Product_{i=0..n-1} (1 + x + ... + x^i), where k ranges from 0 to A000217(n-1). Also enumerates permutations by their major index.
    1: A274887: Triangle read by rows: coefficients of the q-factorial.
**********************************************************************
File "src/sage/databases/findstat.py", line 1496, in sage.databases.findstat.FindStatStatistic.oeis_search
Failed example:
    st.oeis_search(search_size=13)                                # optional -- internet
Expected:
    Searching the OEIS for "1,1  1,2,2,1  1,3,5,6,5,3,1"
    0: A008302: Triangle of Mahonian numbers T(n,k)...
    1: A115570: Array read by rows: row n (n>= 1) gives the Betti numbers...
    2: A187447: Array for all multiset choices...
Got:
    Searching the OEIS for "1  1,1  1,2,2,1  1,3,5,6,5,3"
    0: A008302: Triangle of Mahonian numbers T(n,k): coefficients in expansion of Product_{i=0..n-1} (1 + x + ... + x^i), where k ranges from 0 to A000217(n-1). Also enumerates permutations by their major index.
    1: A115570: Array read by rows: row n (n>= 1) gives the Betti numbers for the n-th element of the Weyl group of type A3 (in Goresky's standard ordering).
    2: A187447: Array for all multiset choices (multiset repetition class representatives in Abramowitz-Stegun order).
**********************************************************************
2 items had failures:
   3 of   5 in sage.databases.findstat.FindStatStatistic.generating_functions
   2 of   4 in sage.databases.findstat.FindStatStatistic.oeis_search
    [249 tests, 5 failures, 32.00 s]
----------------------------------------------------------------------
sage -t --long src/sage/databases/findstat.py  # 5 doctests failed
----------------------------------------------------------------------

CC: @mantepse @stumpc5

Component: doctest coverage

Author: Frédéric Chapoton

Branch/Commit: 18ee6ae

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/27838

@seblabbe seblabbe added this to the sage-8.8 milestone May 16, 2019
@mantepse
Copy link
Contributor

comment:1

I am in the process of rewriting the interface. This will make new functionality (in particular the MapFinder) available. Also, the server had to switch to https, and http access is only temporarily allowed.

I hope to finish this next week, I want to get the design right, both on the server side as on the sage side.

@mantepse
Copy link
Contributor

comment:2

I'm afraid I will need more time. I'm aiming at end of next week.

@embray
Copy link
Contributor

embray commented Jun 14, 2019

comment:3

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

@embray embray removed this from the sage-8.8 milestone Jun 14, 2019
@mantepse
Copy link
Contributor

mantepse commented Jul 9, 2019

comment:4

I am still working on this, I am sorry it takes so long.

@fchapoton
Copy link
Contributor

Commit: cd12412

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

Branch: public/ticket/27838

@fchapoton
Copy link
Contributor

New commits:

cd12412findstat doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 17, 2019

Changed commit from cd12412 to 18ee6ae

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 17, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

18ee6aemore fixes for findstat

@fchapoton
Copy link
Contributor

comment:7

after my fixes, there remains one annoying failing doctest.

@fchapoton
Copy link
Contributor

comment:8

I would suggest to merge this one quickly and take care of the rest later.

Sébastien, tu es d'accord ?

@fchapoton fchapoton added this to the sage-9.0 milestone Nov 18, 2019
@mantepse
Copy link
Contributor

comment:9

I agree that this makes more sense.

@seblabbe
Copy link
Contributor Author

Reviewer: Sébastien Labbé

@seblabbe
Copy link
Contributor Author

comment:10

Good idea.

I confirm I get only one remaining doctest failure copied below:

**********************************************************************
File "src/sage/databases/findstat.py", line 2117, in sage.databases.findstat.FindStatCollection.in_range
Failed example:
    for c in l:                                                   # optional -- internet, random
        if c.id() not in long and c.is_supported():
            f = c.first_terms(lambda x: 1, max_values=10000)
            print("{} {} {}".format(c, len(f), all(c.in_range(e) for e, _ in f)))
Exception raised:
    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.databases.findstat.FindStatCollection.in_range[8]>", line 3, in <module>
        f = c.first_terms(lambda x: Integer(1), max_values=Integer(10000))
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/databases/findstat.py", line 2173, in first_terms
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/databases/findstat.py", line 2173, in <listcomp>
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/databases/findstat.py", line 2169, in <genexpr>
        if self._sageconstructor_overridden is None:
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/databases/findstat.py", line 2452, in <lambda>
        lambda x: (lambda R, E: Poset((list(range(E)), R)))(*literal_eval(x))],
      File "sage/misc/classcall_metaclass.pyx", line 334, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1741)
        return cls.classcall(cls, *args, **kwds)
      File "/home/slabbe/GitBox/sage/local/lib/python3.7/site-packages/sage/combinat/tableau.py", line 5941, in __classcall_private__
        raise ValueError( "shape must be a (skew) partition" )
    ValueError: shape must be a (skew) partition
**********************************************************************
1 item had failures:
   1 of  10 in sage.databases.findstat.FindStatCollection.in_range
    [249 tests, 1 failure, 364.03 s]
----------------------------------------------------------------------
sage -t --long src/sage/databases/findstat.py  # 1 doctest failed
----------------------------------------------------------------------

@vbraun
Copy link
Member

vbraun commented Nov 24, 2019

Changed branch from public/ticket/27838 to 18ee6ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants