cookiecutter_python.hooks package¶
Submodules¶
cookiecutter_python.hooks.post_gen_project module¶
Post Cookie Hook: Templated File with jinja2 syntax
Cookiecutter post generation hook script that handles operations after the template project is used to generate a target project.
- cookiecutter_python.hooks.post_gen_project.CLI_ONLY(x)¶
- cookiecutter_python.hooks.post_gen_project.PYTEST_PLUGIN_ONLY(x)¶
- cookiecutter_python.hooks.post_gen_project.get_context() → OrderedDict[source]¶
Get the Context, that was used by the Templating Engine at render time
- cookiecutter_python.hooks.post_gen_project.git_commit(request)[source]¶
Commit the staged changes in the generated project.
- cookiecutter_python.hooks.post_gen_project.initialize_git_repo(project_dir: str)[source]¶
Initialize the Git repository in the generated project.
- cookiecutter_python.hooks.post_gen_project.is_git_repo_clean(project_directory: str) → bool[source]¶
Check to confirm if the Git repository is clean and has no uncommitted changes. If its clean return True otherwise False.
- cookiecutter_python.hooks.post_gen_project.main()[source]¶
Delete irrelevant to Project Type files and optionally do git commit.
- cookiecutter_python.hooks.post_gen_project.post_file_removal(request)[source]¶
Preserve only files relevant to Project Type requested to Generate.
Delete files that are not relevant to the project type requested to generate.
For example, if the user requested a ‘module’ project type, then delete the files that are only relevant to a ‘module+cli’ project.
- Parameters:
request ([type]) – [description]
cookiecutter_python.hooks.pre_gen_project module¶
Pre Cookie Hook: Templated File with jinja2 syntax