Skip to content

Commit d7db870

Browse files
committed
Edit optional needs tags explanation
1 parent 627b9f1 commit d7db870

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/doc/en/developer/coding_basics.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
General Conventions
77
===================
88

9-
109
There are many ways to contribute to Sage, including sharing scripts
1110
and Jupyter notebooks that implement new functionality using Sage,
1211
improving to the Sage library, or to working on the many underlying
@@ -1256,13 +1255,15 @@ framework. Here is a comprehensive list:
12561255
Neither of this applies to files or directories which are explicitly given
12571256
as command line arguments: those are always tested.
12581257

1259-
- **optional/needs:** A line tagged with ``optional - FEATURE``
1260-
or ``needs FEATURE`` is not tested unless the ``--optional=KEYWORD`` flag
1261-
is passed to ``sage -t`` (see :ref:`section-optional-doctest-flag`).
1262-
1263-
If ``FEATURE`` starts with an exclamation point ``!``, then the condition is
1258+
- **optional** or **needs:** A line tagged with ``optional - FEATURE`` or
1259+
``needs FEATURE`` is tested if the feature is available in Sage. If
1260+
``FEATURE`` starts with an exclamation point ``!``, then the condition is
12641261
negated, that is, the doctest runs only if the feature is not available.
12651262

1263+
If the feature is included in the ``--optional=KEYWORD`` flag passed to
1264+
``sage -t`` (see :ref:`section-optional-doctest-flag`), then the line is
1265+
tested regardless of the feature availability.
1266+
12661267
The main applications are:
12671268

12681269
- **optional packages:** When a line requires an optional package to be
@@ -1274,7 +1275,7 @@ framework. Here is a comprehensive list:
12741275
sage: C.solve() # optional - !rubiks (GAP is used)
12751276
'L*R'
12761277

1277-
- **optional database:** When a line requires a database to be present::
1278+
- **features:** When a line requires a feature to be present::
12781279

12791280
sage: SloaneEncyclopedia[60843] # optional - sloane_database
12801281
[1, 6, 21, 107, 47176870]
@@ -1285,7 +1286,7 @@ framework. Here is a comprehensive list:
12851286
OSError: The Sloane Encyclopedia database must be installed. Use e.g.
12861287
'SloaneEncyclopedia.install()' to download and install it.
12871288

1288-
- **internet:** For lines that require an internet connection::
1289+
For lines that require an internet connection::
12891290

12901291
sage: oeis(60843) # optional - internet
12911292
A060843: Busy Beaver problem: a(n) = maximal number of steps that an

0 commit comments

Comments
 (0)