peal.global_utils.get_project_resource_dir

peal.global_utils.get_project_resource_dir()[source]

Return the repository root, i.e. the directory containing peal.

Serves as the anchor for the <PEAL_BASE> placeholder in config paths and as the base for the module names built in find_subclasses().

$PEAL_BASE wins when it is set. Without it the answer is the parent of the peal package, which is the repository root in a checkout but site-packages once PEAL is pip-installed – and configs/ lives outside the package, so every <PEAL_BASE>/configs/... path in the 1294 shipped configs would resolve into site-packages. Point $PEAL_BASE at an unpacked source tree to use them from an installed PEAL.

peal.generators.rae_pipeline._peal_base reads the same variable, so the two placeholder expanders agree.

Returns:

Directory that <PEAL_BASE> expands to.

Return type:

str