sage.categories: Add # optional for modularization; reformat doctests#35422
sage.categories: Add # optional for modularization; reformat doctests#35422vbraun merged 24 commits intosagemath:developfrom
# optional for modularization; reformat doctests#35422Conversation
| sage: W = CoxeterGroup('B3', implementation='coxeter3') # optional - coxeter3 | ||
| sage: b3_cells = W.kazhdan_lusztig_cells('two-sided') # optional - coxeter3 | ||
| sage: len(b3_cells) # optional - coxeter3 |
There was a problem hiding this comment.
What's the convention here, if not column 88?
There was a problem hiding this comment.
This is an actual optional package; they should be aligned so that the tag is visible in full in the formatted doc.
My editor macro aligns these at column 64; but I think it's too hard (and not necessary) to make it globally consistent.
|
|
||
| sage: (GF(3)^2).tuple() | ||
| sage: (GF(3)^2).tuple() # optional - sage.libs.pari | ||
| ((0, 0), (1, 0), (2, 0), (0, 1), (1, 1), (2, 1), (0, 2), (1, 2), (2, 2)) |
There was a problem hiding this comment.
Maybe split this result so it fits in 80 columns? There are a few more below, some even a bit longer.
There was a problem hiding this comment.
Column 80 plays no role in my undocumented style guide. I let the output run to column 86 regularly, and sporadically to column 96. (After that, horizontal scrolling is necessary.)
| Lazy family (Term map | ||
| from Partitions | ||
| to An example of a graded module with basis: the free module | ||
| on partitions over Integer Ring(i))_{i in Partitions of the integer 4} |
There was a problem hiding this comment.
Maybe split one more line so it gets under 80 columns?
Let me try:
| Lazy family (Term map | |
| from Partitions | |
| to An example of a graded module with basis: the free module | |
| on partitions over Integer Ring(i))_{i in Partitions of the integer 4} | |
| Lazy family (Term map | |
| from Partitions | |
| to An example of a graded module with basis: | |
| the free module on partitions over Integer Ring(i) | |
| )_{i in Partitions of the integer 4} |
Not sure if that's actually ok... Your version is not so bad either, do as it pleases you.
There was a problem hiding this comment.
My version runs to column 91, which I think is fine because there are no # optional tags around at column 88
There was a problem hiding this comment.
Generally in reformatting doctest output, I don't introduce whitespace where no whitespace was before
| @@ -56,15 +56,15 @@ class FiniteComplexReflectionGroups(CategoryWithAxiom): | |||
| sage: W = ComplexReflectionGroups().Finite().example(); W # optional - gap3 | |||
There was a problem hiding this comment.
It seems the # optional - gap3 could all go in the same column for the whole file except for this line?
There was a problem hiding this comment.
This one is at 72 (same as earlier up in the file). There are some occurrences around lines 900-1000 that I aligned at column 80 (rightmost place where the whole tag is visible) because the lines are longer. But in docstrings that have column-88 aligned tags, it has to be aligned farther to the left.
src/sage/categories/finite_dimensional_lie_algebras_with_basis.py
Outdated
Show resolved
Hide resolved
src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py
Outdated
Show resolved
Hide resolved
src/sage/categories/finitely_generated_lambda_bracket_algebras.py
Outdated
Show resolved
Hide resolved
src/sage/categories/finitely_generated_lie_conformal_algebras.py
Outdated
Show resolved
Hide resolved
src/sage/categories/finitely_generated_lie_conformal_algebras.py
Outdated
Show resolved
Hide resolved
src/sage/categories/functor.pyx
Outdated
| sage: F = ForgetfulFunctor(FiniteFields(),Fields()) | ||
| sage: F = ForgetfulFunctor(FiniteFields(), Fields()) | ||
| sage: F #indirect doctest | ||
| The forgetful functor from Category of finite enumerated fields to Category of fields |
There was a problem hiding this comment.
want to split this output line?
There was a problem hiding this comment.
In TESTS blocks, I have been less strict with the formatting because by default it is not shown in the formatted documentation.
Same for docstrings of private/special methods unless they appear in the formatted documentation
Co-authored-by: Gonzalo Tornaría <tornaria@gmail.com>
Co-authored-by: Gonzalo Tornaría <tornaria@gmail.com>
Co-authored-by: Gonzalo Tornaría <tornaria@gmail.com>
…sis.py: Align # optional
Co-authored-by: Gonzalo Tornaría <tornaria@gmail.com>
Co-authored-by: Gonzalo Tornaría <tornaria@gmail.com>
Co-authored-by: Gonzalo Tornaría <tornaria@gmail.com>
SageMath version 10.0.rc0, Release Date: 2023-04-23
| sage: A = HeckeMonoid(SymmetricGroup(4)).algebra(QQ) # optional - sage.groups sage.modules | ||
| sage: idempotents = A.orthogonal_idempotents_central_mod_radical() # optional - sage.groups sage.modules sage.rings.number_field | ||
| sage: A.is_identity_decomposition_into_orthogonal_idempotents(idempotents) # optional - sage.groups sage.modules sage.rings.number_field | ||
| True |
There was a problem hiding this comment.
This super long identifier somehow stopped me from finding a better looking solution
| sage: L._test_distributivity() | ||
| sage: L = LieAlgebras(QQ).example() # optional - sage.combinat sage.modules | ||
| sage: L._test_distributivity() # optional - sage.combinat sage.modules | ||
|
|
There was a problem hiding this comment.
Isn't this too much far to the right?
There was a problem hiding this comment.
Hmm. I see. This is aligned with other rows below.
There was a problem hiding this comment.
And it's in a TESTS block of a private function, so it won't show in the HTML
| sage: W.dimension() | ||
| sage: M = FreeModule(FiniteField(19), 100) # optional - sage.libs.pari sage.modules | ||
| sage: W = M.submodule([M.gen(50)]) # optional - sage.libs.pari sage.modules | ||
| sage: W.dimension() # optional - sage.libs.pari sage.modules | ||
| 1 |
There was a problem hiding this comment.
Isn't this sage.rings.finite_rings?
|
Otherwise, LGTM. |
|
Thanks for reviewing! |
kwankyu
left a comment
There was a problem hiding this comment.
Thanks. Then this is good to go.
|
Thank you! |
|
Documentation preview for this PR is ready! 🎉 |
📚 Description
Adding doctest tags
# optional - sage.rings.finite_rings,...number_field,...padicsetc. for modularization purposes.Also:
This is:
# optionaldoctest tags #34998📝 Checklist
⌛ Dependencies