Skip to content

sage.doctest.control: Replace use of sage.misc.package.list_packages #30746

@mkoeppe

Description

@mkoeppe

... by features.

This is so that users can make use of doctests conditionalized with "# optional" in their Sage programs even on distribution-packaged Sage installations, or for optional packages with spkg-configure.m4 (as observed in #30887 comment:28)

After #30887, #32614, #32649 a Feature has a name attribute that can be used as the # optional tag for doctesting.

#32174 implements global Feature discovery and hooks it into sage.doctest.control.

It remains to define Features for all remaining SPKGs that appear in # optional tags somewhere in the Sage library (which can be found using git grep -l '# *optional' | xargs sed -E -n 's/^.*# *optional[ -:]*([a-zA-Z_0-9.]*).*/\1/gp' | sort -u). Then we can remove the use of sage.misc.package.

Related:

CC: @antonio-rojas @kiwifb @simon-king-jena @dimpase @jhpalmieri @kliem @tscrim @kwankyu @orlitzky

Component: doctest framework

Keywords: sd111

Issue created by migration from https://trac.sagemath.org/ticket/30746

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions