Skip to content

Commit 5e10c3c

Browse files
committed
some more changes
1 parent 632e06a commit 5e10c3c

Some content is hidden

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

42 files changed

+1461
-1149
lines changed

build/bin/sage-print-system-package-command

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ do
3333
PROMPT="${1#--prompt=}"
3434
;;
3535
--prompt)
36-
PROMPT=' $ '
37-
CONTINUATION=' '
36+
PROMPT='$ '
37+
CONTINUATION=' '
3838
;;
3939
--continuation=*)
4040
CONTINUATION="${1#--continuation=}"

src/doc/en/developer/coding_in_other.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The ``gen`` class is defined in
4646
:sage_root:`src/sage/libs/cypari2/gen.pyx`, and this is where we
4747
add the method ``matfrobenius``:
4848

49-
.. CODE-BLOCK:: cython
49+
.. code-block:: cython
5050
5151
def matfrobenius(self, flag=0):
5252
r"""
@@ -102,7 +102,7 @@ class where we call the ``matfrobenius()`` method on the PARI object
102102
associated to the matrix after doing some sanity checking. Then we
103103
convert output from PARI to Sage objects:
104104

105-
.. CODE-BLOCK:: cython
105+
.. code-block:: cython
106106
107107
def frobenius_form(self, flag=0, var='x'):
108108
"""
@@ -171,7 +171,7 @@ For example, suppose we want to make a wrapper for the computation of
171171
the Cartan matrix of a simple Lie algebra. The Cartan matrix of `G_2`
172172
is available in GAP using the commands:
173173

174-
.. CODE-BLOCK:: gap
174+
.. code-block:: gap
175175
176176
gap> L:= SimpleLieAlgebra( "G", 2, Rationals );
177177
<Lie algebra of dimension 14 over Rationals>
@@ -202,7 +202,7 @@ can convert back to sage using the method ``sage`` if it works.
202202

203203
.. skip
204204
205-
.. CODE-BLOCK:: python
205+
.. code-block:: python
206206
207207
def cartan_matrix(typ, rank):
208208
"""
@@ -326,7 +326,7 @@ to carry this out.
326326

327327
Here is an example on how to use this command in Singular:
328328

329-
.. CODE-BLOCK:: text
329+
.. code-block:: text
330330
331331
A Computer Algebra System for Polynomial Computations / version 3-0-0
332332
0<
@@ -449,7 +449,7 @@ just that.
449449

450450
.. skip
451451
452-
.. CODE-BLOCK:: python
452+
.. code-block:: python
453453
454454
def points_parser(string_points, F):
455455
"""
@@ -509,7 +509,7 @@ ourselves to points of degree one.
509509

510510
.. skip
511511
512-
.. CODE-BLOCK:: python
512+
.. code-block:: python
513513
514514
def places_on_curve(f, F):
515515
"""
@@ -593,7 +593,7 @@ Next, we implement the general function (for brevity we omit the
593593
docstring, which is the same as above). Note that the ``point_parser``
594594
function is not required:
595595

596-
.. CODE-BLOCK:: python
596+
.. code-block:: python
597597
598598
def places_on_curve(f, F):
599599
p = F.characteristic()
@@ -634,7 +634,7 @@ For example, here is part of the file
634634
defines an interface between Sage and Octave, an open source program
635635
for doing numerical computations, among other things:
636636

637-
.. CODE-BLOCK:: python
637+
.. code-block:: python
638638
639639
import os
640640
from expect import Expect, ExpectElement
@@ -648,7 +648,7 @@ basic class for interfaces. The third line defines the class
648648
``Octave``; it derives from ``Expect`` as well. After this comes a
649649
docstring, which we omit here (see the file for details). Next comes:
650650

651-
.. CODE-BLOCK:: python
651+
.. code-block:: python
652652
653653
def __init__(self, script_subdirectory="", logfile=None,
654654
server=None, server_tmpdir=None):
@@ -666,7 +666,7 @@ docstring, which we omit here (see the file for details). Next comes:
666666
667667
This uses the class ``Expect`` to set up the Octave interface:
668668

669-
.. CODE-BLOCK:: python
669+
.. code-block:: python
670670
671671
def set(self, var, value):
672672
"""
@@ -692,7 +692,7 @@ These let users type ``octave.set('x', 3)``, after which
692692
``octave.get('x')`` returns ``' 3'``. Running ``octave.console()``
693693
dumps the user into an Octave interactive shell:
694694

695-
.. CODE-BLOCK:: python
695+
.. code-block:: python
696696
697697
def solve_linear_system(self, A, b):
698698
"""

src/doc/en/developer/coding_in_python.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Python language standard
1515
Sage follows the time window-based support policy
1616
`SPEC 0 — Minimum Supported Dependencies <https://scientific-python.org/specs/spec-0000/>`_
1717
for Python versions.
18-
The current minimum supported Python version can be found in the
19-
``pyproject.toml`` file. Accordingly, only language and library features
20-
available in this version can be used. If a feature is deprecated in a newer
18+
The current minimum supported Python version can be found in the
19+
``pyproject.toml`` file. Accordingly, only language and library features
20+
available in this version can be used. If a feature is deprecated in a newer
2121
supported version, it must be ensured that deprecation warnings issued by
2222
Python do not lead to failures in doctests.
2323

@@ -274,9 +274,11 @@ preparsed version of ``foo.sage`` is created with the name
274274
This file was *autogenerated* from the file foo.sage.
275275

276276
You can explicitly preparse a file with the ``--preparse``
277-
command-line option: running ::
277+
command-line option: running
278278

279-
sage --preparse foo.sage
279+
.. code-block:: console
280+
281+
$ sage --preparse foo.sage
280282
281283
creates the file ``foo.sage.py``.
282284

src/doc/en/developer/downstream.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ provided by the downstream distribution. The definitive list of dependencies is
1717
found in `pyproject.toml <https://github.com/sagemath/sage/blob/develop/pyproject.toml>`_.
1818

1919
These include:
20-
- `build-system.requires`: Python packages needed for building SageMath,
21-
- `project.dependencies`: Python packages required at runtime,
22-
- `project.optional-dependencies`: optional dependencies for additional
20+
- ``build-system.requires``: Python packages needed for building SageMath,
21+
- ``project.dependencies``: Python packages required at runtime,
22+
- ``project.optional-dependencies``: optional dependencies for additional
2323
functionality,
24-
- `external.build-requires` and `external.host-requires`: system dependencies
24+
- ``external.build-requires`` and ``external.host-requires``: system dependencies
2525
needed for building,
26-
- `external.dependencies`: system libraries required at runtime.
26+
- ``external.dependencies``: system libraries required at runtime.
2727

28-
The `external` section follows `PEP 725 <https://peps.python.org/pep-0725/>`_
28+
The ``external`` section follows `PEP 725 <https://peps.python.org/pep-0725/>`_
2929
and specifies dependencies in the form of ̀PURLs.
3030
At the moment, there is no standard interface to translate these PURLs into
3131
system package names. However, the names should be quite self-explanatory.
@@ -39,9 +39,9 @@ Build Procedure
3939
1. **Obtain the Source**:
4040
Clone the SageMath repository:
4141

42-
.. code-block:: bash
42+
.. code-block:: console
4343
44-
git clone https://github.com/sagemath/sage.git
44+
$ git clone https://github.com/sagemath/sage.git
4545
4646
Alternatively, download the sdist tarball from the
4747
`SageMath PyPI project<https://pypi.org/project/sagemath/>`_ or from the
@@ -53,11 +53,11 @@ Build Procedure
5353

5454
2. **Build**:
5555

56-
Create a wheel using the `build` module:
56+
Create a wheel using the ``build`` module:
5757

58-
.. code-block:: bash
58+
.. code-block:: console
5959
60-
python -m build --wheel --no-isolation
60+
$ python -m build --wheel --no-isolation
6161
6262
If you are sure that all dependencies are available, you may also add the
6363
`--skip-dependency-check` option.
@@ -69,20 +69,20 @@ Build Procedure
6969

7070
The resulting wheel can be installed using
7171

72-
.. code-block:: bash
72+
.. code-block:: console
7373
74-
python -m installer --destdir="<pkgdir>" dist/sagemath-*.whl
74+
$ python -m installer --destdir="<pkgdir>" dist/sagemath-*.whl
7575
76-
where `<pkgdir>` is the directory where you want to install the package
76+
where ``<pkgdir>`` is the directory where you want to install the package
7777
(usually a temporary directory for packaging).
7878

7979
4. **Test the Build**:
8080

8181
Run the Sage tests to ensure functionality:
8282

83-
.. code-block:: bash
83+
.. code-block:: console
8484
85-
python -m sage.doctest --all
85+
$ python -m sage.doctest --all
8686
8787
However, some tests are known to fail, see :issue:`39872`.
8888

@@ -92,7 +92,7 @@ that may benefit others, please consider contributing back by reporting issues
9292
or opening pull requests on the SageMath GitHub repository.
9393

9494
Other considerations:
95-
- **Package naming**: Use `sagemath`, or `python-sagemath` if your distribution
95+
- **Package naming**: Use ``sagemath``, or ``python-sagemath`` if your distribution
9696
has a convention for Python packages.
9797

9898
Example Downstream Packages

0 commit comments

Comments
 (0)