diff --git a/docs/pictures/to-table.svg b/docs/pictures/to-table.svg index 120bdfbe6..332e7fbec 100644 --- a/docs/pictures/to-table.svg +++ b/docs/pictures/to-table.svg @@ -4,7 +4,7 @@ height="231.103pt" viewBox="0 0 420.566 231.103" version="1.1" - id="svg726" + id="svg2168" sodipodi:docname="to-table.pdf" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -12,408 +12,408 @@ xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> + id="defs322"> + id="g197"> + id="path2" /> + id="path5" /> + id="path8" /> + id="path11" /> + id="path14" /> + id="path17" /> + id="path20" /> + id="path23" /> + id="path26" /> + id="path29" /> + id="path32" /> + id="path35" /> + id="path38" /> + id="path41" /> + id="path44" /> + id="path47" /> + id="path50" /> + id="path53" /> + id="path56" /> + id="path59" /> + id="path62" /> + id="path65" /> + id="path68" /> + id="path71" /> + id="path74" /> + id="path77" /> + id="path80" /> + id="path83" /> + id="path86" /> + id="path89" /> + id="path92" /> + id="path95" /> + id="path98" /> + id="path101" /> + id="path104" /> + id="path107" /> + id="path110" /> + id="path113" /> + id="path116" /> + id="path119" /> + id="path122" /> + id="path125" /> + id="path128" /> + id="path131" /> + id="path134" /> + id="path137" /> + id="path140" /> + id="path143" /> + id="path146" /> + id="path149" /> + id="path152" /> + id="path155" /> + id="path158" /> + id="path161" /> + id="path164" /> + id="path167" /> + id="path170" /> + id="path173" /> + id="path176" /> + id="path179" /> + id="path182" /> + id="path185" /> + id="path188" /> + id="path191" /> + id="path194" /> + id="path199" /> + id="path202" /> + id="path205" /> + id="path208" /> + id="path211" /> + id="path214" /> + id="path217" /> + id="path220" /> + id="path223" /> + id="path226" /> + id="path229" /> + id="path232" /> + id="path235" /> + id="path238" /> + id="path241" /> + id="path244" /> + id="path247" /> + id="path250" /> + id="path253" /> + id="path256" /> + id="path259" /> + id="path262" /> + id="path265" /> + id="path268" /> + id="path271" /> + id="path274" /> + id="path277" /> + id="path280" /> + id="path283" /> + id="path286" /> + id="path289" /> + id="path292" /> + id="path295" /> + id="path298" /> + id="path301" /> + id="path304" /> + id="path307" /> + id="path310" /> + id="path313" /> + id="path316" /> + id="path319" /> + id="path324" /> + id="g346"> + id="use326" /> + id="use328" /> + id="use330" /> + id="use332" /> + id="use334" /> + id="use336" /> + id="use338" /> + id="use340" /> + id="use342" /> + id="use344" /> + id="path348" /> + id="g372"> + id="use350" /> + id="use352" /> + id="use354" /> + id="use356" /> + id="use358" /> + id="use360" /> + id="use362" /> + id="use364" /> + id="use366" /> + id="use368" /> + id="use370" /> + id="path374" /> + id="g414"> + id="use376" /> + id="use378" /> + id="use380" /> + id="use382" /> + id="use384" /> + id="use386" /> + id="use388" /> + id="use390" /> + id="use392" /> + id="use394" /> + id="use396" /> + id="use398" /> + id="use400" /> + id="use402" /> + id="use404" /> + id="use406" /> + id="use408" /> + id="use410" /> + id="use412" /> + id="path416" /> + id="g434"> + id="use418" /> + id="use420" /> + id="use422" /> + id="use424" /> + id="use426" /> + id="use428" /> + id="use430" /> + id="use432" /> + id="path436" /> + id="g460"> + id="use438" /> + id="use440" /> + id="use442" /> + id="use444" /> + id="use446" /> + id="use448" /> + id="use450" /> + id="use452" /> + id="use454" /> + id="use456" /> + id="use458" /> + id="path462" /> + id="g482"> + id="use464" /> + id="use466" /> + id="use468" /> + id="use470" /> + id="use472" /> + id="use474" /> + id="use476" /> + id="use478" /> + id="use480" /> + id="path484" /> + id="g510"> + id="use486" /> + id="use488" /> + id="use490" /> + id="use492" /> + id="use494" /> + id="use496" /> + id="use498" /> + id="use500" /> + id="use502" /> + id="use504" /> + id="use506" /> + id="use508" /> + id="path512" /> + id="g538"> + id="use514" /> + id="use516" /> + id="use518" /> + id="use520" /> + id="use522" /> + id="use524" /> + id="use526" /> + id="use528" /> + id="use530" /> + id="use532" /> + id="use534" /> + id="use536" /> + id="path540" /> + id="g556"> + id="use542" /> + id="use544" /> + id="use546" /> + id="use548" /> + id="use550" /> + id="use552" /> + id="use554" /> + id="path558" /> + id="g582"> + id="use560" /> + id="use562" /> + id="use564" /> + id="use566" /> + id="use568" /> + id="use570" /> + id="use572" /> + id="use574" /> + id="use576" /> + id="use578" /> + id="use580" /> + id="path584" /> + id="g604"> + id="use586" /> + id="use588" /> + id="use590" /> + id="use592" /> + id="use594" /> + id="use596" /> + id="use598" /> + id="use600" /> + id="use602" /> + id="g608"> + id="path606" /> + id="g628"> + id="use610" /> + id="use612" /> + id="use614" /> + id="use616" /> + id="use618" /> + id="use620" /> + id="use622" /> + id="use624" /> + id="use626" /> + id="g664"> + id="use630" /> + id="use632" /> + id="use634" /> + id="use636" /> + id="use638" /> + id="use640" /> + id="use642" /> + id="use644" /> + id="use646" /> + id="use648" /> + id="use650" /> + id="use652" /> + id="use654" /> + id="use656" /> + id="use658" /> + id="use660" /> + id="use662" /> + id="path666" /> + id="path668" /> + id="g672"> + id="use670" /> + id="path674" /> + id="path676" /> + id="g680"> + id="use678" /> + id="path682" /> + id="path684" /> + id="g688"> + id="use686" /> + id="path690" /> + id="path692" /> + id="g696"> + id="use694" /> + id="path698" /> + id="path700" /> + id="g704"> + id="use702" /> + id="path706" /> + id="path708" /> + id="g712"> + id="use710" /> + id="path714" /> + id="path716" /> + id="g720"> + id="use718" /> + id="path722" /> + id="path724" /> + id="g728"> + id="use726" /> + id="path730" /> + id="path732" /> + id="g736"> + id="use734" /> + id="path738" /> + id="path740" /> + id="g744"> + id="use742" /> + id="path746" /> + id="g750"> + id="path748" /> + id="g754"> + id="use752" /> + id="g758"> + id="path756" /> + id="g778"> + id="use760" /> + id="use762" /> + id="use764" /> + id="use766" /> + id="use768" /> + id="use770" /> + id="use772" /> + id="use774" /> + id="use776" /> + id="g816"> + id="use780" /> + id="use782" /> + id="use784" /> + id="use786" /> + id="use788" /> + id="use790" /> + id="use792" /> + id="use794" /> + id="use796" /> + id="use798" /> + id="use800" /> + id="use802" /> + id="use804" /> + id="use806" /> + id="use808" /> + id="use810" /> + id="use812" /> + id="use814" /> + id="path818" /> + id="path820" /> + id="g824"> + id="use822" /> + id="path826" /> + id="path828" /> + id="g832"> + id="use830" /> + id="path834" /> + id="path836" /> + id="g840"> + id="use838" /> + id="path842" /> + id="path844" /> + id="g848"> + id="use846" /> + id="path850" /> + id="path852" /> + id="g856"> + id="use854" /> + id="path858" /> + id="path860" /> + id="g864"> + id="use862" /> + id="path866" /> + id="path868" /> + id="g872"> + id="use870" /> + id="path874" /> + id="path876" /> + id="g880"> + id="use878" /> + id="path882" /> + id="path884" /> + id="g888"> + id="use886" /> + id="path890" /> + id="path892" /> + id="g896"> + id="use894" /> + id="path898" /> + id="g902"> + id="path900" /> + id="g906"> + id="use904" /> + id="g910"> + id="path908" /> + id="g930"> + id="use912" /> + id="use914" /> + id="use916" /> + id="use918" /> + id="use920" /> + id="use922" /> + id="use924" /> + id="use926" /> + id="use928" /> + id="g984"> + id="use932" /> + id="use934" /> + id="use936" /> + id="use938" /> + id="use940" /> + id="use942" /> + id="use944" /> + id="use946" /> + id="use948" /> + id="use950" /> + id="use952" /> + id="use954" /> + id="use956" /> + id="use958" /> + id="use960" /> + id="use962" /> + id="use964" /> + id="use966" /> + id="use968" /> + id="use970" /> + id="use972" /> + id="use974" /> + id="use976" /> + id="use978" /> + id="use980" /> + id="use982" /> + id="path986" /> + id="path988" /> + id="g992"> + id="use990" /> + id="path994" /> + id="path996" /> + id="g1000"> + id="use998" /> + id="path1002" /> + id="path1004" /> + id="g1008"> + id="use1006" /> + id="path1010" /> + id="path1012" /> + id="g1016"> + id="use1014" /> + id="path1018" /> + id="path1020" /> + id="g1024"> + id="use1022" /> + id="path1026" /> + id="path1028" /> + id="g1032"> + id="use1030" /> + id="path1034" /> + id="path1036" /> + id="g1040"> + id="use1038" /> + id="path1042" /> + id="path1044" /> + id="g1048"> + id="use1046" /> + id="path1050" /> + id="path1052" /> + id="g1056"> + id="use1054" /> + id="path1058" /> + id="path1060" /> + id="g1064"> + id="use1062" /> + id="path1066" /> + id="g1070"> + id="path1068" /> + id="g1074"> + id="use1072" /> + id="g1078"> + id="path1076" /> + id="g1098"> + id="use1080" /> + id="use1082" /> + id="use1084" /> + id="use1086" /> + id="use1088" /> + id="use1090" /> + id="use1092" /> + id="use1094" /> + id="use1096" /> + id="g1130"> + id="use1100" /> + id="use1102" /> + id="use1104" /> + id="use1106" /> + id="use1108" /> + id="use1110" /> + id="use1112" /> + id="use1114" /> + id="use1116" /> + id="use1118" /> + id="use1120" /> + id="use1122" /> + id="use1124" /> + id="use1126" /> + id="use1128" /> + id="path1132" /> + id="path1134" /> + id="g1138"> + id="use1136" /> + id="path1140" /> + id="path1142" /> + id="g1146"> + id="use1144" /> + id="path1148" /> + id="path1150" /> + id="g1154"> + id="use1152" /> + id="path1156" /> + id="path1158" /> + id="g1162"> + id="use1160" /> + id="path1164" /> + id="path1166" /> + id="g1170"> + id="use1168" /> + id="path1172" /> + id="path1174" /> + id="g1178"> + id="use1176" /> + id="path1180" /> + id="path1182" /> + id="g1186"> + id="use1184" /> + id="path1188" /> + id="path1190" /> + id="g1194"> + id="use1192" /> + id="path1196" /> + id="path1198" /> + id="g1202"> + id="use1200" /> + id="path1204" /> + id="path1206" /> + id="g1210"> + id="use1208" /> + id="path1212" /> + id="g1216"> + id="path1214" /> + id="g1220"> + id="use1218" /> + id="g1224"> + id="path1222" /> + id="g1244"> + id="use1226" /> + id="use1228" /> + id="use1230" /> + id="use1232" /> + id="use1234" /> + id="use1236" /> + id="use1238" /> + id="use1240" /> + id="use1242" /> + id="g1282"> + id="use1246" /> + id="use1248" /> + id="use1250" /> + id="use1252" /> + id="use1254" /> + id="use1256" /> + id="use1258" /> + id="use1260" /> + id="use1262" /> + id="use1264" /> + id="use1266" /> + id="use1268" /> + id="use1270" /> + id="use1272" /> + id="use1274" /> + id="use1276" /> + id="use1278" /> + id="use1280" /> + id="path1284" /> + id="path1286" /> + id="g1290"> + id="use1288" /> + id="path1292" /> + id="path1294" /> + id="g1298"> + id="use1296" /> + id="path1300" /> + id="path1302" /> + id="g1306"> + id="use1304" /> + id="path1308" /> + id="path1310" /> + id="g1314"> + id="use1312" /> + id="path1316" /> + id="path1318" /> + id="g1322"> + id="use1320" /> + id="path1324" /> + id="path1326" /> + id="g1330"> + id="use1328" /> + id="path1332" /> + id="path1334" /> + id="g1338"> + id="use1336" /> + id="path1340" /> + id="path1342" /> + id="g1346"> + id="use1344" /> + id="path1348" /> + id="path1350" /> + id="g1354"> + id="use1352" /> + id="path1356" /> + id="path1358" /> + id="g1362"> + id="use1360" /> + id="path1364" /> + id="g1368"> + id="path1366" /> + id="g1372"> + id="use1370" /> + id="g1376"> + id="path1374" /> + id="g1396"> + id="use1378" /> + id="use1380" /> + id="use1382" /> + id="use1384" /> + id="use1386" /> + id="use1388" /> + id="use1390" /> + id="use1392" /> + id="use1394" /> + id="g1430"> + id="use1398" /> + id="use1400" /> + id="use1402" /> + id="use1404" /> + id="use1406" /> + id="use1408" /> + id="use1410" /> + id="use1412" /> + id="use1414" /> + id="use1416" /> + id="use1418" /> + id="use1420" /> + id="use1422" /> + id="use1424" /> + id="use1426" /> + id="use1428" /> + id="path1432" /> + id="path1434" /> + id="g1438"> + id="use1436" /> + id="path1440" /> + id="path1442" /> + id="g1446"> + id="use1444" /> + id="path1448" /> + id="path1450" /> + id="g1454"> + id="use1452" /> + id="path1456" /> + id="path1458" /> + id="g1462"> + id="use1460" /> + id="path1464" /> + id="path1466" /> + id="g1470"> + id="use1468" /> + id="path1472" /> + id="path1474" /> + id="g1478"> + id="use1476" /> + id="path1480" /> + id="path1482" /> + id="g1486"> + id="use1484" /> + id="path1488" /> + id="path1490" /> + id="g1494"> + id="use1492" /> + id="path1496" /> + id="path1498" /> + id="g1502"> + id="use1500" /> + id="path1504" /> + id="path1506" /> + id="g1510"> + id="use1508" /> + id="path1512" /> + id="g1516"> + id="path1514" /> + id="g1520"> + id="use1518" /> + id="g1524"> + id="path1522" /> + id="g1544"> + id="use1526" /> + id="use1528" /> + id="use1530" /> + id="use1532" /> + id="use1534" /> + id="use1536" /> + id="use1538" /> + id="use1540" /> + id="use1542" /> + id="g1584"> + id="use1546" /> + id="use1548" /> + id="use1550" /> + id="use1552" /> + id="use1554" /> + id="use1556" /> + id="use1558" /> + id="use1560" /> + id="use1562" /> + id="use1564" /> + id="use1566" /> + id="use1568" /> + id="use1570" /> + id="use1572" /> + id="use1574" /> + id="use1576" /> + id="use1578" /> + id="use1580" /> + id="use1582" /> + id="path1586" /> + id="path1588" /> + id="g1592"> + id="use1590" /> + id="path1594" /> + id="path1596" /> + id="g1600"> + id="use1598" /> + id="path1602" /> + id="path1604" /> + id="g1608"> + id="use1606" /> + id="path1610" /> + id="path1612" /> + id="g1616"> + id="use1614" /> + id="path1618" /> + id="path1620" /> + id="g1624"> + id="use1622" /> + id="path1626" /> + id="path1628" /> + id="g1632"> + id="use1630" /> + id="path1634" /> + id="path1636" /> + id="g1640"> + id="use1638" /> + id="path1642" /> + id="path1644" /> + id="g1648"> + id="use1646" /> + id="path1650" /> + id="path1652" /> + id="g1656"> + id="use1654" /> + id="path1658" /> + id="path1660" /> + id="g1664"> + id="use1662" /> + id="path1666" /> + id="g1670"> + id="path1668" /> + id="g1674"> + id="use1672" /> + id="g1678"> + id="path1676" /> + id="g1698"> + id="use1680" /> + id="use1682" /> + id="use1684" /> + id="use1686" /> + id="use1688" /> + id="use1690" /> + id="use1692" /> + id="use1694" /> + id="use1696" /> + id="g1738"> + id="use1700" /> + id="use1702" /> + id="use1704" /> + id="use1706" /> + id="use1708" /> + id="use1710" /> + id="use1712" /> + id="use1714" /> + id="use1716" /> + id="use1718" /> + id="use1720" /> + id="use1722" /> + id="use1724" /> + id="use1726" /> + id="use1728" /> + id="use1730" /> + id="use1732" /> + id="use1734" /> + id="use1736" /> + id="path1740" /> + id="path1742" /> + id="g1746"> + id="use1744" /> + id="path1748" /> + id="path1750" /> + id="g1754"> + id="use1752" /> + id="path1756" /> + id="path1758" /> + id="g1762"> + id="use1760" /> + id="path1764" /> + id="path1766" /> + id="g1770"> + id="use1768" /> + id="path1772" /> + id="path1774" /> + id="g1778"> + id="use1776" /> + id="path1780" /> + id="path1782" /> + id="g1786"> + id="use1784" /> + id="path1788" /> + id="path1790" /> + id="g1794"> + id="use1792" /> + id="path1796" /> + id="path1798" /> + id="g1802"> + id="use1800" /> + id="path1804" /> + id="path1806" /> + id="g1810"> + id="use1808" /> + id="path1812" /> + id="path1814" /> + id="g1818"> + id="use1816" /> + id="path1820" /> + id="g1824"> + id="path1822" /> + id="g1828"> + id="use1826" /> + id="g1832"> + id="path1830" /> + id="g1852"> + id="use1834" /> + id="use1836" /> + id="use1838" /> + id="use1840" /> + id="use1842" /> + id="use1844" /> + id="use1846" /> + id="use1848" /> + id="use1850" /> + id="g1882"> + id="use1854" /> + id="use1856" /> + id="use1858" /> + id="use1860" /> + id="use1862" /> + id="use1864" /> + id="use1866" /> + id="use1868" /> + id="use1870" /> + id="use1872" /> + id="use1874" /> + id="use1876" /> + id="use1878" /> + id="use1880" /> + id="path1884" /> + id="path1886" /> + id="g1890"> + id="use1888" /> + id="path1892" /> + id="path1894" /> + id="g1898"> + id="use1896" /> + id="path1900" /> + id="path1902" /> + id="g1906"> + id="use1904" /> + id="path1908" /> + id="path1910" /> + id="g1914"> + id="use1912" /> + id="path1916" /> + id="path1918" /> + id="g1922"> + id="use1920" /> + id="path1924" /> + id="path1926" /> + id="g1930"> + id="use1928" /> + id="path1932" /> + id="path1934" /> + id="g1938"> + id="use1936" /> + id="path1940" /> + id="path1942" /> + id="g1946"> + id="use1944" /> + id="path1948" /> + id="path1950" /> + id="g1954"> + id="use1952" /> + id="path1956" /> + id="path1958" /> + id="g1962"> + id="use1960" /> + id="path1964" /> + id="g1968"> + id="path1966" /> + id="g1972"> + id="use1970" /> + id="g1976"> + id="path1974" /> + id="g1996"> + id="use1978" /> + id="use1980" /> + id="use1982" /> + id="use1984" /> + id="use1986" /> + id="use1988" /> + id="use1990" /> + id="use1992" /> + id="use1994" /> + id="g2034"> + id="use1998" /> + id="use2000" /> + id="use2002" /> + id="use2004" /> + id="use2006" /> + id="use2008" /> + id="use2010" /> + id="use2012" /> + id="use2014" /> + id="use2016" /> + id="use2018" /> + id="use2020" /> + id="use2022" /> + id="use2024" /> + id="use2026" /> + id="use2028" /> + id="use2030" /> + id="use2032" /> + id="g2038"> + id="path2036" /> + id="g2042"> + id="path2040" /> + id="g2046"> + id="use2044" /> + id="g2050"> + id="path2048" /> + id="g2054"> + id="path2052" /> + id="g2058"> + id="use2056" /> + id="g2062"> + id="path2060" /> + id="g2066"> + id="path2064" /> + id="g2070"> + id="use2068" /> + id="g2074"> + id="path2072" /> + id="g2078"> + id="path2076" /> + id="g2082"> + id="use2080" /> + id="g2086"> + id="path2084" /> + id="g2090"> + id="path2088" /> + id="g2094"> + id="use2092" /> + id="g2098"> + id="path2096" /> + id="g2102"> + id="path2100" /> + id="g2106"> + id="use2104" /> + id="g2110"> + id="path2108" /> + id="g2114"> + id="path2112" /> + id="g2118"> + id="use2116" /> + id="g2122"> + id="path2120" /> + id="g2126"> + id="path2124" /> + id="g2130"> + id="use2128" /> + id="g2134"> + id="path2132" /> + id="g2138"> + id="path2136" /> + id="g2142"> + id="use2140" /> + id="g2146"> + id="path2144" /> + id="g2150"> + id="path2148" /> + id="g2154"> + id="use2152" /> + id="g2158"> + id="path2156" /> + id="g2162"> + id="path2160" /> + id="g2166"> + id="use2164" /> diff --git a/pyproject.toml b/pyproject.toml index d68f317ff..f25aba8f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,10 +136,9 @@ line-length = 100 [tool.ruff.lint] ignore = [ - "E111", # indentation-with-invalid-multiple - "E114", # indentation-with-invalid-multiple-comment - "E117", # over-indented - "F401", # unused-import + "E111", # indentation-with-invalid-multiple + "E114", # indentation-with-invalid-multiple-comment + "E117", # over-indented "SIM108", # use-ternary-operator ] select = [ @@ -156,12 +155,14 @@ select = [ "setup.py" = [ "E402", # module-import-not-at-top-of-file ] +"src/libsemigroups_pybind11/__init__.py" = ["F403"] "src/libsemigroups_pybind11/presentation/examples.py" = [ "E501", # line-too-long ] "tests/test_constants.py" = ["SIM"] [tool.ruff.lint.isort] +classes = ["PBR"] # This tells ruff PBR is a class, not a constant combine-as-imports = true known-first-party = ["_libsemigroups_pybind11"] split-on-trailing-comma = false diff --git a/src/libsemigroups_pybind11/__init__.py b/src/libsemigroups_pybind11/__init__.py index 25bd333f2..132396e2d 100644 --- a/src/libsemigroups_pybind11/__init__.py +++ b/src/libsemigroups_pybind11/__init__.py @@ -6,32 +6,43 @@ """This package provides the user-facing python part of libsemigroups_pybind11""" -import libsemigroups_pybind11.aho_corasick -import libsemigroups_pybind11.bipartition -import libsemigroups_pybind11.blocks -import libsemigroups_pybind11.bmat8 -import libsemigroups_pybind11.congruence -import libsemigroups_pybind11.forest -import libsemigroups_pybind11.froidure_pin -import libsemigroups_pybind11.hpcombi -import libsemigroups_pybind11.kambites -import libsemigroups_pybind11.knuth_bendix -import libsemigroups_pybind11.matrix -import libsemigroups_pybind11.paths -import libsemigroups_pybind11.pbr -import libsemigroups_pybind11.sims -import libsemigroups_pybind11.stephen -import libsemigroups_pybind11.todd_coxeter -import libsemigroups_pybind11.ukkonen -import libsemigroups_pybind11.word_graph -import libsemigroups_pybind11.words - -from ._version import version as __version__ +from . import ( + action, + adapters, + aho_corasick, + bipartition, + blocks, + bmat8, + congruence, + forest, + froidure_pin, + hpcombi, + kambites, + knuth_bendix, + konieczny, + matrix, + paths, + pbr, + presentation, + schreier_sims, + sims, + stephen, + todd_coxeter, + transf, + ukkonen, + word_graph, + words, +) +from ._version import __version__ from .action import Action, LeftAction, RightAction from .adapters import ImageLeftAction, ImageRightAction +from .bipartition import Bipartition +from .blocks import Blocks from .congruence import Congruence -from .detail.dot import _Dot as Dot +from .detail.dot import Dot +from .forest import PathsFromRoots, PathsToRoots from .froidure_pin import FroidurePin +from .hpcombi import LIBSEMIGROUPS_HPCOMBI_ENABLED from .is_obviously_infinite import is_obviously_infinite from .kambites import Kambites from .knuth_bendix import KnuthBendix @@ -45,7 +56,11 @@ from .todd_coxeter import ToddCoxeter from .transf import Perm, PPerm, Transf -DISCLAIMER = ( +if LIBSEMIGROUPS_HPCOMBI_ENABLED: + from .hpcombi import Perm16, PPerm16, PTransf16, Transf16, Vect16 + + +_DISCLAIMER = ( "(You should not see this message unless you are installing libsemigroups_pybind11 from its " "sources. If you are not installing from the sources, please raise an issue at " "https://github.com/libsemigroups/libsemigroups_pybind11)" @@ -54,17 +69,12 @@ try: from _libsemigroups_pybind11 import ( LIBSEMIGROUPS_EIGEN_ENABLED, - LIBSEMIGROUPS_HPCOMBI_ENABLED, LIMIT_MAX, NEGATIVE_INFINITY, - PBR, POSITIVE_INFINITY, UNDEFINED, AhoCorasick, - Bipartition, - Blocks, BMat8, - Dot, Forest, Gabow, Joiner, @@ -74,6 +84,7 @@ NegativeInfinity, Order, Paths, + PBR, PositiveInfinity, Reporter, ReportGuard, @@ -103,12 +114,120 @@ except ModuleNotFoundError as e: raise ModuleNotFoundError( f'{e.msg}, did you forget to run "pip install ." in the libsemigroups_pybind11 ' - f"directory? {DISCLAIMER}" + f"directory? {_DISCLAIMER}" ) from e -# The following fools sphinx into thinking that MatrixKind + Matrix are not -# aliases. -Matrix.__module__ = __name__ -Matrix.__name__ = "Matrix" -MatrixKind.__module__ = __name__ -MatrixKind.__name__ = "MatrixKind" + +__all__ = [ + "__version__", + # Constants from _libsemigruops_pybind11 + "LIBSEMIGROUPS_EIGEN_ENABLED", + "LIMIT_MAX", + "NEGATIVE_INFINITY", + "POSITIVE_INFINITY", + "UNDEFINED", + # Classes from _libsemigroups_pybind11 + "AhoCorasick", + "BMat8", + "Forest", + "Gabow", + "Joiner", + "LibsemigroupsError", + "LimitMax", + "Meeter", + "NegativeInfinity", + "Order", + "Paths", + "PBR", + "PositiveInfinity", + "Reporter", + "ReportGuard", + "Runner", + "SimsStats", + "StringRange", + "ToString", + "ToWord", + "Ukkonen", + "Undefined", + "WordGraph", + "WordRange", + # Free functions from _libsemigroups_pybind11 + "congruence_kind", + "delta", + "error_message_with_prefix", + "freeband_equal_to", + "lexicographical_compare", + "number_of_words", + "random_string", + "random_strings", + "random_word", + "recursive_path_compare", + "shortlex_compare", + "side", + "tril", + # Submodules + "action", + "adapters", + "aho_corasick", + "bipartition", + "blocks", + "bmat8", + "congruence", + "forest", + "froidure_pin", + "hpcombi", + "kambites", + "knuth_bendix", + "konieczny", + "matrix", + "paths", + "pbr", + "presentation", + "schreier_sims", + "sims", + "stephen", + "todd_coxeter", + "transf", + "ukkonen", + "word_graph", + "words", + # Classes defined in submodules + "Action", + "Bipartition", + "Blocks", + "Congruence", + "Dot", + "FroidurePin", + "ImageLeftAction", + "ImageRightAction", + "InversePresentation", + "Kambites", + "KnuthBendix", + "Konieczny", + "LeftAction", + "LIBSEMIGROUPS_HPCOMBI_ENABLED", + "Matrix", + "MatrixKind", + "MinimalRepOrc", + "PathsFromRoots", + "PathsToRoots", + "Perm", + "PPerm", + "Presentation", + "RepOrc", + "RightAction", + "SchreierSims", + "Sims1", + "Sims2", + "SimsRefinerFaithful", + "SimsRefinerIdeals", + "Stephen", + "ToddCoxeter", + "Transf", + # Free functions from submodules + "to", + "is_obviously_infinite", +] + +if LIBSEMIGROUPS_HPCOMBI_ENABLED: + __all__ += ["Perm16", "PPerm16", "PTransf16", "Transf16", "Vect16"] diff --git a/src/libsemigroups_pybind11/action.py b/src/libsemigroups_pybind11/action.py index 4287daa5f..238d53599 100644 --- a/src/libsemigroups_pybind11/action.py +++ b/src/libsemigroups_pybind11/action.py @@ -50,7 +50,6 @@ to_py as _to_py, ) from .detail.decorators import copydoc as _copydoc -from .transf import PPerm as _PPerm, Transf as _Transf ######################################################################## # Action python class @@ -267,3 +266,6 @@ def __init__(self: _Self, *args, generators=None, seeds=None) -> None: .. include:: ../../_static/runner_non_inherit.rst """ super().__init__(generators=generators, seeds=seeds, side=_side.left, func=_ImageLeftAction) + + +__all__ = ["Action", "LeftAction", "RightAction"] diff --git a/src/libsemigroups_pybind11/adapters.py b/src/libsemigroups_pybind11/adapters.py index fe094c1e3..203b8d24b 100644 --- a/src/libsemigroups_pybind11/adapters.py +++ b/src/libsemigroups_pybind11/adapters.py @@ -141,3 +141,6 @@ class ImageLeftAction(_ImageAction): @_copydoc(_ImageLeftActionPPerm1PPerm1.__call__) def __call__(self: _Self, pt: Point, x: Element) -> Point: return _to_py(_to_cxx(self)(_to_cxx(pt), _to_cxx(x))) + + +__all__ = ["ImageLeftAction", "ImageRightAction"] diff --git a/src/libsemigroups_pybind11/aho_corasick.py b/src/libsemigroups_pybind11/aho_corasick.py index 3a932b7b5..906ac6dab 100644 --- a/src/libsemigroups_pybind11/aho_corasick.py +++ b/src/libsemigroups_pybind11/aho_corasick.py @@ -11,9 +11,11 @@ as free functions instead. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import +from _libsemigroups_pybind11 import ( aho_corasick_add_word as add_word, aho_corasick_dot as dot, aho_corasick_rm_word as rm_word, aho_corasick_traverse_word as traverse_word, ) + +__all__ = ["add_word", "dot", "rm_word", "traverse_word"] diff --git a/src/libsemigroups_pybind11/bipartition.py b/src/libsemigroups_pybind11/bipartition.py index c66b10a90..9aa2ee403 100644 --- a/src/libsemigroups_pybind11/bipartition.py +++ b/src/libsemigroups_pybind11/bipartition.py @@ -8,10 +8,12 @@ contains helper functions for the :any:`Bipartition` class. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import +from _libsemigroups_pybind11 import ( Bipartition, bipartition_one as one, bipartition_random as random, bipartition_underlying_partition as underlying_partition, bipartition_uniform_random as uniform_random, ) + +__all__ = ["Bipartition", "one", "random", "underlying_partition", "uniform_random"] diff --git a/src/libsemigroups_pybind11/blocks.py b/src/libsemigroups_pybind11/blocks.py index f4342d48c..b065fa1fd 100644 --- a/src/libsemigroups_pybind11/blocks.py +++ b/src/libsemigroups_pybind11/blocks.py @@ -8,7 +8,6 @@ contains helper functions for the :any:`Blocks` class. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import - Blocks, - blocks_underlying_partition as underlying_partition, -) +from _libsemigroups_pybind11 import Blocks, blocks_underlying_partition as underlying_partition + +__all__ = ["Blocks", "underlying_partition"] diff --git a/src/libsemigroups_pybind11/bmat8.py b/src/libsemigroups_pybind11/bmat8.py index 782270a96..9cc82e772 100644 --- a/src/libsemigroups_pybind11/bmat8.py +++ b/src/libsemigroups_pybind11/bmat8.py @@ -8,7 +8,7 @@ ``libsemigroups_pybind11.bmat8``. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import +from _libsemigroups_pybind11 import ( bmat8_col_space_basis as col_space_basis, bmat8_col_space_size as col_space_size, bmat8_is_regular_element as is_regular_element, @@ -22,3 +22,18 @@ bmat8_rows as rows, bmat8_transpose as transpose, ) + +__all__ = [ + "col_space_basis", + "col_space_size", + "is_regular_element", + "minimum_dim", + "number_of_cols", + "number_of_rows", + "one", + "random", + "row_space_basis", + "row_space_size", + "rows", + "transpose", +] diff --git a/src/libsemigroups_pybind11/congruence.py b/src/libsemigroups_pybind11/congruence.py index d2d66bc06..d9300f582 100644 --- a/src/libsemigroups_pybind11/congruence.py +++ b/src/libsemigroups_pybind11/congruence.py @@ -128,3 +128,5 @@ def has(self: _Self, t: type) -> bool: partition = _wrap_cxx_free_fn(_congruence_partition) non_trivial_classes = _wrap_cxx_free_fn(_congruence_non_trivial_classes) + +__all__ = ["Congruence", "partition", "non_trivial_classes"] diff --git a/src/libsemigroups_pybind11/detail/congruence_common.py b/src/libsemigroups_pybind11/detail/congruence_common.py index 0db454791..202132625 100644 --- a/src/libsemigroups_pybind11/detail/congruence_common.py +++ b/src/libsemigroups_pybind11/detail/congruence_common.py @@ -11,7 +11,6 @@ from typing_extensions import Self from _libsemigroups_pybind11 import congruence_kind as _congruence_kind -from libsemigroups_pybind11.presentation import Presentation as _Presentation from .cxx_wrapper import CxxWrapper as _CxxWrapper, to_cxx as _to_cxx diff --git a/src/libsemigroups_pybind11/detail/dot.py b/src/libsemigroups_pybind11/detail/dot.py index e584805a3..a763a9f00 100644 --- a/src/libsemigroups_pybind11/detail/dot.py +++ b/src/libsemigroups_pybind11/detail/dot.py @@ -11,7 +11,7 @@ from graphviz import Source as _Source -from _libsemigroups_pybind11 import Dot as _Dot +from _libsemigroups_pybind11 import Dot def _view( # pylint: disable=too-many-arguments, too-many-positional-arguments @@ -39,4 +39,4 @@ def _view( # pylint: disable=too-many-arguments, too-many-positional-arguments s.view() -_Dot.view = _view +Dot.view = _view diff --git a/src/libsemigroups_pybind11/forest.py b/src/libsemigroups_pybind11/forest.py index e77b8b8a1..e12d7ecc0 100644 --- a/src/libsemigroups_pybind11/forest.py +++ b/src/libsemigroups_pybind11/forest.py @@ -9,9 +9,7 @@ contained in the submodule ``forest``. """ -from typing_extensions import Self as _Self - -from _libsemigroups_pybind11 import ( # pylint: disable= unused-import +from _libsemigroups_pybind11 import ( forest_depth as depth, forest_dot as dot, forest_is_root as is_root, @@ -23,8 +21,19 @@ ) # The following fools sphinx into thinking that PathsToRoots is not an -# aliases. +# alias. PathsFromRoots.__module__ = __name__ PathsFromRoots.__name__ = "PathsFromRoots" PathsToRoots.__module__ = __name__ PathsToRoots.__name__ = "PathsToRoots" + +__all__ = [ + "PathsFromRoots", + "PathsToRoots", + "depth", + "dot", + "is_root", + "max_label", + "path_from_root", + "path_to_root", +] diff --git a/src/libsemigroups_pybind11/froidure_pin.py b/src/libsemigroups_pybind11/froidure_pin.py index 6a216784f..839c6de2e 100644 --- a/src/libsemigroups_pybind11/froidure_pin.py +++ b/src/libsemigroups_pybind11/froidure_pin.py @@ -19,7 +19,6 @@ from _libsemigroups_pybind11 import ( LIBSEMIGROUPS_HPCOMBI_ENABLED as _LIBSEMIGROUPS_HPCOMBI_ENABLED, - PBR as _PBR, Bipartition as _Bipartition, BMat as _BMat, BMat8 as _BMat8, @@ -61,6 +60,7 @@ MinPlusMat as _MinPlusMat, MinPlusTruncMat as _MinPlusTruncMat, NTPMat as _NTPMat, + PBR as _PBR, Perm1 as _Perm1, Perm2 as _Perm2, Perm4 as _Perm4, @@ -265,14 +265,14 @@ def sorted_elements( # pylint: disable=missing-function-docstring # TODO(1) be good to get the notes about enumeration being triggered or not, in # this doc -dot_current_left_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_current_left_cayley_graph) -dot_current_right_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_current_right_cayley_graph) -dot_left_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_left_cayley_graph) -dot_right_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_right_cayley_graph) current_minimal_factorisation = _wrap_cxx_free_fn(_froidure_pin_current_minimal_factorisation) current_normal_forms = _wrap_cxx_free_fn(_froidure_pin_current_normal_forms) current_position = _wrap_cxx_free_fn(_froidure_pin_current_position) current_rules = _wrap_cxx_free_fn(_froidure_pin_current_rules) +dot_current_left_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_current_left_cayley_graph) +dot_current_right_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_current_right_cayley_graph) +dot_left_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_left_cayley_graph) +dot_right_cayley_graph = _wrap_cxx_free_fn(_froidure_pin_dot_right_cayley_graph) equal_to = _wrap_cxx_free_fn(_froidure_pin_equal_to) factorisation = _wrap_cxx_free_fn(_froidure_pin_factorisation) minimal_factorisation = _wrap_cxx_free_fn(_froidure_pin_minimal_factorisation) @@ -281,3 +281,23 @@ def sorted_elements( # pylint: disable=missing-function-docstring product_by_reduction = _wrap_cxx_free_fn(_froidure_pin_product_by_reduction) rules = _wrap_cxx_free_fn(_froidure_pin_rules) to_element = _wrap_cxx_free_fn(_froidure_pin_to_element) + +__all__ = [ + "FroidurePin", + "current_minimal_factorisation", + "current_normal_forms", + "current_position", + "current_rules", + "dot_current_left_cayley_graph", + "dot_current_right_cayley_graph", + "dot_left_cayley_graph", + "dot_right_cayley_graph", + "equal_to", + "factorisation", + "minimal_factorisation", + "normal_forms", + "position", + "product_by_reduction", + "rules", + "to_element", +] diff --git a/src/libsemigroups_pybind11/hpcombi.py b/src/libsemigroups_pybind11/hpcombi.py index 990d18b58..8793ad9c5 100644 --- a/src/libsemigroups_pybind11/hpcombi.py +++ b/src/libsemigroups_pybind11/hpcombi.py @@ -10,6 +10,8 @@ from _libsemigroups_pybind11 import LIBSEMIGROUPS_HPCOMBI_ENABLED +__all__ = ["LIBSEMIGROUPS_HPCOMBI_ENABLED"] + if LIBSEMIGROUPS_HPCOMBI_ENABLED: from _libsemigroups_pybind11 import ( # pylint: disable=no-name-in-module hpcombi_Perm16 as Perm16, @@ -32,3 +34,5 @@ Transf16.__name__ = "Transf16" Vect16.__module__ = __name__ Vect16.__name__ = "Vect16" + + __all__ += ["Perm16", "PPerm16", "PTransf16", "Transf16", "Vect16"] diff --git a/src/libsemigroups_pybind11/is_obviously_infinite.py b/src/libsemigroups_pybind11/is_obviously_infinite.py index fde937cc5..75d765b22 100644 --- a/src/libsemigroups_pybind11/is_obviously_infinite.py +++ b/src/libsemigroups_pybind11/is_obviously_infinite.py @@ -14,3 +14,5 @@ from .detail.cxx_wrapper import wrap_cxx_free_fn as _wrap_cxx_free_fn is_obviously_infinite = _wrap_cxx_free_fn(_is_obviously_infinite) + +__all__ = ["is_obviously_infinite"] diff --git a/src/libsemigroups_pybind11/kambites.py b/src/libsemigroups_pybind11/kambites.py index 47d07da18..2855befc0 100644 --- a/src/libsemigroups_pybind11/kambites.py +++ b/src/libsemigroups_pybind11/kambites.py @@ -14,7 +14,6 @@ KambitesMultiViewString as _KambitesMultiViewString, KambitesString as _KambitesString, KambitesWord as _KambitesWord, - congruence_kind as _congruence_kind, kambites_non_trivial_classes as _kambites_non_trivial_classes, kambites_normal_forms as _kambites_normal_forms, kambites_partition as _kambites_partition, @@ -70,6 +69,8 @@ def __init__(self: _Self, *args, **kwargs) -> None: _register_cxx_wrapped_type(_KambitesMultiViewString, Kambites) _register_cxx_wrapped_type(_KambitesString, Kambites) -partition = _wrap_cxx_free_fn(_kambites_partition) non_trivial_classes = _wrap_cxx_free_fn(_kambites_non_trivial_classes) normal_forms = _wrap_cxx_free_fn(_kambites_normal_forms) +partition = _wrap_cxx_free_fn(_kambites_partition) + +__all__ = ["Kambites", "non_trivial_classes", "normal_forms", "partition"] diff --git a/src/libsemigroups_pybind11/knuth_bendix.py b/src/libsemigroups_pybind11/knuth_bendix.py index 3cd5e7a89..ac2410d47 100644 --- a/src/libsemigroups_pybind11/knuth_bendix.py +++ b/src/libsemigroups_pybind11/knuth_bendix.py @@ -14,7 +14,6 @@ KnuthBendixStringRewriteTrie as _KnuthBendixStringRewriteTrie, KnuthBendixWordRewriteFromLeft as _KnuthBendixWordRewriteFromLeft, KnuthBendixWordRewriteTrie as _KnuthBendixWordRewriteTrie, - congruence_kind as _congruence_kind, knuth_bendix_by_overlap_length as _knuth_bendix_by_overlap_length, knuth_bendix_is_reduced as _knuth_bendix_is_reduced, knuth_bendix_non_trivial_classes as _knuth_bendix_non_trivial_classes, @@ -110,3 +109,13 @@ def __init__(self, *args, rewriter="RewriteTrie", **kwargs) -> None: normal_forms = _wrap_cxx_free_fn(_knuth_bendix_normal_forms) partition = _wrap_cxx_free_fn(_knuth_bendix_partition) redundant_rule = _wrap_cxx_free_fn(_knuth_bendix_redundant_rule) + +__all__ = [ + "KnuthBendix", + "by_overlap_length", + "is_reduced", + "non_trivial_classes", + "normal_forms", + "partition", + "redundant_rule", +] diff --git a/src/libsemigroups_pybind11/konieczny.py b/src/libsemigroups_pybind11/konieczny.py index 199607302..8321659f9 100644 --- a/src/libsemigroups_pybind11/konieczny.py +++ b/src/libsemigroups_pybind11/konieczny.py @@ -212,3 +212,5 @@ def D_classes(self: _Self) -> _Iterator[DClass]: Konieczny.DClass._py_template_params_to_cxx_type.values() # pylint: disable=protected-access ): _register_cxx_wrapped_type(_type, Konieczny.DClass) + +__all__ = ["Konieczny"] diff --git a/src/libsemigroups_pybind11/matrix.py b/src/libsemigroups_pybind11/matrix.py index 6f681aa63..717ae5a97 100644 --- a/src/libsemigroups_pybind11/matrix.py +++ b/src/libsemigroups_pybind11/matrix.py @@ -184,13 +184,22 @@ def __hash__(self: _Self) -> int: return _to_cxx(self).__hash__() +# The following fools sphinx into thinking that MatrixKind + Matrix are not +# aliases. +Matrix.__module__ = __name__ +Matrix.__name__ = "Matrix" +MatrixKind.__module__ = __name__ +MatrixKind.__name__ = "MatrixKind" + _copy_cxx_mem_fns(_NTPMat, Matrix) ######################################################################## # Helper functions ######################################################################## -row_space_size = _wrap_cxx_free_fn(_row_space_size) period = _wrap_cxx_free_fn(_period) row_basis = _wrap_cxx_free_fn(_row_basis) +row_space_size = _wrap_cxx_free_fn(_row_space_size) threshold = _wrap_cxx_free_fn(_threshold) + +__all__ = ["MatrixKind", "Matrix", "period", "row_basis", "row_space_size", "threshold"] diff --git a/src/libsemigroups_pybind11/paths.py b/src/libsemigroups_pybind11/paths.py index a4e9230a5..20dc4178e 100644 --- a/src/libsemigroups_pybind11/paths.py +++ b/src/libsemigroups_pybind11/paths.py @@ -8,7 +8,7 @@ contains helper functions for the :any:`Paths` class. """ -from _libsemigroups_pybind11 import ( # pylint: disable=no-name-in-module,unused-import +from _libsemigroups_pybind11 import ( paths_algorithm as algorithm, paths_number_of_paths as number_of_paths, paths_number_of_paths_algorithm as number_of_paths_algorithm, @@ -18,3 +18,5 @@ # alias. algorithm.__module__ = __name__ algorithm.__name__ = "algorithm" + +__all__ = ["algorithm", "number_of_paths", "number_of_paths_algorithm"] diff --git a/src/libsemigroups_pybind11/pbr.py b/src/libsemigroups_pybind11/pbr.py index 292e8d90f..df5e3598a 100644 --- a/src/libsemigroups_pybind11/pbr.py +++ b/src/libsemigroups_pybind11/pbr.py @@ -8,4 +8,6 @@ contains helper functions for the :any:`PBR` class. """ -from _libsemigroups_pybind11 import pbr_one as one # pylint: disable=unused-import +from _libsemigroups_pybind11 import pbr_one as one + +__all__ = ["one"] diff --git a/src/libsemigroups_pybind11/presentation/__init__.py b/src/libsemigroups_pybind11/presentation/__init__.py index 78232d8d6..ab3cac381 100644 --- a/src/libsemigroups_pybind11/presentation/__init__.py +++ b/src/libsemigroups_pybind11/presentation/__init__.py @@ -56,14 +56,16 @@ presentation_to_gap_string as _to_gap_string, presentation_try_detect_inverses as _try_detect_inverses, ) -from libsemigroups_pybind11.detail.cxx_wrapper import ( + +from ..detail.cxx_wrapper import ( CxxWrapper as _CxxWrapper, copy_cxx_mem_fns as _copy_cxx_mem_fns, register_cxx_wrapped_type as _register_cxx_wrapped_type, to_cxx as _to_cxx, wrap_cxx_free_fn as _wrap_cxx_free_fn, ) -from libsemigroups_pybind11.detail.decorators import copydoc as _copydoc +from ..detail.decorators import copydoc as _copydoc +from . import examples ######################################################################## # Presentation @@ -271,3 +273,51 @@ def __init__(self: _Self, *args, **kwargs) -> None: is_normalized = _wrap_cxx_free_fn(_is_normalized) is_rule = _wrap_cxx_free_fn(_is_rule) try_detect_inverses = _wrap_cxx_free_fn(_try_detect_inverses) + +__all__ = [ + "Presentation", + "InversePresentation", + "add_commutator_rule", + "add_identity_rules", + "add_inverse_rules", + "add_rule", + "add_rules", + "add_zero_rules", + "are_rules_sorted", + "change_alphabet", + "commutator", + "contains_rule", + "first_unused_letter", + "greedy_reduce_length", + "greedy_reduce_length_and_number_of_gens", + "is_strongly_compressible", + "length", + "longest_rule", + "longest_rule_length", + "longest_subword_reducing_length", + "make_semigroup", + "normalize_alphabet", + "reduce_complements", + "reduce_to_2_generators", + "remove_duplicate_rules", + "remove_redundant_generators", + "remove_trivial_rules", + "replace_subword", + "replace_word", + "replace_word_with_new_generator", + "reverse", + "shortest_rule", + "shortest_rule_length", + "sort_each_rule", + "sort_rules", + "strongly_compress", + "throw_if_bad_inverses", + "to_gap_string", + "balance", + "add_cyclic_conjugates", + "index_rule", + "is_normalized", + "is_rule", + "try_detect_inverses", + "examples", +] diff --git a/src/libsemigroups_pybind11/presentation/examples.py b/src/libsemigroups_pybind11/presentation/examples.py index 9f7ca9601..54ee3f5a2 100644 --- a/src/libsemigroups_pybind11/presentation/examples.py +++ b/src/libsemigroups_pybind11/presentation/examples.py @@ -191,3 +191,90 @@ uniform_block_bijection_monoid_Fit03 = _wrap_cxx_free_fn(_uniform_block_bijection_monoid_Fit03) zero_rook_monoid = _wrap_cxx_free_fn(_zero_rook_monoid) zero_rook_monoid_Gay18 = _wrap_cxx_free_fn(_zero_rook_monoid_Gay18) + +__all__ = [ + "abacus_jones_monoid", + "abacus_jones_monoid_AJP25", + "alternating_group", + "alternating_group_Moo97", + "brauer_monoid", + "braid_group", + "brauer_monoid_KM07", + "catalan_monoid", + "chinese_monoid", + "chinese_monoid_CEKNH01", + "cyclic_inverse_monoid", + "cyclic_inverse_monoid_Fer22_a", + "cyclic_inverse_monoid_Fer22_b", + "dual_symmetric_inverse_monoid", + "dual_symmetric_inverse_monoid_EEF07", + "fibonacci_semigroup", + "fibonacci_semigroup_CRRT94", + "full_transformation_monoid", + "full_transformation_monoid_Aiz58", + "full_transformation_monoid_II74", + "full_transformation_monoid_MW24_a", + "full_transformation_monoid_MW24_b", + "hypo_plactic_monoid", + "hypo_plactic_monoid_Nov00", + "monogenic_semigroup", + "motzkin_monoid", + "motzkin_monoid_PHL13", + "not_renner_type_B_monoid", + "not_renner_type_B_monoid_Gay18", + "not_renner_type_D_monoid", + "not_renner_type_D_monoid_God09", + "not_symmetric_group", + "not_symmetric_group_GKKL08", + "order_preserving_cyclic_inverse_monoid", + "order_preserving_cyclic_inverse_monoid_Fer22", + "order_preserving_monoid", + "order_preserving_monoid_AR00", + "orientation_preserving_monoid", + "orientation_preserving_monoid_AR00", + "orientation_preserving_reversing_monoid", + "orientation_preserving_reversing_monoid_AR00", + "partial_brauer_monoid", + "partial_brauer_monoid_KM07", + "partial_isometries_cycle_graph_monoid", + "partial_isometries_cycle_graph_monoid_FP22", + "partial_transformation_monoid", + "partial_transformation_monoid_MW24", + "partial_transformation_monoid_Shu60", + "partition_monoid", + "partition_monoid_Eas11", + "partition_monoid_HR05", + "plactic_monoid", + "plactic_monoid_Knu70", + "rectangular_band", + "rectangular_band_ACOR00", + "renner_type_B_monoid", + "renner_type_B_monoid_Gay18", + "renner_type_D_monoid", + "renner_type_D_monoid_Gay18", + "sigma_plactic_monoid", + "sigma_plactic_monoid_AHMNT24", + "singular_brauer_monoid", + "singular_brauer_monoid_MM07", + "special_linear_group_2", + "special_linear_group_2_CR80", + "stellar_monoid", + "stellar_monoid_GH19", + "stylic_monoid", + "stylic_monoid_AR22", + "symmetric_group", + "symmetric_group_Bur12", + "symmetric_group_Car56", + "symmetric_group_Moo97_a", + "symmetric_group_Moo97_b", + "symmetric_inverse_monoid", + "symmetric_inverse_monoid_Sol04", + "symmetric_inverse_monoid_MW24", + "symmetric_inverse_monoid_Shu60", + "temperley_lieb_monoid", + "temperley_lieb_monoid_Eas21", + "uniform_block_bijection_monoid", + "uniform_block_bijection_monoid_Fit03", + "zero_rook_monoid", + "zero_rook_monoid_Gay18", +] diff --git a/src/libsemigroups_pybind11/schreier_sims.py b/src/libsemigroups_pybind11/schreier_sims.py index dd10de6ce..907b3462f 100644 --- a/src/libsemigroups_pybind11/schreier_sims.py +++ b/src/libsemigroups_pybind11/schreier_sims.py @@ -108,3 +108,5 @@ def __init__(self: _Self, *args) -> None: intersection = _wrap_cxx_free_fn(_schreier_sims_intersection) + +__all__ = ["SchreierSims", "intersection"] diff --git a/src/libsemigroups_pybind11/sims.py b/src/libsemigroups_pybind11/sims.py index 37a811ebf..acc722d22 100644 --- a/src/libsemigroups_pybind11/sims.py +++ b/src/libsemigroups_pybind11/sims.py @@ -286,10 +286,26 @@ def __call__(self: _Self, *args, **kwargs) -> bool: # Helper functions ######################################################################## -right_generating_pairs = _wrap_cxx_free_fn(_right_generating_pairs) -two_sided_generating_pairs = _wrap_cxx_free_fn(_two_sided_generating_pairs) +is_maximal_right_congruence = _wrap_cxx_free_fn(_is_maximal_right_congruence) is_right_congruence = _wrap_cxx_free_fn(_is_right_congruence) is_right_congruence_of_dual = _wrap_cxx_free_fn(_is_right_congruence_of_dual) is_two_sided_congruence = _wrap_cxx_free_fn(_is_two_sided_congruence) -is_maximal_right_congruence = _wrap_cxx_free_fn(_is_maximal_right_congruence) poset = _wrap_cxx_free_fn(_poset) +right_generating_pairs = _wrap_cxx_free_fn(_right_generating_pairs) +two_sided_generating_pairs = _wrap_cxx_free_fn(_two_sided_generating_pairs) + +__all__ = [ + "MinimalRepOrc", + "RepOrc", + "Sims1", + "Sims2", + "SimsRefinerFaithful", + "SimsRefinerIdeals", + "is_maximal_right_congruence", + "is_right_congruence_of_dual", + "is_right_congruence", + "is_two_sided_congruence", + "poset", + "right_generating_pairs", + "two_sided_generating_pairs", +] diff --git a/src/libsemigroups_pybind11/stephen.py b/src/libsemigroups_pybind11/stephen.py index 592db98e4..5598cce44 100644 --- a/src/libsemigroups_pybind11/stephen.py +++ b/src/libsemigroups_pybind11/stephen.py @@ -103,3 +103,14 @@ def __imul__(self: _Self, other: _Self) -> _Self: number_of_left_factors = _wrap_cxx_free_fn(_stephen_number_of_left_factors) number_of_words_accepted = _wrap_cxx_free_fn(_stephen_number_of_words_accepted) words_accepted = _wrap_cxx_free_fn(_stephen_words_accepted) + +__all__ = [ + "Stephen", + "accepts", + "dot", + "is_left_factor", + "left_factors", + "number_of_left_factors", + "number_of_words_accepted", + "words_accepted", +] diff --git a/src/libsemigroups_pybind11/to.py b/src/libsemigroups_pybind11/to.py index 5fcbf96eb..b60915d5b 100644 --- a/src/libsemigroups_pybind11/to.py +++ b/src/libsemigroups_pybind11/to.py @@ -147,3 +147,6 @@ def to(*args, rtype: tuple): ) constructor = rtype[0] return constructor(_RETURN_TYPE_TO_CONVERTER_FUNCTION[rtype](*cxx_args)) + + +__all__ = ["to"] diff --git a/src/libsemigroups_pybind11/todd_coxeter.py b/src/libsemigroups_pybind11/todd_coxeter.py index 110c86b89..7eb2c55f5 100644 --- a/src/libsemigroups_pybind11/todd_coxeter.py +++ b/src/libsemigroups_pybind11/todd_coxeter.py @@ -88,6 +88,18 @@ def __init__(self: _Self, *args, **kwargs) -> None: perform_lookbehind = _wrap_cxx_free_fn(_todd_coxeter_perform_lookbehind) redundant_rule = _wrap_cxx_free_fn(_todd_coxeter_redundant_rule) +__all__ = [ + "ToddCoxeter", + "class_by_index", + "class_of", + "is_non_trivial", + "non_trivial_classes", + "normal_forms", + "partition", + "perform_lookbehind", + "redundant_rule", +] + ######################################################################## # Helper functions ######################################################################## diff --git a/src/libsemigroups_pybind11/transf.py b/src/libsemigroups_pybind11/transf.py index 80075ebde..e0d68202c 100644 --- a/src/libsemigroups_pybind11/transf.py +++ b/src/libsemigroups_pybind11/transf.py @@ -10,7 +10,6 @@ """ import abc -from typing import Any as _Any from typing_extensions import Self @@ -352,9 +351,11 @@ def one(n: int) -> Self: # Helper functions ######################################################################## -one = _wrap_cxx_free_fn(_transf_one) +domain = _wrap_cxx_free_fn(_transf_domain) +image = _wrap_cxx_free_fn(_transf_image) inverse = _wrap_cxx_free_fn(_transf_inverse) -right_one = _wrap_cxx_free_fn(_transf_right_one) left_one = _wrap_cxx_free_fn(_transf_left_one) -image = _wrap_cxx_free_fn(_transf_image) -domain = _wrap_cxx_free_fn(_transf_domain) +one = _wrap_cxx_free_fn(_transf_one) +right_one = _wrap_cxx_free_fn(_transf_right_one) + +__all__ = ["Perm", "PPerm", "Transf", "domain", "image", "inverse", "left_one", "one", "right_one"] diff --git a/src/libsemigroups_pybind11/ukkonen.py b/src/libsemigroups_pybind11/ukkonen.py index 1312bc42c..70b674196 100644 --- a/src/libsemigroups_pybind11/ukkonen.py +++ b/src/libsemigroups_pybind11/ukkonen.py @@ -8,7 +8,7 @@ contains helper functions for the :any:`Ukkonen` class. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import +from _libsemigroups_pybind11 import ( ukkonen_add_word as add_word, ukkonen_add_words as add_words, ukkonen_dot as dot, @@ -24,3 +24,20 @@ ukkonen_pieces as pieces, ukkonen_traverse as traverse, ) + +__all__ = [ + "add_word", + "add_words", + "dot", + "is_piece", + "is_subword", + "is_suffix", + "length_maximal_piece_prefix", + "length_maximal_piece_suffix", + "maximal_piece_prefix", + "maximal_piece_suffix", + "number_of_distinct_subwords", + "number_of_pieces", + "pieces", + "traverse", +] diff --git a/src/libsemigroups_pybind11/word_graph.py b/src/libsemigroups_pybind11/word_graph.py index d6d42770d..a94a6020d 100644 --- a/src/libsemigroups_pybind11/word_graph.py +++ b/src/libsemigroups_pybind11/word_graph.py @@ -10,7 +10,7 @@ are contained in the subpackage ``word_graph``. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import +from _libsemigroups_pybind11 import ( word_graph_add_cycle as add_cycle, word_graph_adjacency_matrix as adjacency_matrix, word_graph_dot as dot, @@ -30,3 +30,24 @@ word_graph_standardize as standardize, word_graph_topological_sort as topological_sort, ) + +__all__ = [ + "add_cycle", + "adjacency_matrix", + "dot", + "equal_to", + "follow_path", + "is_acyclic", + "is_compatible", + "is_complete", + "is_connected", + "is_reachable", + "is_strictly_cyclic", + "last_node_on_path", + "nodes_reachable_from", + "number_of_nodes_reachable_from", + "random_acyclic", + "spanning_tree", + "standardize", + "topological_sort", +] diff --git a/src/libsemigroups_pybind11/words.py b/src/libsemigroups_pybind11/words.py index 1c0f126fb..4b3f0893c 100644 --- a/src/libsemigroups_pybind11/words.py +++ b/src/libsemigroups_pybind11/words.py @@ -9,10 +9,12 @@ contains helper functions related to words. """ -from _libsemigroups_pybind11 import ( # pylint: disable=unused-import,redefined-builtin +from _libsemigroups_pybind11 import ( # pylint: disable=redefined-builtin words_human_readable_index as human_readable_index, words_human_readable_letter as human_readable_letter, words_parse_relations as parse_relations, words_pow as pow, words_prod as prod, ) + +__all__ = ["human_readable_index", "human_readable_letter", "parse_relations", "pow", "prod"] diff --git a/tests/test_froidure_pin.py b/tests/test_froidure_pin.py index 7f3d8a883..f07293470 100644 --- a/tests/test_froidure_pin.py +++ b/tests/test_froidure_pin.py @@ -14,7 +14,6 @@ import pytest from libsemigroups_pybind11 import ( - PBR, UNDEFINED, Bipartition, BMat8, @@ -24,6 +23,7 @@ LibsemigroupsError, Matrix, MatrixKind, + PBR, Perm, PPerm, Presentation,