Skip to content

Commit a280558

Browse files
author
Matthias Koeppe
committed
Manual edits for using :sage_root:
1 parent 9252cfe commit a280558

File tree

8 files changed

+26
-32
lines changed

8 files changed

+26
-32
lines changed

src/doc/en/developer/coding_basics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ information. You can use the existing functions of Sage as templates.
432432
433433
The bibliographical reference should go in Sage's master
434434
bibliography file,
435-
:file:`SAGE_ROOT/src/doc/en/reference/references/index.rst`:
435+
:sage_root:`src/doc/en/reference/references/index.rst`:
436436

437437
.. CODE-BLOCK:: rest
438438
@@ -605,7 +605,7 @@ Sage's master **BIBLIOGRAPHY** file
605605

606606
All bibliographical references should be stored in the master
607607
bibliography file,
608-
:file:`SAGE_ROOT/src/doc/en/reference/references/index.rst`, in the
608+
:sage_root:`src/doc/en/reference/references/index.rst`, in the
609609
format
610610

611611
.. CODE-BLOCK:: rest

src/doc/en/developer/coding_in_other.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ polynomial or matrix, will have our new method. So you can do
4343
``PariError`` in this case.
4444

4545
The ``gen`` class is defined in
46-
:file:`SAGE_ROOT/src/sage/libs/cypari2/gen.pyx`, and this is where we
46+
:sage_root:`src/sage/libs/cypari2/gen.pyx`, and this is where we
4747
add the method ``matfrobenius``:
4848

4949
.. CODE-BLOCK:: cython
@@ -194,7 +194,7 @@ Note the ``'"G"'`` which is evaluated in GAP as the string ``"G"``.
194194
The purpose of this section is to use this example to show how one
195195
might write a Python/Sage program whose input is, say, ``('G',2)`` and
196196
whose output is the matrix above (but as a Sage Matrix---see the code
197-
in the directory :file:`SAGE_ROOT/src/sage/matrix/` and the
197+
in the directory :sage_root:`src/sage/matrix/` and the
198198
corresponding parts of the Sage reference manual).
199199

200200
First, the input must be converted into strings consisting of legal

src/doc/en/developer/packaging.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,16 @@ Third-party packages in Sage consist of two parts:
168168
instead.
169169

170170
#. The build scripts and associated files are in a subdirectory
171-
:sage_root:`build/pkgs/<package>`, where you replace ``<package>``
172-
with a lower-case version of the upstream project name. If the
171+
of :sage_root:`build/pkgs/` whose name is the lower-case version of
172+
the upstream project name. If the
173173
project name contains characters which are not alphanumeric
174174
and are not an underscore, those characters should be removed
175175
or replaced by an underscore. For example, the project
176176
``FFLAS-FFPACK`` is called ``fflas_ffpack`` in Sage.
177177

178178
As an example, let us consider a hypothetical FoO project. They
179179
(upstream) distribute a tarball ``FoO-1.3.tar.gz`` (that will be
180-
automatically placed in :sage_root:`upstream` during the installation
180+
automatically placed in :file:`SAGE_ROOT/upstream` during the installation
181181
process). To package it in Sage, we create a subdirectory containing as
182182
a minimum the following files:
183183

@@ -394,7 +394,7 @@ Helper functions
394394

395395
In the ``spkg-build``, ``spkg-install``, and ``spkg-check`` scripts,
396396
the following functions are available. They are defined in the file
397-
``$SAGE_ROOT/build/bin/sage-dist-helpers``, if you want to look at the
397+
:sage_root:`build/bin/sage-dist-helpers`, if you want to look at the
398398
source code. They should be used to make sure that appropriate
399399
variables are set and to avoid code duplication. These function names
400400
begin with ``sdh_``, which stands for "Sage-distribution helper".

src/doc/en/developer/portability_testing.rst

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ configuration `.devcontainer/tox-docker-in-docker
619619
``tox`` is already installed.
620620

621621
Sage provides a sophisticated tox configuration in the file
622-
``$SAGE_ROOT/tox.ini`` for the purpose of portability testing.
622+
:sage_root:`tox.ini` for the purpose of portability testing.
623623

624624
A tox "environment" is identified by a symbolic name composed of
625625
several `Tox "factors"
@@ -639,7 +639,7 @@ The next two factors determine the host system configuration: The
639639
``archlinux-latest``, ``fedora-30``, ``slackware-14.2``,
640640
``centos-7-i386``, and ``ubuntu-bionic-arm64``.
641641

642-
- See ``$SAGE_ROOT/tox.ini`` for a complete list, and to which images
642+
- See :sage_root:`tox.ini` for a complete list, and to which images
643643
on Docker hub they correspond.
644644

645645
The **packages factor** describes a list of system packages to be
@@ -919,7 +919,7 @@ a Homebrew installation in ``/usr/local`` that you may have.
919919

920920
The test script sets the ``PATH`` to the ``bin`` directory of the
921921
Homebrew prefix, followed by ``/usr/bin:/bin:/usr/sbin:/sbin``. It
922-
then uses the script ``$SAGE_ROOT/.homebrew-build-env`` to set
922+
then uses the script :sage_root:`.homebrew-build-env` to set
923923
environment variables so that Sage's build scripts will find
924924
"keg-only" packages such as ``gettext``.
925925

@@ -1002,13 +1002,11 @@ on every release tag.
10021002

10031003
This is defined in the files
10041004

1005-
- `$SAGE_ROOT/.github/workflows/ci-linux.yml
1006-
<https://github.com/sagemath/sage/tree/develop/.github/workflows/ci-linux.yml>`_
1007-
(which calls `$SAGE_ROOT/.github/workflows/docker.yml
1008-
<https://github.com/sagemath/sage/tree/develop/.github/workflows/docker.yml>`_) and
1005+
- :sage_root:`.github/workflows/ci-linux.yml`
1006+
(which calls :sage_root:`.github/workflows/docker.yml`) and
10091007

1010-
- `$SAGE_ROOT/.github/workflows/ci-macos.yml
1011-
<https://github.com/sagemath/sage/tree/develop/.github/workflows/ci-macos.yml>`_.
1008+
- :sage_root:`.github/workflows/ci-macos.yml`
1009+
(which calls :sage_root:`.github/workflows/macos.yml`).
10121010

10131011
GitHub Actions runs these build jobs on 2-core machines with 7 GB of
10141012
RAM memory and 14 GB of SSD disk space, cf.
@@ -1236,8 +1234,7 @@ Once VS Code starts configuring the dev container, by clicking on "show log",
12361234
you can see what it does:
12371235

12381236
- It pulls the prebuilt image from ghcr.io (via
1239-
`$SAGE_ROOT/.devcontainer/portability-Dockerfile
1240-
<https://github.com/sagemath/sage/tree/develop/.devcontainer/portability-Dockerfile>`_);
1237+
:sage_root:`.devcontainer/portability-Dockerfile`);
12411238
note that these are multi-gigabyte images, so it may take a while.
12421239

12431240
- As part of the "onCreateCommand", it installs additional system packages to
@@ -1270,8 +1267,7 @@ The Sage source tree contains premade configuration files for all platforms
12701267
for which our portability CI builds Docker images, both in the ``minimal`` and
12711268
``standard`` system package configurations. The configuration files can be
12721269
generated using the command ``tox -e update_docker_platforms`` (see
1273-
`$SAGE_ROOT/tox.ini <https://github.com/sagemath/sage/tree/develop/tox.ini>`_
1274-
for environment variables that take effect).
1270+
:sage_root:`tox.ini` for environment variables that take effect).
12751271

12761272
You can edit a copy of the configuration file to change to a different platform, another
12771273
version, or build stage. After editing the configuration file, run "Dev Containers: Rebuild Container" from the command
@@ -1284,7 +1280,7 @@ for more information.
12841280
In addition to the
12851281
``$SAGE_ROOT/.devcontainer/portability-.../devcontainer.json`` files, Sage also
12861282
provides several other sample ``devcontainer.json`` configuration files in the
1287-
directory ``$SAGE_ROOT/.devcontainer``.
1283+
directory :sage_root:`.devcontainer`.
12881284

12891285
Files named ``$SAGE_ROOT/.devcontainer/develop-.../devcontainer.json`` configure
12901286
containers from a public Docker image that provides SageMath and then updates the

src/doc/en/installation/source.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,14 +528,14 @@ Installation steps
528528
There are different possibilities to make using Sage a little easier:
529529

530530
- Make a symbolic link from :file:`/usr/local/bin/sage` (or another
531-
directory in your :envvar:`PATH`) to :file:`$SAGE_ROOT/sage`::
531+
directory in your :envvar:`PATH`) to :sage_root:`sage`::
532532

533533
$ ln -s /path/to/sage_root/sage /usr/local/bin/sage
534534

535535
Now simply typing ``sage`` from any directory should be sufficient to run
536536
Sage.
537537

538-
- Copy :file:`$SAGE_ROOT/sage` to a location in your :envvar:`PATH`.
538+
- Copy :sage_root:`sage` to a location in your :envvar:`PATH`.
539539
If you do this, make sure you edit the line:
540540

541541
.. CODE-BLOCK:: bash
@@ -573,7 +573,7 @@ Installation steps
573573
right clicking the mouse on the icon).
574574

575575
- On Linux and macOS systems, you can make an alias to
576-
:file:`$SAGE_ROOT/sage`.
576+
:sage_root:`sage`.
577577
For example, put something similar to the following line in your
578578
:file:`.bashrc` file:
579579

@@ -777,7 +777,7 @@ Sage-specific environment variables controlling the build process
777777
the nearest mirrors.
778778

779779
This sequence of operations is defined by the files in the directory
780-
:file:`$SAGE_ROOT/.upstream.d`.
780+
:sage_root:`.upstream.d`.
781781

782782
.. envvar:: SAGE_NUM_THREADS
783783

src/doc/en/reference/repl/startup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The sagerc shell script
88

99
The *bash shell script* :file:`$DOT_SAGE/sagerc` (with the default
1010
value of :envvar:`DOT_SAGE`, this is :file:`~/.sage/sagerc`) is read
11-
by :file:`$SAGE_ROOT/spkg/bin/sage-env` after Sage has set its
11+
by :sage_root:`src/bin/sage-env` after Sage has set its
1212
environment variables.
1313
It can be used to override some of the environment variables determined
1414
by Sage, or it can contain other shell commands like creating

src/doc/en/thematic_tutorials/group_theory.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,7 @@ Creating groups
329329

330330
This is an annotated list of some small well-known permutation groups
331331
that can be created simply in Sage. You can find more in the source
332-
code file ::
333-
334-
SAGE_ROOT/src/sage/groups/perm_gps/permgroup_named.py
332+
code file :sage_root:`src/sage/groups/perm_gps/permgroup_named.py`.
335333

336334
* ``SymmetricGroup(n)``: All `n!` permutations on `n` symbols.
337335
* ``DihedralGroup(n)``: Symmetries of an `n`-gon. Rotations and

src/doc/fr/tutorial/sagetex.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ locale) pour plus de détails.
1616

1717
Voici un bref exemple d'utilisation de SageTeX. La documentation
1818
complète se trouve dans
19-
:sage_root:`venv/share/texmf/tex/latex/sagetex`, où ``SAGE_ROOT``
19+
:file:`SAGE_ROOT/venv/share/texmf/tex/latex/sagetex`, où ``SAGE_ROOT``
2020
désigne le répertoire racine de votre installation Sage. Elle est
2121
accompagnée d'un fichier exemple et de scripts Python potentiellement
2222
utiles.
@@ -114,4 +114,4 @@ compilation précédente.)
114114
SageTeX offre bien d'autres possibilités. Puisque Sage
115115
comme LaTeX sont des outils complexes et puissants, le mieux est sans
116116
doute de consulter la documentation complète de SageTeX, qui se trouve
117-
dans :sage_root:`venv/share/texmf/tex/latex/sagetex`.
117+
dans :file:`SAGE_ROOT/venv/share/texmf/tex/latex/sagetex`.

0 commit comments

Comments
 (0)