Skip to content

Commit b7d2be9

Browse files
committed
More refactoring of __init__ files
1 parent d7085db commit b7d2be9

File tree

10 files changed

+67
-58
lines changed

10 files changed

+67
-58
lines changed

src/doc/en/reference/combinat/module_list.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Comprehensive Module list
1+
Comprehensive Module List
22
=========================
33

44
.. NOTE::
@@ -364,7 +364,7 @@ Comprehensive Module list
364364
sage/combinat/tutorial
365365
sage/combinat/vector_partition
366366
sage/combinat/words/abstract_word
367-
sage/combinat/words/all
367+
sage/combinat/words
368368
sage/combinat/words/alphabet
369369
sage/combinat/words/finite_word
370370
sage/combinat/words/infinite_word

src/sage/categories/all.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from sage.misc.namespace_package import install_doc
2828
install_doc(__package__, __doc__)
2929

30+
from . import primer
31+
3032
from sage.misc.lazy_import import lazy_import
3133

3234
from .category import Category

src/sage/combinat/all.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- :ref:`sage.combinat.species.all`
2727
- :ref:`sage.combinat.designs.all`
2828
- :ref:`sage.combinat.posets.all`
29-
- :ref:`sage.combinat.words.all`
29+
- :ref:`sage.combinat.words`
3030
3131
Utilities
3232
---------
@@ -48,6 +48,8 @@
4848
from sage.misc.namespace_package import install_doc
4949
install_doc(__package__, __doc__)
5050

51+
from . import quickref, tutorial
52+
5153
from sage.misc.lazy_import import lazy_import
5254

5355
from .combinat import bell_number, catalan_number, euler_number, fibonacci, \

src/sage/combinat/crystals/all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
:class:`FiniteCrystals`, :class:`ClassicalCrystals`, :class:`RegularCrystals`,
2020
:class:`~sage.categories.regular_supercrystals.RegularSuperCrystals`
2121
-- The categories for crystals
22-
- :ref:`sage.combinat.root_system`
22+
- :ref:`sage.combinat.root_system.all`
2323
"""
2424
# install the docstring of this module to the containing package
2525
from sage.misc.namespace_package import install_doc

src/sage/combinat/root_system/all.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Introductory material
1515
---------------------
1616
17-
- :ref:`sage.combinat.root_system` -- This overview
17+
- :ref:`sage.combinat.root_system.all` -- This overview
1818
- :class:`CartanType` -- An introduction to Cartan types
1919
- :class:`RootSystem` -- An introduction to root systems
2020
- :ref:`sage.combinat.root_system.plot` -- A root system visualization tutorial
@@ -25,7 +25,7 @@
2525
Related material
2626
----------------
2727
28-
- :ref:`sage.combinat.crystals` -- Crystals
28+
- :ref:`sage.combinat.crystals.all` -- Crystals
2929
3030
Cartan datum
3131
------------
@@ -39,7 +39,7 @@
3939
Root systems
4040
------------
4141
42-
- :ref:`sage.combinat.root_system.root_system`
42+
- :ref:`sage.combinat.root_system.all`
4343
- :ref:`sage.combinat.root_system.plot`
4444
- :ref:`sage.combinat.root_system.root_lattice_realizations`
4545
- :ref:`sage.combinat.root_system.root_lattice_realization_algebras`
@@ -115,6 +115,9 @@
115115
- :ref:`sage.combinat.root_system.type_super_A`
116116
- :ref:`sage.combinat.root_system.type_A_infinity`
117117
"""
118+
# install the docstring of this module to the containing package
119+
from sage.misc.namespace_package import install_doc
120+
install_doc(__package__, __doc__)
118121

119122
from sage.misc.lazy_import import lazy_import
120123

@@ -139,6 +142,3 @@
139142
lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials')
140143
lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation')
141144

142-
# install the docstring of this module to the containing package
143-
from sage.misc.namespace_package import install_doc
144-
install_doc(__package__, __doc__)

src/sage/combinat/words/__init__.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1+
r"""
2+
Combinatorics on words
13
4+
**Main modules and their methods:**
5+
6+
- :ref:`sage.combinat.words.abstract_word`
7+
- :ref:`sage.combinat.words.finite_word`
8+
- :ref:`sage.combinat.words.infinite_word`
9+
- :ref:`sage.combinat.words.alphabet`
10+
- :ref:`sage.combinat.words.words`
11+
- :ref:`sage.combinat.words.paths`
12+
- :ref:`sage.combinat.words.morphism`
13+
- :ref:`sage.combinat.words.shuffle_product`
14+
- :ref:`sage.combinat.words.suffix_trees`
15+
16+
Main classes and functions meant to be used by the user:
17+
18+
:func:`~sage.combinat.words.word.Word`,
19+
:class:`~sage.combinat.words.words.FiniteWords`,
20+
:class:`~sage.combinat.words.words.InfiniteWords`,
21+
:func:`~sage.combinat.words.words.Words`,
22+
:func:`~sage.combinat.words.alphabet.Alphabet`,
23+
:class:`~sage.combinat.words.morphism.WordMorphism`,
24+
:class:`~sage.combinat.words.paths.WordPaths`.
25+
26+
A list of common words can be accessed through ``words.<tab>`` and are listed in
27+
the :ref:`words catalog <sage.combinat.words.word_generators>`.
28+
29+
**Internal representation of words:**
30+
31+
- :ref:`sage.combinat.words.word`
32+
- :ref:`sage.combinat.words.word_char`
33+
- :ref:`sage.combinat.words.word_datatypes`
34+
- :ref:`sage.combinat.words.word_infinite_datatypes`
35+
36+
**Options:**
37+
38+
- :ref:`sage.combinat.words.word_options`
39+
40+
See :func:`~sage.combinat.words.word_options.WordOptions`.
41+
"""

src/sage/combinat/words/all.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,3 @@
1-
r"""
2-
Combinatorics on words
3-
4-
**Main modules and their methods:**
5-
6-
- :ref:`sage.combinat.words.abstract_word`
7-
- :ref:`sage.combinat.words.finite_word`
8-
- :ref:`sage.combinat.words.infinite_word`
9-
- :ref:`sage.combinat.words.alphabet`
10-
- :ref:`sage.combinat.words.words`
11-
- :ref:`sage.combinat.words.paths`
12-
- :ref:`sage.combinat.words.morphism`
13-
- :ref:`sage.combinat.words.shuffle_product`
14-
- :ref:`sage.combinat.words.suffix_trees`
15-
16-
Main classes and functions meant to be used by the user:
17-
18-
:func:`~sage.combinat.words.word.Word`,
19-
:class:`~sage.combinat.words.words.FiniteWords`,
20-
:class:`~sage.combinat.words.words.InfiniteWords`,
21-
:func:`~sage.combinat.words.words.Words`,
22-
:func:`~sage.combinat.words.alphabet.Alphabet`,
23-
:class:`~sage.combinat.words.morphism.WordMorphism`,
24-
:class:`~sage.combinat.words.paths.WordPaths`.
25-
26-
A list of common words can be accessed through ``words.<tab>`` and are listed in
27-
the :ref:`words catalog <sage.combinat.words.word_generators>`.
28-
29-
**Internal representation of words:**
30-
31-
- :ref:`sage.combinat.words.word`
32-
- :ref:`sage.combinat.words.word_char`
33-
- :ref:`sage.combinat.words.word_datatypes`
34-
- :ref:`sage.combinat.words.word_infinite_datatypes`
35-
36-
**Options:**
37-
38-
- :ref:`sage.combinat.words.word_options`
39-
40-
See :func:`~sage.combinat.words.word_options.WordOptions`.
41-
"""
42-
# install the docstring of this module to the containing package
43-
from sage.misc.namespace_package import install_doc
44-
install_doc(__package__, __doc__)
45-
461
from .alphabet import Alphabet, build_alphabet
472
from .morphism import WordMorphism
483
from .paths import WordPaths

src/sage/dynamics/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
r"""
2-
Flat surfaces
3-
"""

src/sage/dynamics/all.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""
2+
Flat surfaces
3+
24
Some code about flat surfaces and interval exchanges has been removed
35
from Sage. The package ``surface_dynamics`` contains all that code
46
and much more. For more information, see
@@ -14,6 +16,10 @@
1416
1517
sage -pip install surface_dynamics --user
1618
"""
19+
# install the docstring of this module to the containing package
20+
from sage.misc.namespace_package import install_doc
21+
install_doc(__package__, __doc__)
22+
1723
from sage.misc.lazy_import import lazy_import
1824

1925
from sage.dynamics.arithmetic_dynamics.all import *

src/sage/matroids/all.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""
2+
Matroids
3+
"""
4+
# install the docstring of this module to the containing package
5+
from sage.misc.namespace_package import install_doc
6+
install_doc(__package__, __doc__)
7+
18
from sage.misc.lazy_import import lazy_import
29
# from constructor import Matroid
310
# import matroids_catalog as matroids

0 commit comments

Comments
 (0)