workflows.utils.print_json_as_env.format_path_variables#
- workflows.utils.print_json_as_env.format_path_variables(key, validated_dict, split_path_variables=True, **options)#
Converts
validated_dict[key]
from apathlib.Path
to a string. Ifvalidated_dict[key]
is not apathlib.Path
, nothing is done. This modifiesvalidated_dict
.- Parameters:
key (str) – A key of
validated_dict
.validated_dict (dict) – A dict with key
key
wherevalidated_dict[key]
is possibly apathlib.Path
.split_path_variables (bool) –
Adds two additional entires to
validated_dict
:{key}_FILENAME
: only the filename thatvalidated_dict[key]
points to.
{key}_PATH
: only the path to the parent folder containing thefile
validated_dict[key]
points to.
options (kwargs) – Any keyword arguments not used by this function.