Skip to content

Commit

Permalink
REBASEME: address dr matt comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MattToast committed Jul 17, 2024
1 parent 9797442 commit f9684d5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions smartsim/_core/launcher/dragon/dragonConnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,22 @@ def _dragon_cleanup(


def _resolve_dragon_path(fallback: t.Union[str, "os.PathLike[str]"]) -> Path:
"""Return the path at which a user should set up a dragon server.
The order of path resolution is:
1) If the the user has set a global dragon path via
`Config.dragon_server_path` use that without alteration.
2) Use the `fallback` path which should be the path to an existing
directory. Append the default dragon server subdirectory defined by
`Config.dragon_default_subdir`
Currently this function will raise if a user attempts to specify multiple
dragon server paths via `:` seperation.
:param fallback: The path to an existing directory on the file system to
use if the global dragon directory is not set.
:returns: The path to directory in which the dragon server should run.
"""
config = get_config()
dragon_server_path = config.dragon_server_path or os.path.join(
fallback, config.dragon_default_subdir
Expand Down

0 comments on commit f9684d5

Please sign in to comment.