Skip to content

Commit d52db9f

Browse files
author
Release Manager
committed
gh-36136: `sage.combinat.root_system`: Modularization fixes, `# needs` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Most of the package `sage.combinat.root_system` is intended to be shipped by the distribution **sagemath-modules**, and much of the functionality can be tested in the modularized setting. - Some functionality depends on other distributions, in particular **sagemath-graphs** (via Dynkin diagrams). The doctests are marked as `# needs sage.graphs`. - Other doctests that depend on combinatorics functionality such as Tableaux are marked `# needs sage.combinat`. - Use of Weyl and Coxeter groups is marked `# needs sage.libs.gap`, `# needs sage.rings.number_field`, `# needs sage.symbolic`, or `# needs sage.groups`. - Some imports are changed to `lazy_import`; in some places, the changed code uses the fact that `isinstance(x, cls)` gives False for unresolved lazy import `cls`. - Some `_test_...` and `some_elements` methods are changed so that `ImportError`s do not lead to test failures. - The hardcoded dependence of `CartanMatrix` on `Matrix_integer_sparse` (which has complicated compile-time dependencies) is relaxed. - doctest cosmetics: Breaking long lines in doctest input and output so that it can be read in the HTML documentation without (or with less) horizontal scrolling <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> - Part of: #29705 - Cherry-picked from: #35095 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36136 Reported by: Matthias Köppe Reviewer(s): David Coudert, Matthias Köppe
2 parents 33c99ab + f72f263 commit d52db9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1930
-1488
lines changed

src/sage/combinat/root_system/ambient_space.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,13 @@ def _test_norm_of_simple_roots(self, **options):
117117
"""
118118
tester = self._tester(**options)
119119
T = self.cartan_type()
120-
D = T.symmetrizer()
121-
alpha = self.simple_roots()
122-
for C in T.dynkin_diagram().connected_components(sort=False):
120+
try:
121+
D = T.symmetrizer()
122+
alpha = self.simple_roots()
123+
DD = T.dynkin_diagram()
124+
except ImportError: # Dynkin diagrams need sage.graphs
125+
return
126+
for C in DD.connected_components(sort=False):
123127
tester.assertEqual(len( set( alpha[i].scalar(alpha[i]) / D[i] for i in C ) ), 1)
124128

125129
# FIXME: attribute or method?

src/sage/combinat/root_system/associahedron.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# sage.doctest: needs sage.combinat sage.geometry.polyhedron
12
r"""
23
Associahedron
34

src/sage/combinat/root_system/braid_move_calculator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# sage.doctest: needs sage.libs.gap
12
"""
23
Braid Move Calculator
34

src/sage/combinat/root_system/branching_rules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# sage.doctest: needs sage.libs.gap
12
"""
23
Branching Rules
34
"""
@@ -54,7 +55,7 @@ def branch_weyl_character(chi, R, S, rule="default"):
5455
* ``"triality"``
5556
* ``"miscellaneous"``
5657
57-
The ``BranchingRule`` class is a wrapper for functions
58+
The :class:`BranchingRule` class is a wrapper for functions
5859
from the weight lattice of `G` to the weight lattice of `H`.
5960
An instance of this class encodes an embedding of `H` into
6061
`G`. The usual way to specify an embedding is to supply a

0 commit comments

Comments
 (0)