Skip to content

Commit

Permalink
Docstring for Graph.subset()
Browse files Browse the repository at this point in the history
  • Loading branch information
dansondergaard committed May 14, 2020
1 parent 97ff855 commit a633d4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gwf/core.py
Expand Up @@ -436,6 +436,11 @@ def dfs_inner(node):
return path

def subset(self, endpoints):
"""Subset a graph given an iterable of endpoints.
This will return a new, potentially disjoint graph with the given
endpoints and all of their dependencies.
"""
targets = set()
for target in endpoints:
for dep in self.dfs(target):
Expand Down

0 comments on commit a633d4c

Please sign in to comment.