polaris.setup.setup_tasks
- polaris.setup.setup_tasks(work_dir, task_list=None, numbers=None, config_file=None, machine=None, baseline_dir=None, component_path=None, suite_name='custom', cached=None, copy_executable=False, clean_tasks=False, model=None, build=None, branch=None, clean_build=None, quiet_build=None, cmake_flags=None, debug=None)[source]
Set up one or more tasks
- Parameters:
work_dir (str) – A directory that will serve as the base for creating task directories
task_list (list of str, optional) – Relative paths for a tasks to set up
numbers (list of str, optional) – Task numbers to setup, as listed from
polaris list, optionally with a suffixcto indicate that all steps in that task should be cachedconfig_file ({str, None}, optional) – Configuration file with custom options for setting up and running tasks
machine (str, optional) – The name of one of the machines with defined config options, which can be listed with
polaris list --machinesbaseline_dir (str, optional) – Location of baselines that can be compared to
component_path (str, optional) – The relative or absolute path to the location where the model and default namelists have been (or will be) built
suite_name (str, optional) – The name of the suite if tasks are being set up through a suite or
'custom'if notcached (list of list of str, optional) – For each task in
tasks, which steps (if any) should be cached, or a list with “_all” as the first entry if all steps in the task should be cachedcopy_executable (bool, optional) – Whether to copy the model executable to the work directory
clean_tasks (bool, optional) – Whether to delete the contents of the task work directories before setting up tasks
model (str, optional) – The model to run
build (bool, optional) – Whether to build the model
branch (str, optional) – The relative or absolute path to the base of the component branch to build. If not provided,
component_pathmust point to an existing build.clean_build (bool, optional) – Whether to clean the build directory before building the model.
clean_build = Trueimpliesbuild = True.quiet_build (bool, optional) – Whether to build the model without output. Implies
build = True.cmake_flags (str, optional) – Additional flags to pass to make or CMake when building the model
debug (bool, optional) – Whether to build the model in debug mode
- Returns:
tasks (dict of polaris.Task) – A dictionary of tasks, with the relative path in the work directory as keys