Skip to content

Commit bcf41a0

Browse files
author
Release Manager
committed
Trac #34734: Adapt findstat interface to new version of findstat.org
findstat.org very recently switched to python 3, which slightly affects doctests in the interface. The doctest failures are as follows. {{{ File "src/sage/databases/findstat.py", line 49, in sage.databases.findstat Failed example: r = findstat([(m, m.number_of_nestings()) for n in range(6) for m in PM(2*n)], depth=1); r # optional -- internet Expected: 0: St000042oMp00116 (quality [100, 100]) 1: St000041 (quality [20, 100]) ... Got: 0: St000233 (quality [16, 100]) 1: St000496 (quality [16, 100]) 2: St000233oMp00112 (quality [16, 100]) 3: St000496oMp00112 (quality [16, 100]) 4: St000232oMp00115 (quality [12, 70]) 5: St000233oMp00249 (quality [12, 70]) 6: St000496oMp00249 (quality [12, 70]) ********************************************************************** File "src/sage/databases/findstat.py", line 83, in sage.databases.findstat Failed example: print(r[1].statistic().description()) # optional -- internet Expected: The number of nestings of a perfect matching. <BLANKLINE> <BLANKLINE> This is the number of pairs of edges $((a,b), (c,d))$ such that $a\le c\le d\le b$. i.e., the edge $(c,d)$ is nested inside $(a,b)$... Got: The rcs statistic of a set partition. Let $S = B_1,\ldots,B_k$ be a set partition with ordered blocks $B_i$ and with $\operatorname{min} B_a < \operatorname{min} B_b$ for $a < b$. According to [1, Definition 3], a '''rcs''' (right-closer-smaller) of $S$ is given by a pair $i > j$ such that $j = \operatorname{max} B_b$ and $i \in B_a$ for $a < b$. ********************************************************************** File "src/sage/databases/findstat.py", line 91, in sage.databases.findstat Failed example: r[1].statistic().references() # optional -- internet Expected: 0: [1] de Médicis, A., Viennot, X. G., Moments des $q$-polynômes de Laguerre et la bijection de Foata-Zeilberger [[MathSciNet:1288802]] 1: [2] Simion, R., Stanton, D., Octabasic Laguerre polynomials and permutation statistics [[MathSciNet:1418763]]... Got: 0: [1] Steingrimsson, E., Statistics on ordered partitions of sets [[arXiv:math/0605670]] ********************************************************************** File "src/sage/databases/findstat.py", line 104, in sage.databases.findstat Failed example: findstat(data, depth=0) # optional -- internet Expected: 0: St000041 (quality [99, 100]) 1: St000042 (quality [99, 100]) Got: 0: St000232 (quality [99, 100]) 1: St000233 (quality [99, 100]) 2: St000496 (quality [99, 100]) 3: St000559 (quality [15, 57]) 4: St000563 (quality [15, 57]) 5: St001781 (quality [15, 57]) ********************************************************************** File "src/sage/databases/findstat.py", line 120, in sage.databases.findstat Failed example: r = findstat(Permutations, lambda pi: pi.saliances()[0], depth=2); r # optional -- internet Expected: 0: St000740oMp00087 with offset 1 (quality [100, 100]) ... Got: 0: St000740oMp00066 with offset 1 (quality [100, 100]) 1: St000740oMp00087 with offset 1 (quality [100, 100]) 2: St000476oMp00099oMp00127 (quality [100, 100]) 3: St000740oMp00238oMp00087 with offset 1 (quality [100, 100]) 4: St000740oMp00236oMp00087 with offset 1 (quality [100, 100]) 5: St000740oMp00236oMp00066 with offset 1 (quality [100, 100]) 6: St000740oMp00238oMp00066 with offset 1 (quality [100, 100]) 7: St000740oMp00089oMp00149 with offset 1 (quality [100, 100]) 8: St000740oMp00087oMp00254 with offset 1 (quality [100, 100]) 9: St000740oMp00159oMp00254 with offset 1 (quality [100, 100]) 10: St000740oMp00066oMp00254 with offset 1 (quality [100, 100]) 11: St000740oMp00257oMp00066 with offset 1 (quality [99, 100]) 12: St000740oMp00257oMp00087 with offset 1 (quality [99, 100]) 13: St000740oMp00067oMp00062 with offset 1 (quality [99, 100]) 14: St000147oMp00027oMp00127 (quality [96, 100]) 15: St000740oMp00175oMp00062 with offset 1 (quality [91, 100]) 16: St000054oMp00066oMp00149 with offset 1 (quality [89, 100]) 17: St000054oMp00064oMp00062 with offset 1 (quality [88, 100]) 18: St000740oMp00175oMp00087 with offset 1 (quality [88, 100]) 19: St000740oMp00067oMp00087 with offset 1 (quality [88, 100]) 20: St000740oMp00175oMp00066 with offset 1 (quality [88, 100]) 21: St000740oMp00067oMp00066 with offset 1 (quality [88, 100]) 22: St000740oMp00257oMp00062 with offset 1 (quality [88, 100]) 23: St000740oMp00062 with offset 1 (quality [87, 100]) 24: St000054oMp00064oMp00087 with offset 1 (quality [87, 100]) 25: St000054oMp00025oMp00127 with offset 1 (quality [87, 100]) 26: St000054oMp00064oMp00066 with offset 1 (quality [87, 100]) 27: St000141oMp00025oMp00127 (quality [87, 100]) 28: St000740oMp00062oMp00254 with offset 1 (quality [87, 100]) 29: St000740oMp00238oMp00062 with offset 1 (quality [87, 100]) 30: St000740oMp00236oMp00062 with offset 1 (quality [87, 100]) 31: St001291oMp00127 with offset 1 (quality [87, 86]) 32: St000051oMp00061oMp00069 (quality [87, 86]) 33: St000051oMp00061oMp00149 (quality [87, 86]) 34: St000316oMp00025oMp00127 (quality [87, 86]) 35: St000653oMp00129oMp00127 (quality [87, 86]) 36: St000740oMp00089oMp00069 with offset 1 (quality [87, 86]) 37: St001184oMp00127oMp00064 with offset 1 (quality [87, 86]) 38: St001227oMp00028oMp00127 (quality [87, 86]) 39: St001291oMp00132oMp00127 with offset 1 (quality [87, 86]) 40: St001291oMp00124oMp00127 with offset 1 (quality [87, 86]) 41: St001291oMp00127oMp00254 with offset 1 (quality [87, 86]) 42: St001291oMp00099oMp00127 with offset 1 (quality [87, 86]) 43: St001480oMp00032oMp00127 (quality [87, 86]) 44: St001480oMp00118oMp00127 (quality [87, 86]) 45: St000066oMp00063oMp00149 with offset 1 (quality [54, 86]) 46: St000066oMp00063oMp00069 with offset 1 (quality [54, 86]) 47: St000840oMp00146oMp00127 (quality [18, 86]) 48: St000199oMp00063 with offset 1 (quality [15, 71]) 49: St000193oMp00004oMp00063 with offset 1 (quality [15, 71]) 50: St000199oMp00063oMp00254 with offset 1 (quality [15, 71]) 51: St000199oMp00137oMp00127 with offset 1 (quality [15, 71]) 52: St000200oMp00063oMp00062 with offset 1 (quality [15, 71]) 53: St000200oMp00005oMp00063 with offset 1 (quality [15, 71]) 54: St000200oMp00063oMp00087 with offset 1 (quality [15, 71]) 55: St000200oMp00035oMp00127 with offset 1 (quality [15, 71]) 56: St000200oMp00137oMp00127 with offset 1 (quality [15, 71]) 57: St000740oMp00201oMp00127 with offset 1 (quality [15, 71]) 58: St001291oMp00199oMp00127 with offset 1 (quality [15, 71]) ********************************************************************** File "src/sage/databases/findstat.py", line 127, in sage.databases.findstat Failed example: r[0].info() # optional -- internet Expected: after adding 1 to every value and applying Mp00087: inverse first fundamental transformation: 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, 100 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 Mp00066: inverse: 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, 100 percent are actually in the database, among the distinct values you sent, 100 percent are actually in the database ********************************************************************** File "src/sage/databases/findstat.py", line 434, in sage.databases.findstat._get_json Failed example: _get_json(FINDSTAT_API_MAPS + "?xxx=yyy") # optional -- internet Expected: Traceback (most recent call last): ... ValueError: E005: On filtering maps, the following parameters are not allowed: [u'xxx']. Got: {'data': ['Mp00001', 'Mp00002', 'Mp00003', 'Mp00004', 'Mp00005', 'Mp00006', 'Mp00007', 'Mp00008', 'Mp00009', 'Mp00010', 'Mp00011', 'Mp00012', 'Mp00013', 'Mp00014', 'Mp00015', 'Mp00016', 'Mp00017', 'Mp00018', 'Mp00019', 'Mp00020', 'Mp00021', 'Mp00022', 'Mp00023', 'Mp00024', 'Mp00025', 'Mp00026', 'Mp00027', 'Mp00028', 'Mp00029', 'Mp00030', 'Mp00031', 'Mp00032', 'Mp00033', 'Mp00034', 'Mp00035', 'Mp00036', 'Mp00037', 'Mp00038', 'Mp00039', 'Mp00040', 'Mp00041', 'Mp00042', 'Mp00043', 'Mp00044', 'Mp00045', 'Mp00046', 'Mp00047', 'Mp00048', 'Mp00049', 'Mp00050', 'Mp00051', 'Mp00052', 'Mp00053', 'Mp00054', 'Mp00055', 'Mp00056', 'Mp00057', 'Mp00058', 'Mp00059', 'Mp00060', 'Mp00061', 'Mp00062', 'Mp00063', 'Mp00064', 'Mp00065', 'Mp00066', 'Mp00067', 'Mp00068', 'Mp00069', 'Mp00070', 'Mp00071', 'Mp00072', 'Mp00073', 'Mp00074', 'Mp00075', 'Mp00076', 'Mp00077', 'Mp00078', 'Mp00079', 'Mp00080', 'Mp00081', 'Mp00082', 'Mp00083', 'Mp00084', 'Mp00085', 'Mp00086', 'Mp00087', 'Mp00088', 'Mp00089', 'Mp00090', 'Mp00091', 'Mp00092', 'Mp00093', 'Mp00094', 'Mp00095', 'Mp00096', 'Mp00097', 'Mp00098', 'Mp00099', 'Mp00100', 'Mp00101', 'Mp00102', 'Mp00103', 'Mp00104', 'Mp00105', 'Mp00106', 'Mp00107', 'Mp00108', 'Mp00109', 'Mp00110', 'Mp00111', 'Mp00112', 'Mp00113', 'Mp00114', 'Mp00115', 'Mp00116', 'Mp00117', 'Mp00118', 'Mp00119', 'Mp00120', 'Mp00121', 'Mp00122', 'Mp00123', 'Mp00124', 'Mp00125', 'Mp00126', 'Mp00127', 'Mp00128', 'Mp00129', 'Mp00130', 'Mp00131', 'Mp00132', 'Mp00133', 'Mp00134', 'Mp00135', 'Mp00136', 'Mp00137', 'Mp00138', 'Mp00139', 'Mp00140', 'Mp00141', 'Mp00142', 'Mp00143', 'Mp00144', 'Mp00145', 'Mp00146', 'Mp00147', 'Mp00148', 'Mp00149', 'Mp00150', 'Mp00151', 'Mp00152', 'Mp00153', 'Mp00154', 'Mp00155', 'Mp00156', 'Mp00157', 'Mp00158', 'Mp00159', 'Mp00160', 'Mp00161', 'Mp00162', 'Mp00163', 'Mp00164', 'Mp00165', 'Mp00166', 'Mp00167', 'Mp00168', 'Mp00169', 'Mp00170', 'Mp00171', 'Mp00172', 'Mp00173', 'Mp00174', 'Mp00175', 'Mp00176', 'Mp00177', 'Mp00178', 'Mp00179', 'Mp00180', 'Mp00181', 'Mp00182', 'Mp00183', 'Mp00184', 'Mp00185', 'Mp00186', 'Mp00187', 'Mp00188', 'Mp00189', 'Mp00190', 'Mp00191', 'Mp00192', 'Mp00193', 'Mp00194', 'Mp00195', 'Mp00196', 'Mp00197', 'Mp00198', 'Mp00199', 'Mp00200', 'Mp00201', 'Mp00202', 'Mp00203', 'Mp00204', 'Mp00205', 'Mp00206', 'Mp00207', 'Mp00208', 'Mp00209', 'Mp00210', 'Mp00211', 'Mp00212', 'Mp00213', 'Mp00214', 'Mp00215', 'Mp00216', 'Mp00217', 'Mp00218', 'Mp00219', 'Mp00220', 'Mp00221', 'Mp00222', 'Mp00223', 'Mp00224', 'Mp00225', 'Mp00226', 'Mp00227', 'Mp00228', 'Mp00229', 'Mp00230', 'Mp00231', 'Mp00232', 'Mp00233', 'Mp00234', 'Mp00235', 'Mp00236', 'Mp00237', 'Mp00238', 'Mp00239', 'Mp00240', 'Mp00241', 'Mp00242', 'Mp00243', 'Mp00244', 'Mp00245', 'Mp00246', 'Mp00247', 'Mp00248', 'Mp00249', 'Mp00250', 'Mp00251', 'Mp00252', 'Mp00253', 'Mp00254', 'Mp00255', 'Mp00256', 'Mp00257', 'Mp00258', 'Mp00259'], 'included': {'Maps': {}}} ********************************************************************** File "src/sage/databases/findstat.py", line 457, in sage.databases.findstat._post_json Failed example: _post_json(FINDSTAT_API_STATISTICS, {"xxx": "yyy"}) # optional -- internet Expected: Traceback (most recent call last): ... ValueError: E005: On filtering statistics, the following parameters are not allowed: ['xxx']. Got: {'data': ['St000001', 'St000002', 'St000003', 'St000004', 'St000005', 'St000006', 'St000007', 'St000008', 'St000009', 'St000010', 'St000011', 'St000012', 'St000013', 'St000014', 'St000015', 'St000016', 'St000017', 'St000018', 'St000019', 'St000020', 'St000021', 'St000022', 'St000023', 'St000024', 'St000025', 'St000026', 'St000027', 'St000028', 'St000029', 'St000030', 'St000031', 'St000032', 'St000033', 'St000034', 'St000035', 'St000036', 'St000037', 'St000038', 'St000039', 'St000040', 'St000041', 'St000042', 'St000043', 'St000044', 'St000045', 'St000046', 'St000047', 'St000048', 'St000049', 'St000050', 'St000051', 'St000052', 'St000053', 'St000054', 'St000055', 'St000056', 'St000057', 'St000058', 'St000059', 'St000060', 'St000061', 'St000062', 'St000063', 'St000064', 'St000065', 'St000066', 'St000067', 'St000068', 'St000069', 'St000070', 'St000071', 'St000072', 'St000073', 'St000074', 'St000075', 'St000076', 'St000077', 'St000078', 'St000079', 'St000080', 'St000081', 'St000082', 'St000083', 'St000084', 'St000085', 'St000086', 'St000087', 'St000088', 'St000089', 'St000090', 'St000091', 'St000092', 'St000093', 'St000094', 'St000095', 'St000096', 'St000097', 'St000098', 'St000099', 'St000100', 'St000101', 'St000102', 'St000103', 'St000104', 'St000105', 'St000106', 'St000107', 'St000108', 'St000109', 'St000110', 'St000111', 'St000112', 'St000113', 'St000114', 'St000115', 'St000116', 'St000117', 'St000118', 'St000119', 'St000120', 'St000121', 'St000122', 'St000123', 'St000124', 'St000125', 'St000126', 'St000127', 'St000128', 'St000129', 'St000130', 'St000131', 'St000132', 'St000133', 'St000134', 'St000135', 'St000136', 'St000137', 'St000138', 'St000139', 'St000140', 'St000141', 'St000142', 'St000143', 'St000144', 'St000145', 'St000146', 'St000147', 'St000148', 'St000149', 'St000150', 'St000151', 'St000152', 'St000153', 'St000154', 'St000155', 'St000156', 'St000157', 'St000158', 'St000159', 'St000160', 'St000161', 'St000162', 'St000163', 'St000164', 'St000165', 'St000166', 'St000167', 'St000168', 'St000169', 'St000170', 'St000171', 'St000172', 'St000173', 'St000174', 'St000175', 'St000176', 'St000177', 'St000178', 'St000179', 'St000180', 'St000181', 'St000182', 'St000183', 'St000184', 'St000185', 'St000186', 'St000187', 'St000188', 'St000189', 'St000190', 'St000191', 'St000192', 'St000193', 'St000194', 'St000195', 'St000196', 'St000197', 'St000198', 'St000199', 'St000200', 'St000201', 'St000202', 'St000203', 'St000204', 'St000205', 'St000206', 'St000207', 'St000208', 'St000209', 'St000210', 'St000211', 'St000212', 'St000213', 'St000214', 'St000215', 'St000216', 'St000217', 'St000218', 'St000219', 'St000220', 'St000221', 'St000222', 'St000223', 'St000224', 'St000225', 'St000226', 'St000227', 'St000228', 'St000229', 'St000230', 'St000231', 'St000232', 'St000233', 'St000234', 'St000235', 'St000236', 'St000237', 'St000238', 'St000239', 'St000240', 'St000241', 'St000242', 'St000243', 'St000244', 'St000245', 'St000246', 'St000247', 'St000248', 'St000249', 'St000250', 'St000251', 'St000252', 'St000253', 'St000254', 'St000255', 'St000256', 'St000257', 'St000258', 'St000259', 'St000260', 'St000261', 'St000262', 'St000263', 'St000264', 'St000265', 'St000266', 'St000267', 'St000268', 'St000269', 'St000270', 'St000271', 'St000272', 'St000273', 'St000274', 'St000275', 'St000276', 'St000277', 'St000278', 'St000279', 'St000280', 'St000281', 'St000282', 'St000283', 'St000284', 'St000285', 'St000286', 'St000287', 'St000288', 'St000289', 'St000290', 'St000291', 'St000292', 'St000293', 'St000294', 'St000295', 'St000296', 'St000297', 'St000298', 'St000299', 'St000300', 'St000301', 'St000302', 'St000303', 'St000304', 'St000305', 'St000306', 'St000307', 'St000308', 'St000309', 'St000310', 'St000311', 'St000312', 'St000313', 'St000314', 'St000315', 'St000316', 'St000317', 'St000318', 'St000319', 'St000320', 'St000321', 'St000322', 'St000323', 'St000324', 'St000325', 'St000326', 'St000327', 'St000328', 'St000329', 'St000330', 'St000331', 'St000332', 'St000333', 'St000334', 'St000335', 'St000336', 'St000337', 'St000338', 'St000339', 'St000340', 'St000341', 'St000342', 'St000343', 'St000344', 'St000345', 'St000346', 'St000347', 'St000348', 'St000349', 'St000350', 'St000351', 'St000352', 'St000353', 'St000354', 'St000355', 'St000356', 'St000357', 'St000358', 'St000359', 'St000360', 'St000361', 'St000362', 'St000363', 'St000364', 'St000365', 'St000366', 'St000367', 'St000368', 'St000369', 'St000370', 'St000371', 'St000372', 'St000373', 'St000374', 'St000375', 'St000376', 'St000377', 'St000378', 'St000379', 'St000380', 'St000381', 'St000382', 'St000383', 'St000384', 'St000385', 'St000386', 'St000387', 'St000388', 'St000389', 'St000390', 'St000391', 'St000392', 'St000393', 'St000394', 'St000395', 'St000396', 'St000397', 'St000398', 'St000399', 'St000400', 'St000401', 'St000402', 'St000403', 'St000404', 'St000405', 'St000406', 'St000407', 'St000408', 'St000409', 'St000410', 'St000411', 'St000412', 'St000413', 'St000414', 'St000415', 'St000416', 'St000417', 'St000418', 'St000419', 'St000420', 'St000421', 'St000422', 'St000423', 'St000424', 'St000425', 'St000426', 'St000427', 'St000428', 'St000429', 'St000430', 'St000431', 'St000432', 'St000433', 'St000434', 'St000435', 'St000436', 'St000437', 'St000438', 'St000439', 'St000440', 'St000441', 'St000442', 'St000443', 'St000444', 'St000445', 'St000446', 'St000447', 'St000448', 'St000449', 'St000450', 'St000451', 'St000452', 'St000453', 'St000454', 'St000455', 'St000456', 'St000457', 'St000458', 'St000459', 'St000460', 'St000461', 'St000462', 'St000463', 'St000464', 'St000465', 'St000466', 'St000467', 'St000468', 'St000469', 'St000470', 'St000471', 'St000472', 'St000473', 'St000474', 'St000475', 'St000476', 'St000477', 'St000478', 'St000479', 'St000480', 'St000481', 'St000482', 'St000483', 'St000484', 'St000485', 'St000486', 'St000487', 'St000488', 'St000489', 'St000490', 'St000491', 'St000492', 'St000493', 'St000494', 'St000495', 'St000496', 'St000497', 'St000498', 'St000499', 'St000500', 'St000501', 'St000502', 'St000503', 'St000504', 'St000505', 'St000506', 'St000507', 'St000508', 'St000509', 'St000510', 'St000511', 'St000512', 'St000513', 'St000514', 'St000515', 'St000516', 'St000517', 'St000518', 'St000519', 'St000520', 'St000521', 'St000522', 'St000523', 'St000524', 'St000525', 'St000526', 'St000527', 'St000528', 'St000529', 'St000530', 'St000531', 'St000532', 'St000533', 'St000534', 'St000535', 'St000536', 'St000537', 'St000538', 'St000539', 'St000540', 'St000541', 'St000542', 'St000543', 'St000544', 'St000545', 'St000546', 'St000547', 'St000548', 'St000549', 'St000550', 'St000551', 'St000552', 'St000553', 'St000554', 'St000555', 'St000556', 'St000557', 'St000558', 'St000559', 'St000560', 'St000561', 'St000562', 'St000563', 'St000564', 'St000565', 'St000566', 'St000567', 'St000568', 'St000569', 'St000570', 'St000571', 'St000572', 'St000573', 'St000574', 'St000575', 'St000576', 'St000577', 'St000578', 'St000579', 'St000580', 'St000581', 'St000582', 'St000583', 'St000584', 'St000585', 'St000586', 'St000587', 'St000588', 'St000589', 'St000590', 'St000591', 'St000592', 'St000593', 'St000594', 'St000595', 'St000596', 'St000597', 'St000598', 'St000599', 'St000600', 'St000601', 'St000602', 'St000603', 'St000604', 'St000605', 'St000606', 'St000607', 'St000608', 'St000609', 'St000610', 'St000611', 'St000612', 'St000613', 'St000614', 'St000615', 'St000616', 'St000617', 'St000618', 'St000619', 'St000620', 'St000621', 'St000622', 'St000623', 'St000624', 'St000625', 'St000626', 'St000627', 'St000628', 'St000629', 'St000630', 'St000631', 'St000632', 'St000633', 'St000634', 'St000635', 'St000636', 'St000637', 'St000638', 'St000639', 'St000640', 'St000641', 'St000642', 'St000643', 'St000644', 'St000645', 'St000646', 'St000647', 'St000648', 'St000649', 'St000650', 'St000651', 'St000652', 'St000653', 'St000654', 'St000655', 'St000656', 'St000657', 'St000658', 'St000659', 'St000660', 'St000661', 'St000662', 'St000663', 'St000664', 'St000665', 'St000666', 'St000667', 'St000668', 'St000669', 'St000670', 'St000671', 'St000672', 'St000673', 'St000674', 'St000675', 'St000676', 'St000677', 'St000678', 'St000679', 'St000680', 'St000681', 'St000682', 'St000683', 'St000684', 'St000685', 'St000686', 'St000687', 'St000688', 'St000689', 'St000690', 'St000691', 'St000692', 'St000693', 'St000694', 'St000695', 'St000696', 'St000697', 'St000698', 'St000699', 'St000700', 'St000701', 'St000702', 'St000703', 'St000704', 'St000705', 'St000706', 'St000707', 'St000708', 'St000709', 'St000710', 'St000711', 'St000712', 'St000713', 'St000714', 'St000715', 'St000716', 'St000717', 'St000718', 'St000719', 'St000720', 'St000721', 'St000722', 'St000723', 'St000724', 'St000725', 'St000726', 'St000727', 'St000728', 'St000729', 'St000730', 'St000731', 'St000732', 'St000733', 'St000734', 'St000735', 'St000736', 'St000737', 'St000738', 'St000739', 'St000740', 'St000741', 'St000742', 'St000743', 'St000744', 'St000745', 'St000746', 'St000747', 'St000748', 'St000749', 'St000750', 'St000751', 'St000752', 'St000753', 'St000754', 'St000755', 'St000756', 'St000757', 'St000758', 'St000759', 'St000760', 'St000761', 'St000762', 'St000763', 'St000764', 'St000765', 'St000766', 'St000767', 'St000768', 'St000769', 'St000770', 'St000771', 'St000772', 'St000773', 'St000774', 'St000775', 'St000776', 'St000777', 'St000778', 'St000779', 'St000780', 'St000781', 'St000782', 'St000783', 'St000784', 'St000785', 'St000786', 'St000787', 'St000788', 'St000789', 'St000790', 'St000791', 'St000792', 'St000793', 'St000794', 'St000795', 'St000796', 'St000797', 'St000798', 'St000799', 'St000800', 'St000801', 'St000802', 'St000803', 'St000804', 'St000805', 'St000806', 'St000807', 'St000808', 'St000809', 'St000810', 'St000811', 'St000812', 'St000813', 'St000814', 'St000815', 'St000816', 'St000817', 'St000818', 'St000819', 'St000820', 'St000821', 'St000822', 'St000823', 'St000824', 'St000825', 'St000826', 'St000827', 'St000828', 'St000829', 'St000830', 'St000831', 'St000832', 'St000833', 'St000834', 'St000835', 'St000836', 'St000837', 'St000838', 'St000839', 'St000840', 'St000841', 'St000842', 'St000843', 'St000844', 'St000845', 'St000846', 'St000847', 'St000848', 'St000849', 'St000850', 'St000851', 'St000852', 'St000853', 'St000854', 'St000855', 'St000856', 'St000857', 'St000858', 'St000859', 'St000860', 'St000861', 'St000862', 'St000863', 'St000864', 'St000865', 'St000866', 'St000867', 'St000868', 'St000869', 'St000870', 'St000871', 'St000872', 'St000873', 'St000874', 'St000875', 'St000876', 'St000877', 'St000878', 'St000879', 'St000880', 'St000881', 'St000882', 'St000883', 'St000884', 'St000885', 'St000886', 'St000887', 'St000888', 'St000889', 'St000890', 'St000891', 'St000892', 'St000893', 'St000894', 'St000895', 'St000896', 'St000897', 'St000898', 'St000899', 'St000900', 'St000901', 'St000902', 'St000903', 'St000904', 'St000905', 'St000906', 'St000907', 'St000908', 'St000909', 'St000910', 'St000911', 'St000912', 'St000913', 'St000914', 'St000915', 'St000916', 'St000917', 'St000918', 'St000919', 'St000920', 'St000921', 'St000922', 'St000923', 'St000924', 'St000925', 'St000926', 'St000927', 'St000928', 'St000929', 'St000930', 'St000931', 'St000932', 'St000933', 'St000934', 'St000935', 'St000936', 'St000937', 'St000938', 'St000939', 'St000940', 'St000941', 'St000942', 'St000943', 'St000944', 'St000945', 'St000946', 'St000947', 'St000948', 'St000949', 'St000950', 'St000951', 'St000952', 'St000953', 'St000954', 'St000955', 'St000956', 'St000957', 'St000958', 'St000959', 'St000960', 'St000961', 'St000962', 'St000963', 'St000964', 'St000965', 'St000966', 'St000967', 'St000968', 'St000969', 'St000970', 'St000971', 'St000972', 'St000973', 'St000974', 'St000975', 'St000976', 'St000977', 'St000978', 'St000979', 'St000980', 'St000981', 'St000982', 'St000983', 'St000984', 'St000985', 'St000986', 'St000987', 'St000988', 'St000989', 'St000990', 'St000991', 'St000992', 'St000993', 'St000994', 'St000995', 'St000996', 'St000997', 'St000998', 'St000999', 'St001000', 'St001001', 'St001002', 'St001003', 'St001004', 'St001005', 'St001006', 'St001007', 'St001008', 'St001009', 'St001010', 'St001011', 'St001012', 'St001013', 'St001014', 'St001015', 'St001016', 'St001017', 'St001018', 'St001019', 'St001020', 'St001021', 'St001022', 'St001023', 'St001024', 'St001025', 'St001026', 'St001027', 'St001028', 'St001029', 'St001030', 'St001031', 'St001032', 'St001033', 'St001034', 'St001035', 'St001036', 'St001037', 'St001038', 'St001039', 'St001040', 'St001041', 'St001042', 'St001043', 'St001044', 'St001045', 'St001046', 'St001047', 'St001048', 'St001049', 'St001050', 'St001051', 'St001052', 'St001053', 'St001054', 'St001055', 'St001056', 'St001057', 'St001058', 'St001059', 'St001060', 'St001061', 'St001062', 'St001063', 'St001064', 'St001065', 'St001066', 'St001067', 'St001068', 'St001069', 'St001070', 'St001071', 'St001072', 'St001073', 'St001074', 'St001075', 'St001076', 'St001077', 'St001078', 'St001079', 'St001080', 'St001081', 'St001082', 'St001083', 'St001084', 'St001085', 'St001086', 'St001087', 'St001088', 'St001089', 'St001090', 'St001091', 'St001092', 'St001093', 'St001094', 'St001095', 'St001096', 'St001097', 'St001098', 'St001099', 'St001100', 'St001101', 'St001102', 'St001103', 'St001104', 'St001105', 'St001106', 'St001107', 'St001108', 'St001109', 'St001110', 'St001111', 'St001112', 'St001113', 'St001114', 'St001115', 'St001116', 'St001117', 'St001118', 'St001119', 'St001120', 'St001121', 'St001122', 'St001123', 'St001124', 'St001125', 'St001126', 'St001127', 'St001128', 'St001129', 'St001130', 'St001131', 'St001132', 'St001133', 'St001134', 'St001135', 'St001136', 'St001137', 'St001138', 'St001139', 'St001140', 'St001141', 'St001142', 'St001143', 'St001144', 'St001145', 'St001146', 'St001147', 'St001148', 'St001149', 'St001150', 'St001151', 'St001152', 'St001153', 'St001154', 'St001155', 'St001156', 'St001157', 'St001158', 'St001159', 'St001160', 'St001161', 'St001162', 'St001163', 'St001164', 'St001165', 'St001166', 'St001167', 'St001168', 'St001169', 'St001170', 'St001171', 'St001172', 'St001173', 'St001174', 'St001175', 'St001176', 'St001177', 'St001178', 'St001179', 'St001180', 'St001181', 'St001182', 'St001183', 'St001184', 'St001185', 'St001186', 'St001187', 'St001188', 'St001189', 'St001190', 'St001191', 'St001192', 'St001193', 'St001194', 'St001195', 'St001196', 'St001197', 'St001198', 'St001199', 'St001200', 'St001201', 'St001202', 'St001203', 'St001204', 'St001205', 'St001206', 'St001207', 'St001208', 'St001209', 'St001210', 'St001211', 'St001212', 'St001213', 'St001214', 'St001215', 'St001216', 'St001217', 'St001218', 'St001219', 'St001220', 'St001221', 'St001222', 'St001223', 'St001224', 'St001225', 'St001226', 'St001227', 'St001228', 'St001229', 'St001230', 'St001231', 'St001232', 'St001233', 'St001234', 'St001235', 'St001236', 'St001237', 'St001238', 'St001239', 'St001240', 'St001241', 'St001242', 'St001243', 'St001244', 'St001245', 'St001246', 'St001247', 'St001248', 'St001249', 'St001250', 'St001251', 'St001252', 'St001253', 'St001254', 'St001255', 'St001256', 'St001257', 'St001258', 'St001259', 'St001260', 'St001261', 'St001262', 'St001263', 'St001264', 'St001265', 'St001266', 'St001267', 'St001268', 'St001269', 'St001270', 'St001271', 'St001272', 'St001273', 'St001274', 'St001275', 'St001276', 'St001277', 'St001278', 'St001279', 'St001280', 'St001281', 'St001282', 'St001283', 'St001284', 'St001285', 'St001286', 'St001287', 'St001288', 'St001289', 'St001290', 'St001291', 'St001292', 'St001293', 'St001294', 'St001295', 'St001296', 'St001297', 'St001298', 'St001299', 'St001300', 'St001301', 'St001302', 'St001303', 'St001304', 'St001305', 'St001306', 'St001307', 'St001308', 'St001309', 'St001310', 'St001311', 'St001312', 'St001313', 'St001314', 'St001315', 'St001316', 'St001317', 'St001318', 'St001319', 'St001320', 'St001321', 'St001322', 'St001323', 'St001324', 'St001325', 'St001326', 'St001327', 'St001328', 'St001329', 'St001330', 'St001331', 'St001332', 'St001333', 'St001334', 'St001335', 'St001336', 'St001337', 'St001338', 'St001339', 'St001340', 'St001341', 'St001342', 'St001343', 'St001344', 'St001345', 'St001346', 'St001347', 'St001348', 'St001349', 'St001350', 'St001351', 'St001352', 'St001353', 'St001354', 'St001355', 'St001356', 'St001357', 'St001358', 'St001359', 'St001360', 'St001361', 'St001362', 'St001363', 'St001364', 'St001365', 'St001366', 'St001367', 'St001368', 'St001369', 'St001370', 'St001371', 'St001372', 'St001373', 'St001374', 'St001375', 'St001376', 'St001377', 'St001378', 'St001379', 'St001380', 'St001381', 'St001382', 'St001383', 'St001384', 'St001385', 'St001386', 'St001387', 'St001388', 'St001389', 'St001390', 'St001391', 'St001392', 'St001393', 'St001394', 'St001395', 'St001396', 'St001397', 'St001398', 'St001399', 'St001400', 'St001401', 'St001402', 'St001403', 'St001404', 'St001405', 'St001406', 'St001407', 'St001408', 'St001409', 'St001410', 'St001411', 'St001412', 'St001413', 'St001414', 'St001415', 'St001416', 'St001417', 'St001418', 'St001419', 'St001420', 'St001421', 'St001422', 'St001423', 'St001424', 'St001425', 'St001426', 'St001427', 'St001428', 'St001429', 'St001430', 'St001431', 'St001432', 'St001433', 'St001434', 'St001435', 'St001436', 'St001437', 'St001438', 'St001439', 'St001440', 'St001441', 'St001442', 'St001443', 'St001444', 'St001445', 'St001446', 'St001447', 'St001448', 'St001449', 'St001450', 'St001451', 'St001452', 'St001453', 'St001454', 'St001455', 'St001456', 'St001457', 'St001458', 'St001459', 'St001460', 'St001461', 'St001462', 'St001463', 'St001464', 'St001465', 'St001466', 'St001467', 'St001468', 'St001469', 'St001470', 'St001471', 'St001472', 'St001473', 'St001474', 'St001475', 'St001476', 'St001477', 'St001478', 'St001479', 'St001480', 'St001481', 'St001482', 'St001483', 'St001484', 'St001485', 'St001486', 'St001487', 'St001488', 'St001489', 'St001490', 'St001491', 'St001492', 'St001493', 'St001494', 'St001495', 'St001496', 'St001497', 'St001498', 'St001499', 'St001500', 'St001501', 'St001502', 'St001503', 'St001504', 'St001505', 'St001506', 'St001507', 'St001508', 'St001509', 'St001510', 'St001511', 'St001512', 'St001513', 'St001514', 'St001515', 'St001516', 'St001517', 'St001518', 'St001519', 'St001520', 'St001521', 'St001522', 'St001523', 'St001524', 'St001525', 'St001526', 'St001527', 'St001528', 'St001529', 'St001530', 'St001531', 'St001532', 'St001533', 'St001534', 'St001535', 'St001536', 'St001537', 'St001538', 'St001539', 'St001540', 'St001541', 'St001542', 'St001543', 'St001544', 'St001545', 'St001546', 'St001547', 'St001548', 'St001549', 'St001550', 'St001551', 'St001552', 'St001553', 'St001554', 'St001555', 'St001556', 'St001557', 'St001558', 'St001559', 'St001560', 'St001561', 'St001562', 'St001563', 'St001564', 'St001565', 'St001566', 'St001567', 'St001568', 'St001569', 'St001570', 'St001571', 'St001572', 'St001573', 'St001574', 'St001575', 'St001576', 'St001577', 'St001578', 'St001579', 'St001580', 'St001581', 'St001582', 'St001583', 'St001584', 'St001585', 'St001586', 'St001587', 'St001588', 'St001589', 'St001590', 'St001591', 'St001592', 'St001593', 'St001594', 'St001595', 'St001596', 'St001597', 'St001598', 'St001599', 'St001600', 'St001601', 'St001602', 'St001603', 'St001604', 'St001605', 'St001606', 'St001607', 'St001608', 'St001609', 'St001610', 'St001611', 'St001612', 'St001613', 'St001614', 'St001615', 'St001616', 'St001617', 'St001618', 'St001619', 'St001620', 'St001621', 'St001622', 'St001623', 'St001624', 'St001625', 'St001626', 'St001627', 'St001628', 'St001629', 'St001630', 'St001631', 'St001632', 'St001633', 'St001634', 'St001635', 'St001636', 'St001637', 'St001638', 'St001639', 'St001640', 'St001641', 'St001642', 'St001643', 'St001644', 'St001645', 'St001646', 'St001647', 'St001648', 'St001649', 'St001650', 'St001651', 'St001652', 'St001653', 'St001654', 'St001655', 'St001656', 'St001657', 'St001658', 'St001659', 'St001660', 'St001661', 'St001662', 'St001663', 'St001664', 'St001665', 'St001666', 'St001667', 'St001668', 'St001669', 'St001670', 'St001671', 'St001672', 'St001673', 'St001674', 'St001675', 'St001676', 'St001677', 'St001678', 'St001679', 'St001680', 'St001681', 'St001682', 'St001683', 'St001684', 'St001685', 'St001686', 'St001687', 'St001688', 'St001689', 'St001690', 'St001691', 'St001692', 'St001693', 'St001694', 'St001695', 'St001696', 'St001697', 'St001698', 'St001699', 'St001700', 'St001701', 'St001702', 'St001703', 'St001704', 'St001705', 'St001706', 'St001707', 'St001708', 'St001709', 'St001710', 'St001711', 'St001712', 'St001713', 'St001714', 'St001715', 'St001716', 'St001717', 'St001718', 'St001719', 'St001720', 'St001721', 'St001722', 'St001723', 'St001724', 'St001725', 'St001726', 'St001727', 'St001728', 'St001729', 'St001730', 'St001731', 'St001732', 'St001733', 'St001734', 'St001735', 'St001736', 'St001737', 'St001738', 'St001739', 'St001740', 'St001741', 'St001742', 'St001743', 'St001744', 'St001745', 'St001746', 'St001747', 'St001748', 'St001749', 'St001750', 'St001751', 'St001752', 'St001753', 'St001754', 'St001755', 'St001756', 'St001757', 'St001758', 'St001759', 'St001760', 'St001761', 'St001762', 'St001763', 'St001764', 'St001765', 'St001766', 'St001767', 'St001768', 'St001769', 'St001770', 'St001771', 'St001772', 'St001773', 'St001774', 'St001775', 'St001776', 'St001777', 'St001778', 'St001779', 'St001780', 'St001781', 'St001782', 'St001783', 'St001784', 'St001785', 'St001786', 'St001787', 'St001788', 'St001789', 'St001790', 'St001791', 'St001792', 'St001793', 'St001794', 'St001795', 'St001796', 'St001797', 'St001798', 'St001799', 'St001800', 'St001801', 'St001802', 'St001803', 'St001804', 'St001805', 'St001806', 'St001807', 'St001808', 'St001809', 'St001810', 'St001811', 'St001812', 'St001813', 'St001814', 'St001815', 'St001816', 'St001817', 'St001818', 'St001819', 'St001820', 'St001821', 'St001822', 'St001823', 'St001824', 'St001825', 'St001826', 'St001827', 'St001828', 'St001829', 'St001830', 'St001831', 'St001832', 'St001833', 'St001834', 'St001835', 'St001836', 'St001837', 'St001838', 'St001839', 'St001840', 'St001841', 'St001842', 'St001843'], 'included': {'Statistics': {}}} ********************************************************************** File "src/sage/databases/findstat.py", line 593, in sage.databases.findstat.? Failed example: _data_from_iterable(l) # optional -- internet Expected: (lazy list [([[]], [0]), ([[(1, 2)]], [0]), ([[(1, 2), (3, 4)], [(1, 3), (2, 4)], [(1, 4), (2, 3)]], [0, 0, 1]), ...], a subset of Cc0012: Perfect matchings) Got: (lazy list [([[]], [0]), ([[(1, 2)]], [0]), ([[(1, 2), (3, 4)], [(1, 3), (2, 4)], [(1, 4), (2, 3)]], [0, 0, 1]), ...], a subset of Cc0009: Set partitions) ********************************************************************** File "src/sage/databases/findstat.py", line 968, in sage.databases.findstat.? Failed example: findstat([(m, m.number_of_nestings()) for m in l], depth=0) # optional -- internet Expected: 0: St000041 (quality [100, 100]) Got: 0: St000233 (quality [100, 100]) 1: St000496 (quality [100, 100]) ********************************************************************** File "src/sage/databases/findstat.py", line 973, in sage.databases.findstat.? Failed example: findstat({m: m.number_of_nestings() for m in l}, depth=0) # optional -- internet Expected: 0: St000041 (quality [100, 100]) Got: 0: St000233 (quality [100, 100]) 1: St000496 (quality [100, 100]) ********************************************************************** File "src/sage/databases/findstat.py", line 984, in sage.databases.findstat.? Failed example: findstat("Perfect Matchings", lambda m: m.number_of_nestings(), depth=0) # optional -- internet Expected: 0: St000041 (quality [20, 100]) Got: 0: St000041 (quality [14, 100]) ********************************************************************** File "src/sage/databases/findstat.py", line 989, in sage.databases.findstat.? Failed example: PM = PerfectMatchings(10); findstat((PM, [m.number_of_nestings() for m in PM]), depth=0) # optional -- internet Expected: 0: St000042 (quality [100, 100]) 1: St000041 (quality [9, 100]) Got: 0: St000232 (quality [4, 9]) 1: St000233 (quality [4, 100]) 2: St000496 (quality [4, 100]) 3: St000793 (quality [4, 18]) 4: St000971 (quality [4, 45]) 5: St001050 (quality [4, 45]) 6: St001051 (quality [4, 45]) 7: St001153 (quality [4, 45]) 8: St001693 (quality [4, 45]) ********************************************************************** File "src/sage/databases/findstat.py", line 995, in sage.databases.findstat.? Failed example: findstat(12, distribution=lambda m: m.number_of_nestings(), depth=0) # optional -- internet Expected: 0: St000041 (quality [100, 100]) 1: St000042 (quality [100, 100]) Got: 0: St000042 (quality [100, 100]) 1: St000041 (quality [11, 100]) ********************************************************************** File "src/sage/databases/findstat.py", line 1040, in sage.databases.findstat.? Failed example: findstat([(m, m.number_of_nestings()/1) for m in PerfectMatchings(10)], depth=0) # optional -- internet Expected: 0: St000041 (quality [9, 100]) Got: 0: St000233 (quality [4, 100]) 1: St000496 (quality [4, 100]) ********************************************************************** File "src/sage/databases/findstat.py", line 2654, in sage.databases.findstat.FindStatStatisticQuery.first_terms Failed example: r = findstat(l, depth=0); r # optional -- internet Expected: 0: St000041 (quality [99, 100]) 1: St000042 (quality [99, 100]) Got: 0: St000232 (quality [99, 100]) 1: St000233 (quality [99, 100]) 2: St000496 (quality [99, 100]) 3: St000559 (quality [15, 57]) 4: St000563 (quality [15, 57]) 5: St001781 (quality [15, 57]) ********************************************************************** File "src/sage/databases/findstat.py", line 2672, in sage.databases.findstat.FindStatStatisticQuery._first_terms_raw Failed example: r = findstat(l, depth=0); r # optional -- internet Expected: 0: St000041 (quality [99, 100]) 1: St000042 (quality [99, 100]) Got: 0: St000232 (quality [99, 100]) 1: St000233 (quality [99, 100]) 2: St000496 (quality [99, 100]) 3: St000559 (quality [15, 57]) 4: St000563 (quality [15, 57]) 5: St001781 (quality [15, 57]) ********************************************************************** File "src/sage/databases/findstat.py", line 2713, in sage.databases.findstat.FindStatStatisticQuery.__repr__ Failed example: findstat(data, depth=1) # optional -- internet Expected: 0: St000042oMp00116 (quality [100, 100]) 1: St000041 (quality [20, 100]) ... Got: 0: St000233 (quality [16, 100]) 1: St000496 (quality [16, 100]) 2: St000233oMp00112 (quality [16, 100]) 3: St000496oMp00112 (quality [16, 100]) 4: St000232oMp00115 (quality [12, 70]) 5: St000233oMp00249 (quality [12, 70]) 6: St000496oMp00249 (quality [12, 70]) ********************************************************************** File "src/sage/databases/findstat.py", line 2731, in sage.databases.findstat.FindStatStatisticQuery.__getitem__ Failed example: r[1] # optional -- internet Expected: St000041 (quality [20, 100]) Got: St000496 (quality [16, 100]) ********************************************************************** File "src/sage/databases/findstat.py", line 4234, in sage.databases.findstat.?.levels_with_sizes Failed example: cc.levels_with_sizes() # optional -- internet Expected: OrderedDict([(2, 1), (4, 3), (6, 15), (8, 105), (10, 945)]) Got: OrderedDict([(10, 945), (2, 1), (4, 3), (6, 15), (8, 105)]) ********************************************************************** File "src/sage/databases/findstat.py", line 4315, in sage.databases.findstat.?.first_terms Failed example: c.first_terms(lambda x: 1)[:10].list() # optional -- internet Expected: [([[1, 0], [0]], 1), ([[1, 0], [1]], 1), ([[2, 0], [0]], 1), ([[2, 0], [1]], 1), ([[2, 0], [2]], 1), ([[1, 1], [1]], 1), ([[1, 0, 0], [0, 0], [0]], 1), ([[1, 0, 0], [1, 0], [0]], 1), ([[1, 0, 0], [1, 0], [1]], 1), ([[3, 0], [0]], 1)] Got: [([[1, 0], [0]], 1), ([[1, 0], [1]], 1), ([[2, 0], [0]], 1), ([[2, 0], [1]], 1), ([[2, 0], [2]], 1), ([[1, 1], [1]], 1), ([[3, 0], [0]], 1), ([[3, 0], [1]], 1), ([[3, 0], [2]], 1), ([[3, 0], [3]], 1)] ********************************************************************** File "src/sage/databases/findstat.py", line 4725, in sage.databases.findstat.FindStatCollections._element_constructor_ Failed example: sorted([FindStatCollection(c.first_terms(lambda x: 0)[0][0]) for c in FindStatCollections() if c.is_supported()]) # optional -- internet Expected: [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, 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, Cc0024: Binary words, Cc0025: Plane partitions, Cc0026: Decorated permutations, Cc0027: Signed permutations, Cc0028: Skew partitions] Got: [Cc0001: Permutations, Cc0002: Integer partitions, Cc0005: Dyck paths, Cc0006: Integer compositions, Cc0007: Standard tableaux, Cc0009: Set partitions, Cc0009: Set partitions, Cc0010: Binary trees, Cc0013: Cores, Cc0014: Posets, 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, Cc0024: Binary words, Cc0025: Plane partitions, Cc0026: Decorated permutations, Cc0027: Signed permutations, Cc0028: Skew partitions] ********************************************************************** File "src/sage/databases/findstat.py", line 4756, in sage.databases.findstat.FindStatCollections._element_constructor_ Failed example: FindStatCollection(PerfectMatching([[1,2]])) # optional -- internet Expected: Cc0012: Perfect matchings Got: Cc0009: Set partitions ********************************************************************** File "src/sage/databases/findstat.py", line 4759, in sage.databases.findstat.FindStatCollections._element_constructor_ Failed example: FindStatCollection(PerfectMatchings(4)) # optional -- internet Expected: a subset of Cc0012: Perfect matchings Got: a subset of Cc0009: Set partitions ********************************************************************** 11 items had failures: 6 of 18 in sage.databases.findstat 7 of 42 in sage.databases.findstat.? 1 of 4 in sage.databases.findstat.?.first_terms 1 of 4 in sage.databases.findstat.?.levels_with_sizes 3 of 12 in sage.databases.findstat.FindStatCollections._element_constructor_ 1 of 5 in sage.databases.findstat.FindStatStatisticQuery.__getitem__ 1 of 4 in sage.databases.findstat.FindStatStatisticQuery.__repr__ 1 of 5 in sage.databases.findstat.FindStatStatisticQuery._first_terms_raw 1 of 5 in sage.databases.findstat.FindStatStatisticQuery.first_terms 1 of 3 in sage.databases.findstat._get_json 1 of 3 in sage.databases.findstat._post_json [423 tests, 24 failures, 47.62 s] }}} URL: https://trac.sagemath.org/34734 Reported by: mantepse Ticket author(s): Martin Rubey Reviewer(s): Nadia Lafrenière
2 parents 9d8a90d + 83aa1b2 commit bcf41a0

File tree

1 file changed

+63
-48
lines changed

1 file changed

+63
-48
lines changed

src/sage/databases/findstat.py

Lines changed: 63 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,14 @@
118118
advertise yet another way to pass values to FindStat::
119119
120120
sage: r = findstat(Permutations, lambda pi: pi.saliances()[0], depth=2); r # optional -- internet
121-
0: St000740oMp00087 with offset 1 (quality [100, 100])
121+
0: St000740oMp00066 with offset 1 (quality [100, 100])
122+
1: St000740oMp00087 with offset 1 (quality [100, 100])
122123
...
123124
124125
Note that some of the matches are up to a global offset. For
125126
example, we have::
126127
127-
sage: r[0].info() # optional -- internet
128+
sage: r[1].info() # optional -- internet
128129
after adding 1 to every value
129130
and applying
130131
Mp00087: inverse first fundamental transformation: Permutations -> Permutations
@@ -221,7 +222,6 @@ def mapping(sigma):
221222
from sage.databases.oeis import FancyTuple
222223

223224
from ast import literal_eval
224-
from collections import OrderedDict
225225
from copy import deepcopy
226226
import re
227227
import webbrowser
@@ -256,7 +256,7 @@ def mapping(sigma):
256256
from sage.combinat.words.word import Word
257257
from sage.combinat.words.words import Words
258258
from sage.combinat.words.abstract_word import Word_class
259-
from sage.combinat.colored_permutations import SignedPermutations
259+
from sage.combinat.colored_permutations import SignedPermutation, SignedPermutations
260260
from sage.combinat.plane_partition import PlanePartition
261261
from sage.combinat.decorated_permutation import DecoratedPermutation, DecoratedPermutations
262262

@@ -431,10 +431,10 @@ def _get_json(url, **kwargs):
431431
EXAMPLES::
432432
433433
sage: from sage.databases.findstat import _get_json, FINDSTAT_API_MAPS
434-
sage: _get_json(FINDSTAT_API_MAPS + "?xxx=yyy") # optional -- internet
434+
sage: _get_json(FINDSTAT_API_MAPS + "?fields=yyy") # optional -- internet
435435
Traceback (most recent call last):
436436
...
437-
ValueError: E005: On filtering maps, the following parameters are not allowed: [u'xxx'].
437+
ValueError: E018: Unknown fields in Map, Combinatorial map: to semistandard tableau via monotone triangles: ['yyy']
438438
"""
439439
response = requests.get(url)
440440
if response.ok:
@@ -454,10 +454,10 @@ def _post_json(url, data, **kwargs):
454454
EXAMPLES::
455455
456456
sage: from sage.databases.findstat import _post_json, FINDSTAT_API_STATISTICS
457-
sage: _post_json(FINDSTAT_API_STATISTICS, {"xxx": "yyy"}) # optional -- internet
457+
sage: _post_json(FINDSTAT_API_STATISTICS, {"fields": "yyy"}) # optional -- internet
458458
Traceback (most recent call last):
459459
...
460-
ValueError: E005: On filtering statistics, the following parameters are not allowed: ['xxx'].
460+
ValueError: E018: Unknown fields in Statistic, Combinatorial statistic: St000001: ['yyy']
461461
"""
462462
response = requests.post(url, data=data)
463463
if response.ok:
@@ -1007,7 +1007,9 @@ def findstat(query=None, values=None, distribution=None, domain=None,
10071007
sage: findstat((PM, [1 for m in PM])) # optional -- internet
10081008
Traceback (most recent call last):
10091009
...
1010-
ValueError: E016: You passed too few elements (0 < 3) to FindStat!
1010+
ValueError: E016: The statistic finder was unable to perform a search on your data. The following errors have occured:
1011+
<BLANKLINE>
1012+
You passed too few elements (0 < 3) to FindStat!
10111013
10121014
Finally, we can also retrieve all statistics with a given domain::
10131015
@@ -1852,7 +1854,7 @@ def first_terms(self):
18521854
if self._first_terms_cache is None:
18531855
self._first_terms_cache = self._fetch_first_terms()
18541856
# a shallow copy suffices - tuples are immutable
1855-
return OrderedDict(self._first_terms_cache)
1857+
return dict(self._first_terms_cache)
18561858

18571859
def _first_terms_raw(self, max_values):
18581860
"""
@@ -2655,11 +2657,11 @@ def first_terms(self, max_values=FINDSTAT_MAX_SUBMISSION_VALUES):
26552657
0: St000041 (quality [99, 100])
26562658
1: St000042 (quality [99, 100])
26572659
sage: r.first_terms() # optional -- internet
2658-
OrderedDict([([], 0), ([(1, 2)], 0)])
2660+
{[]: 0, [(1, 2)]: 0}
26592661
"""
2660-
return OrderedDict(itertools.islice(((objs[0], vals[0])
2661-
for objs, vals in self._known_terms
2662-
if len(vals) == 1), max_values))
2662+
return dict(itertools.islice(((objs[0], vals[0])
2663+
for objs, vals in self._known_terms
2664+
if len(vals) == 1), max_values))
26632665

26642666
def _first_terms_raw(self, max_values):
26652667
"""
@@ -2693,7 +2695,7 @@ def _generating_functions_dict(self,
26932695
sage: q = findstat(data, depth=0); q # optional -- internet
26942696
0: St000054 (quality [100, 100])
26952697
sage: q.first_terms() # optional -- internet
2696-
OrderedDict([([1, 2], 1)])
2698+
{[1, 2]: 1}
26972699
sage: q.generating_functions() # optional -- internet, indirect doctest
26982700
{3: 2*q^3 + 2*q^2 + 2*q}
26992701
"""
@@ -4232,7 +4234,7 @@ def levels_with_sizes(self):
42324234
sage: from sage.databases.findstat import FindStatCollection
42334235
sage: cc = FindStatCollection("Perfect Matchings") # optional -- internet
42344236
sage: cc.levels_with_sizes() # optional -- internet
4235-
OrderedDict([(2, 1), (4, 3), (6, 15), (8, 105), (10, 945)])
4237+
{2: 1, 4: 3, 6: 15, 8: 105, 10: 945}
42364238
"""
42374239
return self._data["LevelsWithSizes"]
42384240

@@ -4486,8 +4488,10 @@ def name(self, style="singular"):
44864488
"element_to_string",
44874489
"elements_on_level", # return all elements on given level
44884490
"element_level", # return level of a given element
4489-
"is_element"]) # return whether element is member of this collection (and, ideally, of no other collection)
4491+
"is_element"]) # return whether element is member of this collection
44904492

4493+
# this dictionary must be sorted so that subclasses come before
4494+
# superclasses, eg., "StandardTableaux" before "SemistandardTableaux"
44914495
_SupportedFindStatCollections = {
44924496
"Permutations":
44934497
_SupportedFindStatCollection(lambda x: Permutation(literal_eval(x)),
@@ -4501,7 +4505,6 @@ def name(self, style="singular"):
45014505
lambda x: Words([0,1], length=x),
45024506
lambda x: x.length(),
45034507
lambda x: isinstance(x, Word_class)),
4504-
45054508
"AlternatingSignMatrices":
45064509
_SupportedFindStatCollection(lambda x: AlternatingSignMatrix(literal_eval(x)),
45074510
lambda x: str(list(map(list, x.to_matrix().rows()))),
@@ -4549,18 +4552,18 @@ def name(self, style="singular"):
45494552
lambda x: (g.copy(immutable=True) for g in graphs(x, copy=False)),
45504553
lambda x: x.num_verts(),
45514554
lambda x: isinstance(x, Graph)),
4552-
"IntegerCompositions":
4553-
_SupportedFindStatCollection(lambda x: Composition(literal_eval(x)),
4554-
str,
4555-
Compositions,
4556-
lambda x: x.size(),
4557-
lambda x: isinstance(x, Composition)),
45584555
"IntegerPartitions":
45594556
_SupportedFindStatCollection(lambda x: Partition(literal_eval(x)),
45604557
str,
45614558
Partitions,
45624559
lambda x: x.size(),
45634560
lambda x: isinstance(x, Partition)),
4561+
"IntegerCompositions":
4562+
_SupportedFindStatCollection(lambda x: Composition(literal_eval(x)),
4563+
str,
4564+
Compositions,
4565+
lambda x: x.size(),
4566+
lambda x: isinstance(x, Composition)),
45644567
"OrderedTrees":
45654568
_SupportedFindStatCollection(lambda x: OrderedTree(literal_eval(x)),
45664569
str,
@@ -4573,12 +4576,13 @@ def name(self, style="singular"):
45734576
ParkingFunctions,
45744577
len,
45754578
lambda x: isinstance(x, ParkingFunction)),
4576-
"PerfectMatchings":
4577-
_SupportedFindStatCollection(lambda x: PerfectMatching(literal_eval(x)),
4578-
str,
4579-
PerfectMatchings,
4580-
lambda x: x.size(),
4581-
lambda x: isinstance(x, PerfectMatching)),
4579+
"Lattices":
4580+
_SupportedFindStatCollection(lambda x: (lambda R, E: LatticePoset((list(range(E)), R)))(*literal_eval(x)),
4581+
lambda X: str((sorted(X._hasse_diagram.cover_relations()),
4582+
len(X._hasse_diagram.vertices(sort=False)))),
4583+
_finite_lattices,
4584+
lambda x: x.cardinality(),
4585+
lambda x: isinstance(x, FiniteLatticePoset)),
45824586
"Posets":
45834587
_SupportedFindStatCollection(lambda x: (lambda R, E: Poset((list(range(E)), R)))(*literal_eval(x)),
45844588
lambda X: str((sorted(X._hasse_diagram.cover_relations()),
@@ -4592,13 +4596,19 @@ def name(self, style="singular"):
45924596
StandardTableaux,
45934597
lambda x: x.size(),
45944598
lambda x: isinstance(x, StandardTableau)),
4595-
"SemistandardTableaux": # apparently, isinstance(x, SemistandardTableau) is True for StandardTableaux x
4599+
"SemistandardTableaux":
45964600
_SupportedFindStatCollection(lambda x: SemistandardTableau(literal_eval(x)),
45974601
str,
45984602
lambda x: (T for T in SemistandardTableaux(size=x[0], max_entry=x[1])
45994603
if max(T.entries()) == x[1]),
46004604
lambda x: (x.size(), max(x.entries())),
4601-
lambda x: isinstance(x, SemistandardTableau) and not isinstance(x, StandardTableau)),
4605+
lambda x: isinstance(x, SemistandardTableau)),
4606+
"PerfectMatchings":
4607+
_SupportedFindStatCollection(lambda x: PerfectMatching(literal_eval(x)),
4608+
str,
4609+
PerfectMatchings,
4610+
lambda x: x.size(),
4611+
lambda x: isinstance(x, PerfectMatching)),
46024612
"SetPartitions":
46034613
_SupportedFindStatCollection(lambda x: SetPartition(literal_eval(x.replace('{','[').replace('}',']'))),
46044614
str,
@@ -4616,7 +4626,7 @@ def name(self, style="singular"):
46164626
str,
46174627
SignedPermutations,
46184628
lambda x: len(list(x)),
4619-
lambda x: isinstance(x, SignedPermutations.Element)),
4629+
lambda x: isinstance(x, SignedPermutation)),
46204630
"PlanePartitions":
46214631
_SupportedFindStatCollection(lambda x: PlanePartition(literal_eval(x)),
46224632
lambda X: str(list(X)).replace(" ",""),
@@ -4630,14 +4640,7 @@ def name(self, style="singular"):
46304640
for i, v in enumerate(x, 1))) + "]",
46314641
DecoratedPermutations,
46324642
lambda x: x.size(),
4633-
lambda x: isinstance(x, DecoratedPermutation)),
4634-
"Lattices":
4635-
_SupportedFindStatCollection(lambda x: (lambda R, E: LatticePoset((list(range(E)), R)))(*literal_eval(x)),
4636-
lambda X: str((sorted(X._hasse_diagram.cover_relations()),
4637-
len(X._hasse_diagram.vertices(sort=False)))),
4638-
_finite_lattices,
4639-
lambda x: x.cardinality(),
4640-
lambda x: isinstance(x, FiniteLatticePoset))}
4643+
lambda x: isinstance(x, DecoratedPermutation))}
46414644

46424645

46434646
class FindStatCollections(UniqueRepresentation, Parent):
@@ -4689,11 +4692,10 @@ def __init__(self):
46894692
"""
46904693
fields = "LevelsWithSizes,Name,NamePlural,NameWiki"
46914694
url = FINDSTAT_API_COLLECTIONS + "?fields=" + fields
4692-
d = _get_json(url, object_pairs_hook=OrderedDict)
4693-
self._findstat_collections = d["included"]["Collections"]
4694-
for id, data in self._findstat_collections.items():
4695-
data["LevelsWithSizes"] = OrderedDict((literal_eval(level), size)
4696-
for level, size in data["LevelsWithSizes"].items())
4695+
d = _get_json(url, object_pairs_hook=dict)["included"]["Collections"]
4696+
for id, data in d.items():
4697+
data["LevelsWithSizes"] = {literal_eval(level): size
4698+
for level, size in data["LevelsWithSizes"].items()}
46974699
if data["NameWiki"] in _SupportedFindStatCollections:
46984700
data["Code"] = _SupportedFindStatCollections[data["NameWiki"]]
46994701
else:
@@ -4706,7 +4708,13 @@ def __init__(self):
47064708
# fields = "SageCodeElementToString,SageCodeElementsOnLevel,SageCodeStringToElement"
47074709
# url = FINDSTAT_API_COLLECTIONS + id + "?fields=" + fields
47084710
# print(json.load(urlopen(url))["included"]["Collections"][id])
4711+
def position(item):
4712+
try:
4713+
return tuple(_SupportedFindStatCollections).index(item[1]["NameWiki"])
4714+
except ValueError:
4715+
return len(_SupportedFindStatCollections)
47094716

4717+
self._findstat_collections = dict(sorted(d.items(), key=position))
47104718
Parent.__init__(self, category=Sets())
47114719

47124720
def _element_constructor_(self, entry):
@@ -4733,7 +4741,6 @@ def _element_constructor_(self, entry):
47334741
Cc0012: Perfect matchings,
47344742
Cc0013: Cores,
47354743
Cc0014: Posets,
4736-
Cc0014: Posets,
47374744
Cc0017: Alternating sign matrices,
47384745
Cc0018: Gelfand-Tsetlin patterns,
47394746
Cc0019: Semistandard tableaux,
@@ -4745,7 +4752,8 @@ def _element_constructor_(self, entry):
47454752
Cc0025: Plane partitions,
47464753
Cc0026: Decorated permutations,
47474754
Cc0027: Signed permutations,
4748-
Cc0028: Skew partitions]
4755+
Cc0028: Skew partitions,
4756+
Cc0029: Lattices]
47494757
47504758
sage: FindStatCollection(Permutation([1,2,3])) # optional -- internet
47514759
Cc0001: Permutations
@@ -4775,6 +4783,13 @@ def _element_constructor_(self, entry):
47754783
47764784
sage: len(cc.first_terms(lambda x: x.edges(labels=False, sort=False)).list()) # optional -- internet
47774785
4
4786+
4787+
Check that we can override the automatic detection::
4788+
4789+
sage: l = [(T, len(T)) for n in range(1,5) for T in StandardTableaux(n)] # optional -- internet
4790+
sage: qu = findstat("Semistandardtableaux", l, depth=1) # optional -- internet
4791+
sage: qu[0] # optional -- internet
4792+
St000010oMp00077 (quality [100, 100])
47784793
"""
47794794
if isinstance(entry, self.Element):
47804795
return entry

0 commit comments

Comments
 (0)