Skip to content

Commit 7f12a8e

Browse files
author
Matthias Koeppe
committed
src/doc/en/developer/packaging_sage_library.rst: Add best practices for # optional - sage...
1 parent 3f098a0 commit 7f12a8e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/doc/en/developer/packaging_sage_library.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,15 @@ doctests that depend on :class:`sage.symbolic.ring.SymbolicRing` for integration
567567
testing. Hence, these doctests are marked ``# optional -
568568
sage.symbolic``.
569569

570+
When defining new features for the purpose of doctest annotations, it may be a good
571+
idea to hide implementation details from feature names. For example, all doctests that
572+
use finite fields have to depend on PARI. However, we have defined a feature
573+
:mod:`sage.rings.finite_rings` (which implies the presence of :mod:`sage.libs.pari`).
574+
Annotating the doctests ``# optional - sage.rings.finite_rings`` expresses the
575+
dependency in a clearer way than using ``# optional - sage.libs.pari``, and it
576+
will be a smaller maintenance burden when implementation details change.
577+
578+
570579
Testing the distribution in virtual environments with tox
571580
---------------------------------------------------------
572581

0 commit comments

Comments
 (0)