@@ -555,6 +555,69 @@ def smoke_sphinx_autodoc_api_style(dist_dir: pathlib.Path, version: str) -> None
555555 )
556556
557557
558+ def smoke_sphinx_autodoc_badges (dist_dir : pathlib .Path , version : str ) -> None :
559+ """Verify the autodoc-badges extension installs and imports cleanly."""
560+ with tempfile .TemporaryDirectory () as tmp :
561+ python_path = _create_venv (pathlib .Path (tmp ))
562+ _install_into_venv (
563+ python_path ,
564+ * _workspace_wheel_requirements (dist_dir ),
565+ )
566+ _run_python (
567+ python_path ,
568+ (
569+ "import sphinx_autodoc_badges; "
570+ "from sphinx_autodoc_badges import setup; "
571+ "assert callable(setup)"
572+ ),
573+ )
574+
575+
576+ def smoke_sphinx_autodoc_fastmcp (dist_dir : pathlib .Path , version : str ) -> None :
577+ """Verify the autodoc-fastmcp extension installs and imports cleanly."""
578+ with tempfile .TemporaryDirectory () as tmp :
579+ python_path = _create_venv (pathlib .Path (tmp ))
580+ _install_into_venv (
581+ python_path ,
582+ * _workspace_wheel_requirements (dist_dir ),
583+ )
584+ _run_python (
585+ python_path ,
586+ (
587+ "import sphinx_autodoc_fastmcp; "
588+ "from sphinx_autodoc_fastmcp import setup; "
589+ "assert callable(setup)"
590+ ),
591+ )
592+
593+
594+ _PACKAGE_SMOKE_RUNNERS : dict [str , t .Callable [[pathlib .Path , str ], None ]] = {
595+ "gp-sphinx" : smoke_gp_sphinx ,
596+ "sphinx-argparse-neo" : smoke_sphinx_argparse_neo ,
597+ "sphinx-autodoc-api-style" : smoke_sphinx_autodoc_api_style ,
598+ "sphinx-autodoc-badges" : smoke_sphinx_autodoc_badges ,
599+ "sphinx-autodoc-docutils" : smoke_sphinx_autodoc_docutils ,
600+ "sphinx-autodoc-fastmcp" : smoke_sphinx_autodoc_fastmcp ,
601+ "sphinx-autodoc-pytest-fixtures" : smoke_sphinx_autodoc_pytest_fixtures ,
602+ "sphinx-autodoc-sphinx" : smoke_sphinx_autodoc_sphinx ,
603+ "sphinx-fonts" : smoke_sphinx_fonts ,
604+ "sphinx-gptheme" : smoke_sphinx_gptheme ,
605+ }
606+
607+
608+ def smoke_workspace_package_names () -> frozenset [str ]:
609+ """Return distribution names that have a wheel smoke test.
610+
611+ Excludes ``root-install``, which does not map to a built wheel.
612+
613+ Returns
614+ -------
615+ frozenset[str]
616+ Keys of :data:`_PACKAGE_SMOKE_RUNNERS`.
617+ """
618+ return frozenset (_PACKAGE_SMOKE_RUNNERS .keys ())
619+
620+
558621def smoke (
559622 target : str ,
560623 * ,
@@ -571,21 +634,11 @@ def smoke(
571634 message = "--dist-dir is required for package smoke tests"
572635 raise SystemExit (message )
573636
574- runners : dict [str , t .Callable [[pathlib .Path , str ], None ]] = {
575- "gp-sphinx" : smoke_gp_sphinx ,
576- "sphinx-gptheme" : smoke_sphinx_gptheme ,
577- "sphinx-fonts" : smoke_sphinx_fonts ,
578- "sphinx-argparse-neo" : smoke_sphinx_argparse_neo ,
579- "sphinx-autodoc-docutils" : smoke_sphinx_autodoc_docutils ,
580- "sphinx-autodoc-sphinx" : smoke_sphinx_autodoc_sphinx ,
581- "sphinx-autodoc-pytest-fixtures" : smoke_sphinx_autodoc_pytest_fixtures ,
582- "sphinx-autodoc-api-style" : smoke_sphinx_autodoc_api_style ,
583- }
584- if target not in runners :
637+ if target not in _PACKAGE_SMOKE_RUNNERS :
585638 message = f"unknown smoke target: { target } "
586639 raise SystemExit (message )
587640 package = packages [target ]
588- runners [target ](dist_dir , package .version )
641+ _PACKAGE_SMOKE_RUNNERS [target ](dist_dir , package .version )
589642
590643
591644def main () -> int :
@@ -603,17 +656,7 @@ def main() -> int:
603656 smoke_parser = subparsers .add_parser ("smoke" )
604657 smoke_parser .add_argument (
605658 "target" ,
606- choices = [
607- "root-install" ,
608- "gp-sphinx" ,
609- "sphinx-gptheme" ,
610- "sphinx-fonts" ,
611- "sphinx-argparse-neo" ,
612- "sphinx-autodoc-docutils" ,
613- "sphinx-autodoc-sphinx" ,
614- "sphinx-autodoc-pytest-fixtures" ,
615- "sphinx-autodoc-api-style" ,
616- ],
659+ choices = ["root-install" , * sorted (_PACKAGE_SMOKE_RUNNERS .keys ())],
617660 )
618661 smoke_parser .add_argument ("--dist-dir" , type = pathlib .Path )
619662
0 commit comments