Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions src/sage/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,26 +393,13 @@ def unhide(self):

EXAMPLES:

PolyCyclic is an optional GAP package. The following test
fails if it is hidden, regardless of whether it is installed
or not::

sage: from sage.features.gap import GapPackage
sage: Polycyclic = GapPackage("polycyclic", spkg="gap_packages")
sage: Polycyclic.hide()
sage: libgap(AbelianGroup(3, [0,3,4], names="abc")) # needs sage.libs.gap # optional - gap_packages_polycyclic
Traceback (most recent call last):
...
FeatureNotPresentError: gap_package_polycyclic is not available.
Feature `gap_package_polycyclic` is hidden.
Use method `unhide` to make it available again.

After unhiding the feature, the test should pass again if PolyCyclic
is installed and loaded::

sage: Polycyclic.unhide()
sage: libgap(AbelianGroup(3, [0,3,4], names="abc")) # needs sage.libs.gap # optional - gap_packages_polycyclic
Pcp-group with orders [ 0, 3, 4 ]
sage: from sage.features.sagemath import sage__plot
sage: sage__plot().hide()
sage: sage__plot().is_present()
FeatureTestResult('sage.plot', False)
sage: sage__plot().unhide() # needs sage.plot
sage: sage__plot().is_present() # needs sage.plot
FeatureTestResult('sage.plot', True)
"""
self._hidden = False

Expand Down
4 changes: 1 addition & 3 deletions src/sage/features/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ def _is_present(self):


def all_features():
return [GapPackage("atlasrep", spkg="gap_packages"),
GapPackage("design", spkg="gap_packages"),
return [GapPackage("design", spkg="gap_packages"),
GapPackage("grape", spkg="gap_packages"),
GapPackage("guava", spkg="gap_packages"),
GapPackage("hap", spkg="gap_packages"),
GapPackage("polycyclic", spkg="gap_packages"),
GapPackage("qpa", spkg="gap_packages"),
GapPackage("quagroup", spkg="gap_packages")]
42 changes: 21 additions & 21 deletions src/sage/graphs/generators/distance_regular.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def locally_GQ42_distance_transitive_graph():

EXAMPLES::

sage: G = graphs.locally_GQ42_distance_transitive_graph() # optional - internet gap_package_atlasrep
sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
sage: G = graphs.locally_GQ42_distance_transitive_graph() # optional - internet
sage: G.is_distance_regular(True) # optional - internet
([45, 32, 12, 1, None], [None, 1, 6, 32, 45])

REFERENCES:
Expand Down Expand Up @@ -217,8 +217,8 @@ def graph_3O73():

EXAMPLES::

sage: G = graphs.graph_3O73() # optional - internet gap_package_atlasrep
sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
sage: G = graphs.graph_3O73() # optional - internet
sage: G.is_distance_regular(True) # optional - internet
([117, 80, 24, 1, None], [None, 1, 12, 80, 117])

REFERENCES:
Expand Down Expand Up @@ -272,8 +272,8 @@ def J2Graph():

EXAMPLES::

sage: G = graphs.J2Graph() # optional - internet gap_package_atlasrep
sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
sage: G = graphs.J2Graph() # optional - internet
sage: G.is_distance_regular(True) # optional - internet
([10, 8, 8, 2, None], [None, 1, 1, 4, 5])

REFERENCES:
Expand All @@ -295,8 +295,8 @@ def IvanovIvanovFaradjevGraph():

EXAMPLES::

sage: G = graphs.IvanovIvanovFaradjevGraph() # optional - internet gap_package_atlasrep
sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
sage: G = graphs.IvanovIvanovFaradjevGraph() # optional - internet
sage: G.is_distance_regular(True) # optional - internet
([7, 6, 4, 4, 4, 1, 1, 1, None], [None, 1, 1, 1, 2, 4, 4, 6, 7])

REFERENCES:
Expand Down Expand Up @@ -1314,7 +1314,7 @@ def GeneralisedDodecagonGraph(const int s, const int t):

EXAMPLES::

sage: # optional - gap_package_atlasrep internet
sage: # optional - internet
sage: G = graphs.GeneralisedDodecagonGraph(1, 5)
sage: G.is_distance_regular(True)
([6, 5, 5, 5, 5, 5, None], [None, 1, 1, 1, 1, 1, 6])
Expand All @@ -1339,7 +1339,7 @@ def GeneralisedDodecagonGraph(const int s, const int t):

Test all graphs of order `(1, q)`::

sage: # optional - gap_package_atlasrep internet
sage: # optional - internet
sage: G = graphs.GeneralisedDodecagonGraph(1, 4)
sage: G.is_distance_regular(True)
([5, 4, 4, 4, 4, 4, None], [None, 1, 1, 1, 1, 1, 5])
Expand All @@ -1355,7 +1355,7 @@ def GeneralisedDodecagonGraph(const int s, const int t):

Now test all graphs of order `(q, 1)`::

sage: # optional - gap_package_atlasrep internet
sage: # optional - internet
sage: G = graphs.GeneralisedDodecagonGraph(4, 1)
sage: G.is_distance_regular(True)
([8, 4, 4, 4, 4, 4, None], [None, 1, 1, 1, 1, 1, 2])
Expand Down Expand Up @@ -1426,8 +1426,8 @@ def GeneralisedOctagonGraph(const int s, const int t):
sage: G = graphs.GeneralisedOctagonGraph(1, 4)
sage: G.is_distance_regular(True)
([5, 4, 4, 4, None], [None, 1, 1, 1, 5])
sage: G = graphs.GeneralisedOctagonGraph(2, 4) # optional - gap_package_atlasrep internet
sage: G.is_distance_regular(True) # optional - gap_package_atlasrep internet
sage: G = graphs.GeneralisedOctagonGraph(2, 4) # optional - internet
sage: G.is_distance_regular(True) # optional - internet
([10, 8, 8, 8, None], [None, 1, 1, 1, 5])
sage: G = graphs.GeneralisedOctagonGraph(5, 1)
sage: G.is_distance_regular(True)
Expand Down Expand Up @@ -1534,8 +1534,8 @@ def GeneralisedHexagonGraph(const int s, const int t):
EXAMPLES::

sage: # needs sage.libs.gap
sage: G = graphs.GeneralisedHexagonGraph(5, 5) # optional - gap_package_atlasrep internet
sage: G.is_distance_regular(True) # optional - gap_package_atlasrep internet
sage: G = graphs.GeneralisedHexagonGraph(5, 5) # optional - internet
sage: G.is_distance_regular(True) # optional - internet
([30, 25, 25, None], [None, 1, 1, 6])
sage: G = graphs.GeneralisedHexagonGraph(7, 1)
sage: G.is_distance_regular(True)
Expand All @@ -1556,7 +1556,7 @@ def GeneralisedHexagonGraph(const int s, const int t):

TESTS::

sage: # optional - gap_package_atlasrep internet
sage: # optional - internet
sage: G = graphs.GeneralisedHexagonGraph(4, 4)
sage: G.is_distance_regular(True)
([20, 16, 16, None], [None, 1, 1, 5])
Expand Down Expand Up @@ -1765,9 +1765,9 @@ def _line_graph_generalised_polygon(H):
sage: H = _line_graph_generalised_polygon(G)
sage: H.is_distance_regular(True)
([16, 8, 8, None], [None, 1, 1, 2])
sage: G = graphs.GeneralisedHexagonGraph(3, 3) # optional - gap_package_atlasrep internet
sage: H = _line_graph_generalised_polygon(G) # optional - gap_package_atlasrep internet
sage: G.is_isomorphic(H) # optional - gap_package_atlasrep internet
sage: G = graphs.GeneralisedHexagonGraph(3, 3) # optional - internet
sage: H = _line_graph_generalised_polygon(G) # optional - internet
sage: G.is_isomorphic(H) # optional - internet
True

REFERENCES:
Expand Down Expand Up @@ -2149,7 +2149,7 @@ def graph_with_classical_parameters(int d, int b, alpha_in, beta_in, int gamma):
Symplectic Dual Polar Graph DSp(6, 2): Graph on 135 vertices
sage: graph_with_classical_parameters(3, 2, 2, 14, 7) # long time # needs sage.symbolic
Grassmann graph J_2(6, 3): Graph on 1395 vertices
sage: graph_with_classical_parameters(3, -2, -2, 6, 6) # optional - gap_package_atlasrep internet
sage: graph_with_classical_parameters(3, -2, -2, 6, 6) # optional - internet
Generalised hexagon of order (2, 8): Graph on 819 vertices
"""
from sage.rings.rational import Rational
Expand Down Expand Up @@ -2732,7 +2732,7 @@ def distance_regular_graph(list arr, existence=False, check=True):
sage: graphs.distance_regular_graph([3, 2, 2, 1, 2, 1, 1, 2, 2, 3],
....: existence=True)
False
sage: graphs.distance_regular_graph([18, 16, 16, 1, 1, 9]) # optional - internet gap_package_atlasrep
sage: graphs.distance_regular_graph([18, 16, 16, 1, 1, 9]) # optional - internet
Generalised hexagon of order (2, 8): Graph on 819 vertices

sage: # needs sage.combinat
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/abelian_gps/abelian_aut.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

Only automorphism groups of finite abelian groups are supported::

sage: G = AbelianGroupGap([0,2]) # optional - gap_package_polycyclic
sage: autG = G.aut() # optional - gap_package_polycyclic
sage: G = AbelianGroupGap([0,2])
sage: autG = G.aut()
Traceback (most recent call last):
...
ValueError: only finite abelian groups are supported
Expand Down
Loading