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 a pathlib.Path to a string. If validated_dict[key] is not a pathlib.Path, nothing is done. This modifies validated_dict.

Parameters:
  • key (str) – A key of validated_dict.

  • validated_dict (dict) – A dict with key key where validated_dict[key] is possibly a pathlib.Path.

  • split_path_variables (bool) –

    Adds two additional entires to validated_dict:

    • {key}_FILENAME: only the filename that

      validated_dict[key] points to.

    • {key}_PATH: only the path to the parent folder containing the

      file validated_dict[key] points to.

  • options (kwargs) – Any keyword arguments not used by this function.