Configuration parsers#
Create the default wellies argument parser.
Returns: ArgumentParser: An ArgumentParser object including the wellies options.
Source code in wellies/config.py
usage: python -m deploy <PROFILE>
Generate required files for a pyflow suite project.
positional arguments:
PROFILE YAML configuration profile name
options:
-h, --help show this help message and exit
-p, --profiles CONFIG_NAME
YAML configuration profiles
-s, --set KEY=VALUE [KEY=VALUE ...]
Set a number of key-value pairs (do not put spaces
before or after the = sign). If a value contains
spaces, you should define it with double quotes:
foo="this is a sentence". Note that values are always
treated as strings.
-m, --message MESSAGE
Deployment git commit message
-b, --build_dir BUILD_DIR
Build directory for suite deployment, by default a
temporary directory is created
-f, --files FILES [FILES ...]
Specific files to deploy, by default everything is
deployed
-y Answers yes to all prompts
-n, --no_deploy Skip deployment
--log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Set the logging level for the suite deployment
Create an environment tool based on the given options.
Parameters#
lib_dir : str The lib directory of the suite where the tools are installed. name : str The name of the environment. options : dict A dictionary containing the environment options.
Returns#
Tool: A Tool object representing the environment.
Raises#
Exception: If the environment type is not supported or if certain options are used together. NotImplementedError: If the environment type is not implemented.
Source code in wellies/tools.py
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | |
Parse submission arguments to be used on pyflow.Task definitions.
If a defaults mapping is defined it will be used as a default
definition for all other mappings defined.
:Attention: "defaults" can't be used as a context key name.
Parameters#
options : dict submit_arguments configuration dictionary (from yaml file)
Returns#
submit_arguments, submit_arguments_defaults : dict, dict Return parsed options as two dictionaries. The base submit arguments and a second one with the defaults options in a compatible format to be passed to a pyflow.Node variables argument.
Source code in wellies/config.py
Concatenates the config dictionaries and check for duplicates Override values in files with entries given on set_variables.
Source code in wellies/config.py
Deploy Tools#
Deploy a suite to a remote repository.
Parameters#
suite (dict): The suite to deploy. user (str): The username to use for the deployment. name (str): The name of the suite. hostname (str): The hostname of the remote repository. deploy_dir (str): The target to deploy the suite to. backup_deploy (str, optional): The backup repository to use. Defaults to None. build_dir (str, optional): The build directory to use. If None, a temporary directory will be created. Defaults to None. no_prompt (bool, optional): Skip all prompts and answer yes to all. Defaults to False. no_deploy (bool, optional): Whether to skip the deployment. Defaults to False. message (str, optional): The commit message to use for the deployment. Defaults to None. files (list, optional): The files to deploy. If None, everything is deployed. Defaults to None.
Source code in wellies/deployment.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
Returns a pyflow host object based on the given hostname and user.
Parameters#
hostname (str): The name of the host to connect to. user (str): The username to use when connecting to the host. ecflow_path (str, optional): The path to the ecflow_client executable. If None, try to get the current path from the ecflow_client executable. Defaults to None. server_ecfvars (bool, optional): Whether to use server-side ECF_ variables. Defaults to False. extra_variables (dict, optional): Additional ecflow variables to set on the host **kwargs: Additional keyword arguments to pass to the pyflow host constructor.
| Returns: |
|
|---|