Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference manual: Show modularized sagelib packages separately #35734

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PKG_SCRIPTS="$SAGE_ROOT/build/pkgs/$PKG_BASE"
for ext in rst txt; do
SPKG_FILE="$PKG_SCRIPTS/SPKG.$ext"
if [ -f "$SPKG_FILE" ]; then
cat "$SPKG_FILE"
sed "1,3s/^ *Sage: Open Source Mathematics Software:/$PKG_BASE:/" "$SPKG_FILE"
break
fi
done
Expand Down
64 changes: 59 additions & 5 deletions src/doc/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ fi
OUTPUT_INDEX="$OUTPUT_DIR"/index.rst
cat > "$OUTPUT_INDEX" <<EOF

External Packages
=================
Features, Distributions, and External Packages
==============================================

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just "Packages and Features"?

And we list them in the order

  • standard packages
  • optional packages
  • distribution packages
  • features
  • experimental packages (perhaps after features)
  • all packages (I don't know what to do with this item. Maybe removed later)

Standard Packages
-----------------
Expand All @@ -100,7 +100,16 @@ Sage depends. It installs them automatically if it does not find
equivalent system packages.

EOF
for PKG_BASE in $(sage-package list --has-file SPKG.rst :standard: | sort); do
for PKG_BASE in $(sage-package list --has-file SPKG.rst :standard: | grep -v '^sagemath_' | sort); do
echo "* :ref:\`spkg_$PKG_BASE\`"
done >> "$OUTPUT_INDEX"
cat >> "$OUTPUT_INDEX" <<EOF

Packages of the Modularized Sage Library
----------------------------------------

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Distribution Packages of the Sage Library", now that "distribution package" is a standard term?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done

EOF
for PKG_BASE in $(sage-package list --has-file SPKG.rst | grep '^sagemath_' | sort); do
echo "* :ref:\`spkg_$PKG_BASE\`"
done >> "$OUTPUT_INDEX"
cat >> "$OUTPUT_INDEX" <<EOF
Expand All @@ -112,7 +121,7 @@ For additional functionality, you can install some of the following
optional packages.

EOF
for PKG_BASE in $(sage-package list --has-file SPKG.rst :optional: | sort); do
for PKG_BASE in $(sage-package list --has-file SPKG.rst :optional: | grep -v '^sagemath_' | sort); do
echo "* :ref:\`spkg_$PKG_BASE\`"
done >> "$OUTPUT_INDEX"
cat >> "$OUTPUT_INDEX" <<EOF
Expand All @@ -125,11 +134,48 @@ Some packages that provide additional functionality are marked as
integration of these packages into the Sage distribution.

EOF
for PKG_BASE in $(sage-package list --has-file SPKG.rst :experimental: | sort); do
for PKG_BASE in $(sage-package list --has-file SPKG.rst :experimental: | grep -v '^sagemath_' | sort); do
echo "* :ref:\`spkg_$PKG_BASE\`"
done >> "$OUTPUT_INDEX"
cat >> "$OUTPUT_INDEX" <<EOF

Runtime-Detectable Features and Conditional Doctests
----------------------------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just "Features and Conditional Doctests" or "Features for Conditional Doctests" or even just "Features"?

We do not need to explain what a feature is in the title. Or do you need? If not, let's make the title short.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've shortened it


.. toctree::
:maxdepth: 1

sage/features
sage/features/sagemath
sage/features/pkg_systems
sage/features/bliss
sage/features/csdp
sage/features/databases
sage/features/dvipng
sage/features/ffmpeg
sage/features/four_ti_2
sage/features/gap
sage/features/graph_generators
sage/features/graphviz
sage/features/imagemagick
sage/features/interfaces
sage/features/internet
sage/features/kenzo
sage/features/latex
sage/features/latte
sage/features/lrs
sage/features/mcqd
sage/features/meataxe
sage/features/mip_backends
sage/features/normaliz
sage/features/pandoc
sage/features/pdf2svg
sage/features/polymake
sage/features/rubiks
sage/features/tdlib
sage/features/join_feature
sage/features/all

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about splitting feature facilities from features themselves? So sage/features, sage/features/join_feature, sage/features/all may be placed fore-front and then features afterwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a separate toctree then?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. Perhaps we may later move them three out of this section if we could find a better place for them. But I have no idea right now.

Copy link
Collaborator

@kwankyu kwankyu Jun 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good place for the three may be found in the section

Infrastructure > Programming Facilities > Test Framework

or a new section

Infrastructure > Programming Facilities > Features Framework (or Features Facility or just Features)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that's where they are coming from...

All External Packages
---------------------

Expand All @@ -142,11 +188,14 @@ EOF

OUTPUT_INDEX="$OUTPUT_DIR"/index_alph.rst
cat >> "$OUTPUT_INDEX" <<EOF

Details of external packages
============================

Packages are in alphabetical order.

.. default-role:: code

.. toctree::
:maxdepth: 1

Expand All @@ -160,3 +209,8 @@ for PKG_BASE in $(sage-package list --has-file SPKG.rst | sort); do
(echo ".. _spkg_$PKG_BASE:" && echo && OUTPUT_RST=1 sage-spkg-info $PKG_BASE) | sed -e "s|https://github.com/sagemath/sage/issues/\([0-9]*\)|:issue:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" > "$OUTPUT_DIR"/$PKG_BASE.rst
echo >> "$OUTPUT_INDEX" " $PKG_BASE"
done
cat >> "$OUTPUT_INDEX" <<EOF

.. default-role::

EOF
38 changes: 0 additions & 38 deletions src/doc/en/reference/misc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,44 +141,6 @@ Fast Expression Evaluation
.. sage/ext/interpreters/wrapper_rdf
.. sage/ext/interpreters/wrapper_rr

Features
~~~~~~~~

.. toctree::
:maxdepth: 1

sage/features
sage/features/join_feature
sage/features/all
sage/features/sagemath
sage/features/pkg_systems
sage/features/bliss
sage/features/csdp
sage/features/databases
sage/features/dvipng
sage/features/ffmpeg
sage/features/four_ti_2
sage/features/gap
sage/features/graph_generators
sage/features/graphviz
sage/features/imagemagick
sage/features/interfaces
sage/features/internet
sage/features/kenzo
sage/features/latex
sage/features/latte
sage/features/lrs
sage/features/mcqd
sage/features/meataxe
sage/features/mip_backends
sage/features/normaliz
sage/features/pandoc
sage/features/pdf2svg
sage/features/polymake
sage/features/rubiks
sage/features/tdlib


Code Evaluation
---------------

Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/bliss.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

class BlissLibrary(CythonFeature):
r"""
A :class:`~sage.features.Feature` which describes whether the Bliss library is
A :class:`~sage.features.Feature` which describes whether the :ref:`Bliss library <spkg_bliss>` is
present and functional.

EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/cddlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class CddExecutable(Executable):
r"""
A :class:`~sage.features.Feature` describing the presence of an executable
which comes as a part of ``cddlib``.
which comes as a part of :ref:`cddlib <spkg_cddlib>`.

EXAMPLES::

Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/csdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class CSDP(Executable):
r"""
A :class:`~sage.features.Feature` which checks for the ``theta`` binary
of CSDP.
of :ref:`CSDP <spkg_csdp>`.

EXAMPLES::

Expand Down
32 changes: 20 additions & 12 deletions src/sage/features/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

class DatabaseConwayPolynomials(StaticFile):
r"""
A :class:`~sage.features.Feature` which describes the presence of Frank Luebeck's
database of Conway polynomials.
A :class:`~sage.features.Feature` which describes the presence of :ref:`Frank Luebeck's
database of Conway polynomials <spkg_conway_polynomials>`.

EXAMPLES::

Expand Down Expand Up @@ -60,8 +60,8 @@ def __init__(self):

class DatabaseCremona(StaticFile):
r"""
A :class:`~sage.features.Feature` which describes the presence of John Cremona's
database of elliptic curves.
A :class:`~sage.features.Feature` which describes the presence of :ref:`John Cremona's
database of elliptic curves <spkg_database_cremona_ellcurve>`.

INPUT:

Expand All @@ -73,7 +73,7 @@ class DatabaseCremona(StaticFile):
sage: from sage.features.databases import DatabaseCremona
sage: DatabaseCremona('cremona_mini').is_present()
FeatureTestResult('database_cremona_mini_ellcurve', True)
sage: DatabaseCremona().is_present() # optional - database_cremona_ellcurve
sage: DatabaseCremona().is_present() # optional - database_cremona_ellcurve
FeatureTestResult('database_cremona_ellcurve', True)
"""
def __init__(self, name="cremona", spkg="database_cremona_ellcurve"):
Expand All @@ -94,7 +94,8 @@ def __init__(self, name="cremona", spkg="database_cremona_ellcurve"):

class DatabaseJones(StaticFile):
r"""
A :class:`~sage.features.Feature` which describes the presence of John Jones's tables of number fields.
A :class:`~sage.features.Feature` which describes the presence of
:ref:`John Jones's tables of number fields <spkg_database_jones_numfield>`.

EXAMPLES::

Expand All @@ -118,12 +119,13 @@ def __init__(self):

class DatabaseKnotInfo(PythonModule):
r"""
A :class:`~sage.features.Feature` which describes the presence of the databases at the
A :class:`~sage.features.Feature` which describes the presence of the
:ref:`package providing the KnotInfo and LinkInfo databases <spkg_database_knotinfo>`.

The homes of these databases are the
web-pages `KnotInfo <https://knotinfo.math.indiana.edu/>`__ and
`LinkInfo <https://linkinfo.sitehost.iu.edu>`__.



EXAMPLES::

sage: from sage.features.databases import DatabaseKnotInfo
Expand All @@ -140,9 +142,13 @@ def __init__(self):
"""
PythonModule.__init__(self, 'database_knotinfo', spkg='database_knotinfo')


class DatabaseCubicHecke(PythonModule):
r"""
A :class:`~sage.features.Feature` which describes the presence of the databases at the
A :class:`~sage.features.Feature` which describes the presence of the
:ref:`Cubic Hecke algebra database package <spkg_database_cubic_hecke>`.

The home of this database is the
web-page `Cubic Hecke algebra on 4 strands <http://www.lamfa.u-picardie.fr/marin/representationH4-en.html>`__
of Ivan Marin.

Expand All @@ -162,10 +168,12 @@ def __init__(self):
"""
PythonModule.__init__(self, 'database_cubic_hecke', spkg='database_cubic_hecke')


class DatabaseReflexivePolytopes(StaticFile):
r"""
A :class:`~sage.features.Feature` which describes the presence of the PALP database
of reflexive lattice polytopes.
A :class:`~sage.features.Feature` which describes the presence of the
:ref:`PALP databases of reflexive three-dimensional <spkg_polytopes_db>`
and :ref:`four-dimensional lattice polytopes <spkg_polytopes_db_4d>`.

EXAMPLES::

Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class FFmpeg(Executable):
r"""
A :class:`~sage.features.Feature` describing the presence of ``ffmpeg``
A :class:`~sage.features.Feature` describing the presence of :ref:`ffmpeg <spkg_ffmpeg>`.

EXAMPLES::

Expand Down
4 changes: 2 additions & 2 deletions src/sage/features/four_ti_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class FourTi2Executable(Executable):
r"""
A :class:`~sage.features.Feature` for the 4ti2 executables.
A :class:`~sage.features.Feature` for the :ref:`4ti2 <spkg_4ti2>` executables.
"""
def __init__(self, name):
r"""
Expand All @@ -27,7 +27,7 @@ def __init__(self, name):

class FourTi2(JoinFeature):
r"""
A :class:`~sage.features.Feature` describing the presence of the ``4ti2`` executables.
A :class:`~sage.features.Feature` describing the presence of all :ref:`4ti2 <spkg_4ti2>` executables.

EXAMPLES::

Expand Down
4 changes: 2 additions & 2 deletions src/sage/features/gap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""
Features for testing the presence of GAP packages
Features for testing the presence of the SageMath interfaces to ``gap`` and of GAP packages
"""
# *****************************************************************************
# Copyright (C) 2016 Julian RΓΌth
Expand Down Expand Up @@ -62,7 +62,7 @@ def _is_present(self):
class sage__libs__gap(JoinFeature):
r"""
A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.gap`
(the library interface to GAP) and :mod:`sage.interfaces.gap` (the pexpect
(the library interface to :ref:`GAP <spkg_gap>`) and :mod:`sage.interfaces.gap` (the pexpect
interface to GAP). By design, we do not distinguish between these two, in order
to facilitate the conversion of code from the pexpect interface to the library
interface.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/gfan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class GfanExecutable(Executable):
r"""
A :class:`~sage.features.Feature` for the gfan executables.
A :class:`~sage.features.Feature` for the :ref:`gfan <spkg_gfan>` executables.
"""
def __init__(self, cmd=None):
r"""
Expand Down
8 changes: 4 additions & 4 deletions src/sage/features/graph_generators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""
Features for testing the presence of various graph generator programs
Features for testing the presence of graph generator programs ``benzene``, ``buckygen``, ``plantri``
"""

# *****************************************************************************
Expand All @@ -23,7 +23,7 @@

class Plantri(Executable):
r"""
A :class:`~sage.features.Feature` which checks for the ``plantri`` binary.
A :class:`~sage.features.Feature` which checks for the :ref:`plantri <spkg_plantri>` binary.

EXAMPLES::

Expand Down Expand Up @@ -70,7 +70,7 @@ def is_functional(self):

class Buckygen(Executable):
r"""
A :class:`~sage.features.Feature` which checks for the ``buckygen`` binary.
A :class:`~sage.features.Feature` which checks for the :ref:`buckygen <spkg_buckygen>` binary.

EXAMPLES::

Expand Down Expand Up @@ -117,7 +117,7 @@ def is_functional(self):

class Benzene(Executable):
r"""
A :class:`~sage.features.Feature` which checks for the ``benzene``
A :class:`~sage.features.Feature` which checks for the :ref:`benzene <spkg_benzene>`
binary.

EXAMPLES::
Expand Down
Loading