Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
sage.features.sagemath: Change sage_optional_tags to sage_features
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 7, 2021
1 parent 10e8d63 commit 654d09c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/sage/doctest/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ def __init__(self, options, args):
from sage.features import package_systems
options.optional.update(system.name for system in package_systems())

from sage.features.sagemath import sage_optional_tags
options.optional.update(sage_optional_tags())
from sage.features.sagemath import sage_features
options.optional.update(feature.name for feature in sage_features())

# Check that all tags are valid
for o in options.optional:
Expand Down
19 changes: 8 additions & 11 deletions src/sage/features/sagemath.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self):
spkg="sagemath_symbolics")


def sage_optional_tags():
def sage_features():
"""
Return tags for conditionalizing doctests.
Expand All @@ -99,15 +99,12 @@ def sage_optional_tags():
EXAMPLES::
sage: from sage.features.sagemath import sage_optional_tags
sage: list(sage_optional_tags()) # random
['sage.graphs',
'sage.graphs.bliss',
'sage.matrix.matrix_gfpn_dense',
'sage.plot',
'sage.rings.number_field',
'sage.rings.real_double',
'sage.symbolic']
sage: from sage.features.sagemath import sage_features
sage: list(sage_features()) # random
[Feature('sage.graphs'),
Feature('sage.graphs.bliss'),
Feature('sage.plot'),
Feature('sage.rings.real_double')]
"""
for feature in [sage__combinat(),
sage__graphs(),
Expand All @@ -120,4 +117,4 @@ def sage_optional_tags():
sage__rings__real_double(),
sage__symbolic()]:
if feature.is_present():
yield feature.name
yield feature

0 comments on commit 654d09c

Please sign in to comment.