law.cli.software#

“law sw” cli subprogram.

setup_parser(sub_parsers)[source]#

Sets up the command line parser for the software subprogram and adds it to sub_parsers.

execute(args)[source]#

Executes the software subprogram with parsed commandline args.

build_software_cache(sw_dir=None, dep_names=None)[source]#

Builds up the software cache directory at sw_dir by simply copying all required python modules identified by dep_names, defaulting to a predefined list of package names. sw_dir is evaluated with get_sw_dir().

remove_software_cache(sw_dir=None)[source]#

Removes the software cache directory at sw_dir which is evaluated with get_sw_dir().

reload_dependencies(force=False, dep_names=None)[source]#

Reloads all python modules that law depends on, idenfied by dep_names and defaulting to a predefined list of package names. Unless force is True, multiple calls to this function will not have any effect.

use_software_cache(sw_dir=None, reload_deps=False)[source]#

Adjusts sys.path so that the cached software at sw_dir is used. sw_dir is evaluated with get_sw_dir(). When reload_deps is True, reload_dependencies() is invoked.

get_sw_dir(sw_dir=None)[source]#

Returns the software directory defined in the core.software_dir config. When sw_dir is not None, it is expanded and returned instead.