Example #1
0
File: ssh.py Project: ErSKS/guildai
 def _init_guild_home(config):
     guild_home = config.get("guild-home")
     if guild_home is not None:
         return guild_home
     guild_env = config.get("guild-env")
     if guild_env is None:
         return ".guild"
     return util.strip_trailing_path(guild_env) + "/.guild"
Example #2
0
def _selected_source_paths(root, files, select):
    selected = set()
    patterns = [re.compile(s + "$") for s in select]
    for path in files:
        path = util.strip_trailing_path(path)
        for p in patterns:
            if p.match(path):
                selected.add(os.path.join(root, path))
    return list(selected)
Example #3
0
 def _link_to_source(self, source_path, source):
     source_path = util.strip_trailing_path(source_path)
     link = self._link_path(source_path, source)
     _symlink(source_path, link)