Skip to content

Commit 6ef44b1

Browse files
vjaganat90Vasu Jaganath
andauthored
fix fuzzy_compile to get current branch and setup test_fuzzzy (PolusAI#311)
Co-authored-by: Vasu Jaganath <[email protected]>
1 parent 20f0865 commit 6ef44b1

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/fuzzy_compile_weekly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/checkout@v3
4141
with:
4242
repository: ${{ github.repository_owner }}/sophios
43-
ref: master
43+
ref: ${{ inputs.wic_ref }}
4444
path: sophios
4545

4646
- name: Checkout biobb_adapters
@@ -56,15 +56,15 @@ jobs:
5656
uses: actions/checkout@v3
5757
with:
5858
repository: ${{ github.repository_owner }}/mm-workflows
59-
ref: main
59+
ref: ${{ inputs.mm-workflows_ref }}
6060
path: mm-workflows
6161

6262
- name: Checkout image-workflows
6363
if: always()
6464
uses: actions/checkout@v3
6565
with:
6666
repository: ${{ github.repository_owner }}/image-workflows
67-
ref: main
67+
ref: ${{ inputs.image-workflows_ref }}
6868
path: image-workflows
6969

7070
- name: Setup miniforge (linux, macos)

src/sophios/utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,12 @@ def get_steps_keys(steps: List[Yaml]) -> List[str]:
140140
Returns:
141141
List[str]: The name of each step in the given CWL workflow
142142
"""
143-
steps_keys = [step_dict['id'] for step_dict in steps]
144-
# print(steps_keys)
143+
steps_keys = []
144+
for step_dict in steps:
145+
if isinstance(step_dict, dict):
146+
steps_keys.append(step_dict.get('id', ''))
147+
else:
148+
steps_keys.append('')
145149
return steps_keys
146150

147151

@@ -155,7 +159,7 @@ def get_subkeys(steps_keys: List[str]) -> List[str]:
155159
Returns:
156160
List[str]: The list of step keys associated with subworkflows of the current workflow.
157161
"""
158-
return [key for key in steps_keys if key.endswith('.wic')]
162+
return [key for key in steps_keys if key and key.endswith('.wic')]
159163

160164

161165
def extract_implementation(yaml_tree: Yaml, wic: Yaml, yaml_path: Path) -> Tuple[str, Yaml]:

0 commit comments

Comments
 (0)