Skip to content

Commit

Permalink
fix fuzzy_compile to get current branch and setup test_fuzzzy (#311)
Browse files Browse the repository at this point in the history
Co-authored-by: Vasu Jaganath <vasu.jaganath@axleinfo.com>
  • Loading branch information
vjaganat90 and Vasu Jaganath authored Jan 8, 2025
1 parent 20f0865 commit 6ef44b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/fuzzy_compile_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/sophios
ref: master
ref: ${{ inputs.wic_ref }}
path: sophios

- name: Checkout biobb_adapters
Expand All @@ -56,15 +56,15 @@ jobs:
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/mm-workflows
ref: main
ref: ${{ inputs.mm-workflows_ref }}
path: mm-workflows

- name: Checkout image-workflows
if: always()
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/image-workflows
ref: main
ref: ${{ inputs.image-workflows_ref }}
path: image-workflows

- name: Setup miniforge (linux, macos)
Expand Down
10 changes: 7 additions & 3 deletions src/sophios/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ def get_steps_keys(steps: List[Yaml]) -> List[str]:
Returns:
List[str]: The name of each step in the given CWL workflow
"""
steps_keys = [step_dict['id'] for step_dict in steps]
# print(steps_keys)
steps_keys = []
for step_dict in steps:
if isinstance(step_dict, dict):
steps_keys.append(step_dict.get('id', ''))
else:
steps_keys.append('')
return steps_keys


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


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

0 comments on commit 6ef44b1

Please sign in to comment.