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

2 internet doctests failing in findstat.py #31054

Closed
seblabbe opened this issue Dec 15, 2020 · 15 comments
Closed

2 internet doctests failing in findstat.py #31054

seblabbe opened this issue Dec 15, 2020 · 15 comments

Comments

@seblabbe
Copy link
Contributor

On Ubuntu 18.04 with 9.3.beta4, Release Date: 2020-12-14 the command

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

gives

sage -t --warn-long 72.7 --random-seed=0 src/sage/databases/findstat.py
**********************************************************************
File "src/sage/databases/findstat.py", line 118, in sage.databases.findstat
Failed example:
    r = findstat(Permutations, lambda pi: pi.saliances()[0], depth=2); r  # optional -- internet
Expected:
    0: St000476oMp00099oMp00127 (quality [100, 100])
    1: St001497oMp00119oMp00127 with offset 1 (quality [100, 100])
    2: St000147oMp00027oMp00127 (quality [96, 100])
    3: St000054oMp00064oMp00062 with offset 1 (quality [88, 100])
    4: St000740oMp00062 with offset 1 (quality [87, 100])
    ...
Got:
     0: St000740oMp00066 with offset 1 (quality [100, 100])
     1: St000476oMp00099oMp00127 (quality [100, 100])
     2: St001497oMp00119oMp00127 with offset 1 (quality [100, 100])
     3: St000147oMp00027oMp00127 (quality [96, 100])
     4: St000054oMp00066oMp00149 with offset 1 (quality [89, 100])
     5: St000141oMp00025oMp00127 (quality [87, 100])
     6: St001291oMp00127 with offset 1 (quality [87, 86])
     7: St000051oMp00061oMp00069 (quality [87, 86])
     8: St000316oMp00025oMp00127 (quality [87, 86])
     9: St000653oMp00129oMp00127 (quality [87, 86])
    10: St001184oMp00127oMp00064 with offset 1 (quality [87, 86])
    11: St001227oMp00028oMp00127 (quality [87, 86])
    12: St001480oMp00032oMp00127 (quality [87, 86])
    13: St000066oMp00063oMp00149 with offset 1 (quality [54, 86])
    14: St000840oMp00146oMp00127 (quality [18, 86])
    15: St000199oMp00063 with offset 1 (quality [15, 71])
    16: St000193oMp00004oMp00063 with offset 1 (quality [15, 71])
    17: St000200oMp00063oMp00062 with offset 1 (quality [15, 71])
**********************************************************************
File "src/sage/databases/findstat.py", line 129, in sage.databases.findstat
Failed example:
    r[4].info()                                                           # optional -- internet
Expected:
    after adding 1 to every value
    and applying
        Mp00062: Lehmer-code to major-code bijection: Permutations -> Permutations
    to the objects (see `.compound_map()` for details)
    <BLANKLINE>
    your input matches
        St000740: The last entry of a permutation.
    <BLANKLINE>
    among the values you sent, 87 percent are actually in the database,
    among the distinct values you sent, 100 percent are actually in the database
Got:
    after adding 1 to every value
    and applying
        Mp00149: Lehmer code rotation: Permutations -> Permutations
        Mp00066: inverse: Permutations -> Permutations
    to the objects (see `.compound_map()` for details)
    <BLANKLINE>
    your input matches
        St000054: The first entry of the permutation.
    <BLANKLINE>
    among the values you sent, 89 percent are actually in the database,
    among the distinct values you sent, 100 percent are actually in the database
**********************************************************************
1 item had failures:
   2 of  16 in sage.databases.findstat
    [392 tests, 2 failures, 42.52 s]
----------------------------------------------------------------------
sage -t --warn-long 72.7 --random-seed=0 src/sage/databases/findstat.py  # 2 doctests failed
----------------------------------------------------------------------

Upstream: Reported upstream. Developers acknowledge bug.

Component: doctest coverage

Keywords: findstat

Author: Martin Rubey

Branch/Commit: 88d7a84

Reviewer: Sébastien Labbé

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

@seblabbe seblabbe added this to the sage-9.3 milestone Dec 15, 2020
@mantepse
Copy link
Collaborator

Upstream: Reported upstream. No feedback yet.

@mantepse
Copy link
Collaborator

comment:1

It is a bit strange that St000740oMp00062 is not among the hits anymore. This may happen, since St000740oMp00062 and St000740oMp00066 are identical, but should be investigated anyway.

@mantepse
Copy link
Collaborator

@mantepse
Copy link
Collaborator

Commit: 913f1b7

@mantepse
Copy link
Collaborator

comment:3

The reason for St000740oMp00062 not being among the results anymore is a (known) shortcoming of the findstat search engine: it only keeps only the set of hits with different statistics (ignoring the maps)! The reason for this is that otherwise the result set would often be huge (more than 1000 hits), with most hits not being interesting. Finding a good solution to this problem is being worked on.


New commits:

913f1b7adapt a doctest, cleanup usage of FINDSTAT_MAP_SEPARATOR

@mantepse
Copy link
Collaborator

Changed upstream from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

@mantepse
Copy link
Collaborator

Author: Martin Rubey

@mantepse
Copy link
Collaborator

Changed keywords from none to findstat

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 17, 2020

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

0ff9533forgot # optional

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 17, 2020

Changed commit from 913f1b7 to 0ff9533

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 22, 2020

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

88d7a84fix erroneous check whether any maps are applied

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 22, 2020

Changed commit from 0ff9533 to 88d7a84

@seblabbe
Copy link
Contributor Author

comment:8

With the branch on top of beta5, I now get:

Running doctests with ID 2020-12-30-09-59-26-49919bff.
Git branch: 31054
Using --optional=internet,memlimit,sage
Doctesting 1 file.
sage -t --warn-long 72.1 --random-seed=0 src/sage/databases/findstat.py
    [395 tests, 42.75 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------

@seblabbe
Copy link
Contributor Author

Reviewer: Sébastien Labbé

@vbraun
Copy link
Member

vbraun commented Jan 3, 2021

Changed branch from u/mantepse/2_internet_doctests_failing_in_findstat_py to 88d7a84

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

3 participants