pyampp.util.demo_notebooks

Guardrails and convenience helpers for demo notebook assets.

Attributes

REPO_ROOT

DEMO_NOTEBOOK_ROOT

PROTECTED_SUFFIXES

DEFAULT_ALLOW_ENV

Functions

is_protected_demo_path(→ bool)

filter_protected_paths(→ list[str])

git_changed_paths(→ list[str])

check_changed_paths(→ list[str])

copy_demo_bundle(→ list[pathlib.Path])

find_demo_notebooks(→ list[pathlib.Path])

lock_main(→ int)

check_main(→ int)

launch_main(→ int)

main(→ int)

Module Contents

pyampp.util.demo_notebooks.REPO_ROOT[source]
pyampp.util.demo_notebooks.DEMO_NOTEBOOK_ROOT[source]
pyampp.util.demo_notebooks.PROTECTED_SUFFIXES[source]
pyampp.util.demo_notebooks.DEFAULT_ALLOW_ENV = 'PYAMPP_ALLOW_DEMO_NOTEBOOK_EDITS'[source]
pyampp.util.demo_notebooks.is_protected_demo_path(path: str) bool[source]
pyampp.util.demo_notebooks.filter_protected_paths(paths: Iterable[str]) list[str][source]
pyampp.util.demo_notebooks.git_changed_paths(repo_root: pathlib.Path, *, staged: bool = False, against: str | None = None) list[str][source]
pyampp.util.demo_notebooks.check_changed_paths(paths: Sequence[str], *, allow_env: str = DEFAULT_ALLOW_ENV) list[str][source]
pyampp.util.demo_notebooks.copy_demo_bundle(source_root: pathlib.Path, dest_root: pathlib.Path) list[pathlib.Path][source]
pyampp.util.demo_notebooks.find_demo_notebooks(root: pathlib.Path) list[pathlib.Path][source]
pyampp.util.demo_notebooks.lock_main(argv: Sequence[str] | None = None) int[source]
pyampp.util.demo_notebooks.check_main(argv: Sequence[str] | None = None) int[source]
pyampp.util.demo_notebooks.launch_main(argv: Sequence[str] | None = None) int[source]
pyampp.util.demo_notebooks.main(argv: Sequence[str] | None = None) int[source]