conductor.native.lib.package_environment module¶
-
class
conductor.native.lib.package_environment.
PackageEnvironment
(base=None)¶ Bases:
object
Encapsulate the submission environment vars.
Handle building up the env with a single call to extend()
-
extend
(env_list)¶ Extend with the given variable specifications.
env_list is either: A list of objects or an object with an “environment” key that contains a list of objects. Each of these objects has a name, a value, and a merge_policy. One by one they are added according to their merge policy. See set and append above.
TODO: The merge policy should be set the first time a variable is declared and used for all subsequent amendments. Why? Because its more likely that variables are being added from packages registered with conductor first, and then user-defined variables added later. A user is more likely to make a mistake and corrupt a variable that has been specified in packages. Example: A package may set FOO=BAR (exclusive), but then a user may set FOO=BAZ (append). The result will be FOO=BAR:BAZ. The user’s attempt should have been rejected.
-