diff --git a/synthtool/languages/python.py b/synthtool/languages/python.py index edb016392..1d69cc2fc 100644 --- a/synthtool/languages/python.py +++ b/synthtool/languages/python.py @@ -51,6 +51,10 @@ SAMPLES_TEMPLATE_PATH = Path(CommonTemplates()._template_root) / "python_samples" +NOTEBOOK_TEMPLATE_PATH = ( + Path(CommonTemplates()._template_root) / "python_notebooks_testing_pipeline" +) + def fix_pb2_headers(*, proto_root: str = "**/*_pb2.py") -> None: s.replace( @@ -94,6 +98,14 @@ def _get_sample_readme_metadata(sample_dir: Path) -> dict: return sample_metadata +def python_notebooks_testing_pipeline() -> None: + in_client_library = Path("owlbot.py").exists() + if in_client_library: + excludes: List[str] = [] + _tracked_paths.add(NOTEBOOK_TEMPLATE_PATH) + s.copy([NOTEBOOK_TEMPLATE_PATH], excludes=excludes) + + def py_samples(*, root: PathOrStr = None, skip_readmes: bool = False) -> None: """ Find all samples projects and render templates.