From 6ef44b1b4ea19156d9b9a1899a305ef38cfe1f4e Mon Sep 17 00:00:00 2001 From: VasuJ <145879890+vjaganat90@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:06:41 -0500 Subject: [PATCH] fix fuzzy_compile to get current branch and setup test_fuzzzy (#311) Co-authored-by: Vasu Jaganath --- .github/workflows/fuzzy_compile_weekly.yml | 6 +++--- src/sophios/utils.py | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fuzzy_compile_weekly.yml b/.github/workflows/fuzzy_compile_weekly.yml index f6ae3c17..471a4b8c 100644 --- a/.github/workflows/fuzzy_compile_weekly.yml +++ b/.github/workflows/fuzzy_compile_weekly.yml @@ -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 @@ -56,7 +56,7 @@ 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 @@ -64,7 +64,7 @@ jobs: 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) diff --git a/src/sophios/utils.py b/src/sophios/utils.py index b9834a41..4e73c184 100644 --- a/src/sophios/utils.py +++ b/src/sophios/utils.py @@ -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 @@ -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]: