Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐎 sets for faster searching #176

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/workflow_to_docker_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def parse_workflow(filepath: str, pathdict: dict | None = None) -> dict:
pathdict: Dict containing two lists. One of unique subworkflows; one of unique tools
"""
if not pathdict: pathdict = {}
if "workflows" not in pathdict: pathdict["workflows"] = []
if "tools" not in pathdict: pathdict["tools"] = []
if "workflows" not in pathdict: pathdict["workflows"] = set()
if "tools" not in pathdict: pathdict["tools"] = set()
inpath = pathlib.Path(filepath).resolve()
with open(inpath) as fh:
for line in fh:
Expand All @@ -38,10 +38,10 @@ def parse_workflow(filepath: str, pathdict: dict | None = None) -> dict:
respath = relpath.resolve()
if respath in pathdict["workflows"] or respath in pathdict["tools"]: continue
if not respath.match('*/tools/*'):
pathdict["workflows"].append(respath)
pathdict["workflows"].add(respath)
pathdict = parse_workflow(respath, pathdict)
else:
pathdict["tools"].append(respath)
pathdict["tools"].add(respath)
return pathdict

def get_docker(filepath: str) -> str:
Expand Down