Utils¶
-
pyenvbuilder.utils.
get_destination
(dir_path)¶ Checks if it is a valid directory destination
- Parameters
dir_path (string) – Path of the destination directory
- Returns
Path of directory or None and error message
- Return type
tuple
-
pyenvbuilder.utils.
is_yaml
(yml_file)¶ Validates if the file is a .yml or .yaml file
-
pyenvbuilder.utils.
locate_files
(files)¶ If one file is passed in: verifies if it is a valid yaml file If folder is passed in : verifies if the folder contains valid yaml files
- Parameters
files (list) –
- Returns
List of validated yaml files
- Return type
list
-
pyenvbuilder.utils.
run_subprocess
(commands)¶ Opens a /bin/bash subproces This subprocess then executes the passed-in commands
- Parameters
commands (string) –
-
pyenvbuilder.utils.
setup_conda
()¶
-
pyenvbuilder.utils.
validate_installed
(cmd)¶ Locates the cmd executable
- Parameters
cmd (str) – Command to be tested
- Returns
Boolean status and string status message
- Return type
tuple
-
pyenvbuilder.utils.
validate_path
(file_name)¶ Validates if the passed-in argument is a valid path
- Parameters
file_name (str) – Path to be validated
- Returns
Boolean status and dict to identify if the path is a file or directory
- Return type
tuple