hooks API reference

This page gives an overview of all public hooks objects, functions and methods. All classes and functions exposed in hooks.* namespace are public.

Cookiecutter pre-generation hooks

These are functions run after user input, but before project generation. If any pre-generation hooks fail, the project will not be generated.

Prompt input validation

check_valid_email_address_format(email)

Check that an email address is of a valid format using regular expressions.

Cookiecutter post-generation hooks

These are functions run after initial project generation by the cookiecutter package. These include moving the selected organisational frameworks to the correct location, as well as deleting unnecessary files and folders. If any post-generation hooks fail, the generated project will be rolled-back, and deleted.

Public sector organisational framework functions

set_aqa_framework(...)

Set a specific organisational analytical quality assurance (AQA) framework.

set_request_template(...)

Set a pull or merge request template in the outputted project structure for a specific organisation.

Post-generation clean up

delete_files_and_folders(paths)

Delete files and folders for given file and/or folder paths.

parse_features_json(file)

Parse a JSON file containing filepaths.