graph LR
Hook_Manager["Hook Manager"]
Replay_Manager["Replay Manager"]
Replay_Manager -- "operates on context managed by" --> Hook_Manager
Hook_Manager -- "manages context for" --> Replay_Manager
click Replay_Manager href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/cookiecutter/Replay_Manager.md" "Details"
This subsystem is crucial for the cookiecutter project's extensibility and reproducibility. It encapsulates the logic for executing custom scripts (hooks) at various stages of project generation and for persisting/retrieving the user-provided configuration (replay data).
Manages the discovery, validation, and execution of Python scripts defined as pre_gen_project, post_gen_project, and pre_prompt hooks. It serves as a core extensibility point, allowing template authors to inject custom logic into the project generation pipeline. This aligns with the project's "Hook-based / Event-Driven" architectural pattern.
Related Classes/Methods:
cookiecutter.hooks.find_hook:51-77cookiecutter.hooks.valid_hook:35-48cookiecutter.hooks.run_script_with_context:108-127cookiecutter.hooks.run_script:80-105cookiecutter.hooks.run_hook:130-144cookiecutter.hooks.run_hook_from_repo_dir:147-177cookiecutter.hooks.run_pre_prompt_hook:180-201
Replay Manager [Expand]
Handles the serialization (dumping) and deserialization (loading) of project generation parameters (the "context" or "answers") to and from a file. This enables the "replay" functionality, allowing users to regenerate projects with the exact same configuration without re-entering information, thereby enhancing reproducibility and automation. It supports the "Configuration-driven" and "Pipeline / Workflow" architectural patterns.
Related Classes/Methods: