vhc
– The entry point¶
Entry point for vhc
Main tasks
- load the configuration file
- set up logging and, if needed, multiprocessing system
- load plugin hooks
- set up the html recap
- check the recipe
- get the list of drivers
- execute the drivers
- write the html recap file
-
libvhc.vhc.
abs_dir
(value)[source]¶ Check that the input value is a directory and, if True, return its absolute path
Parameters: - value : string
value to validate
Returns: - string
absolute path to
value
-
libvhc.vhc.
check_is_shot
(path, conf)[source]¶ Uses the configuration option
shot_subdir
in the[general]
section to decide whether abort vhc or not.If the option is present and non-empty, the check is performed and an exception is raised if no match is found.
Parameters: - path : string
path to check
- conf :
pyhetdex.tools.configuration.ConfigParser
configuration object
Raises: - libvhc.exceptions.VHCPathError
if the path doesn’t have
shot_subdir
as subdirectory
-
libvhc.vhc.
copy_html
(recipe, conf)[source]¶ Check the configuration options for copying the html file and make the copy if necessary.
Parameters: - recipe : string
name of the recipe
- conf :
pyhetdex.tools.configuration.ConfigParser
instance configuration object: should contain any info necessary to use the instances
-
libvhc.vhc.
envvar_to_path
(env_name='CUREBIN')[source]¶ Prepend the curebin to the PATH to avoid having to explicitly provide it to the commands
Parameters: - env_name : str, optional
name of the environment variable to push to the environment
-
libvhc.vhc.
get_worker
(name, conf, log)[source]¶ Create a worker and return it
Parameters: - name : string
name to associate to the worker
- conf :
pyhetdex.tools.configuration.ConfigParser
configuration object
- log :
logging.Logger
logger to use
Returns:
-
libvhc.vhc.
log_svn_info
(log, svn_info)[source]¶ Get the svn info from the configuration and log them. Return the dictionary with the entries
Parameters: - log :
logging.Logger
logger to use
- svn_info : dictionary-like
information to log
- log :
-
libvhc.vhc.
main
(argv=None)[source]¶ Main function.
Does the setup, get or create the recipe and driver files and run the drivers.
Parameters: - argv : list of strings, optional
command line arguments, except the caller name. If
None
, it is set tosys.argv[1:]
-
libvhc.vhc.
parse_cl
(argv=None)[source]¶ Parse the command line arguments
Parameters: - argv : list of strings, optional
command line arguments, except the caller name. If
None
, it is set tosys.argv[1:]
Returns: - Namespace
parsed command line arguments
-
libvhc.vhc.
run_drivers
(path, argv, drivers, available_drivers, vcheck)[source]¶ Run the given drivers
Parameters: - path : string
path passed to vhc
- argv : list of strings
extra arguments passed to the drivers
- drivers : list of strings
name of the drivers to execute
- available_drivers : dictionary
map between driver names and callable implementing them
- vcheck :
libvhc.VCheck
vcheck object to pass around