Skip to content

Commit

Permalink
Make MANAGER the default BaseEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
LourensVeen committed Jan 12, 2025
1 parent 0bb7659 commit a5cac58
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ymmsl/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ class BaseEnv(Enum):
Many of the options in :class:`Implementation` describe additions to
the shell environment to make subsequently, but we need to start
somewhere.
See the MUSCLE3 documentation for more details.
"""
LOGIN = 1
"""Start with a fresh login shell (bash -l)."""
MANAGER = 2
"""Start with the environment the manager was started with."""
CLEAN = 3
"""The environment you get after logging in when using bash."""
CLEAN = 2
"""Like MANAGER, but with any modules unloaded and venvs deactivated."""
MANAGER = 3
"""The environment the manager was started in."""

@classmethod
def _yatiml_savorize(cls, node: yatiml.Node) -> None:
Expand Down Expand Up @@ -99,6 +101,8 @@ class Implementation:
other attributes except for the name, the execution model,
can_share_resources and keeps_state_for_next_use must be ``None``.
If base_env is not specified then it defaults to MANAGER.
For ``execution_model``, the following values are supported:
direct
Expand Down Expand Up @@ -222,7 +226,7 @@ def __init__(
else:
self.script = script

self.base_env = base_env if base_env else BaseEnv.CLEAN
self.base_env = base_env if base_env else BaseEnv.MANAGER

if isinstance(modules, str):
self.modules = modules.split(' ') # type: Optional[List[str]]
Expand Down

0 comments on commit a5cac58

Please sign in to comment.