diff --git a/.github/workflows/fetch_all_tools.yaml b/.github/workflows/fetch_all_tools.yaml index d48cb3f8..b06571d7 100644 --- a/.github/workflows/fetch_all_tools.yaml +++ b/.github/workflows/fetch_all_tools.yaml @@ -20,8 +20,18 @@ jobs: runs-on: ubuntu-20.04 name: Fetch list of all available servers steps: - - uses: actions/checkout@v4 + - name: Checkout main + uses: actions/checkout@v4 + with: + ref: main #pull latest code produced by job 1, not the revision that started the workflow (https://github.com/actions/checkout/issues/439) + - name: Checkout results + uses: actions/checkout@v4 + with: + ref: results + path: results - uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Install requirement run: python -m pip install -r requirements.txt - name: Run script @@ -42,14 +52,22 @@ jobs: name: Fetch all tool stepwise strategy: matrix: - python-version: [3.8] + python-version: [3.11] subset: - repositories01.list - repositories02.list - repositories03.list - repositories04.list steps: - - uses: actions/checkout@v4 + - name: Checkout main + uses: actions/checkout@v4 + with: + ref: main #pull latest code produced by job 1, not the revision that started the workflow (https://github.com/actions/checkout/issues/439) + - name: Checkout results + uses: actions/checkout@v4 + with: + ref: results + path: results - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -84,6 +102,8 @@ jobs: ref: results path: results - uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Install requirement run: | python -m pip install -r requirements.txt diff --git a/.github/workflows/fetch_all_tutorials.yaml b/.github/workflows/fetch_all_tutorials.yaml index c6e7561a..922a9d9b 100644 --- a/.github/workflows/fetch_all_tutorials.yaml +++ b/.github/workflows/fetch_all_tutorials.yaml @@ -21,7 +21,15 @@ jobs: environment: fetch-tutorials name: Fetch all tutorials steps: - - uses: actions/checkout@v4 + - name: Checkout main + uses: actions/checkout@v4 + with: + ref: main #pull latest code produced by job 1, not the revision that started the workflow (https://github.com/actions/checkout/issues/439) + - name: Checkout results + uses: actions/checkout@v4 + with: + ref: results + path: results - uses: actions/setup-python@v5 with: python-version: '3.11' diff --git a/.github/workflows/filter_communities.yaml b/.github/workflows/filter_communities.yaml index d7df657b..0a58f26a 100644 --- a/.github/workflows/filter_communities.yaml +++ b/.github/workflows/filter_communities.yaml @@ -39,7 +39,7 @@ jobs: path: results - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Install requirement run: python -m pip install -r requirements.txt - name: Run script @@ -66,10 +66,10 @@ jobs: uses: actions/checkout@v4 with: ref: results - sparse-checkout: results + path: results - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Install requirement run: python -m pip install -r requirements.txt - name: Run script @@ -96,10 +96,10 @@ jobs: uses: actions/checkout@v4 with: ref: results - sparse-checkout: results + path: results - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Install requirement run: python -m pip install -r requirements.txt - name: Run script diff --git a/bin/extract_galaxy_tools.py b/bin/extract_galaxy_tools.py index 6b1256f5..a7c2c408 100644 --- a/bin/extract_galaxy_tools.py +++ b/bin/extract_galaxy_tools.py @@ -761,9 +761,16 @@ def get_tools(repo_list: list, edam_ontology: dict) -> List[Dict]: # filter tool lists ts_filtered_tools, filtered_tools = filter_tools(tools, categories, status) - export_tools_to_tsv(ts_filtered_tools, args.ts_filtered, format_list_col=True) - # if there are no filtered tools return the ts filtered tools - if filtered_tools: - export_tools_to_tsv(filtered_tools, args.filtered, format_list_col=True) + + if ts_filtered_tools: + + export_tools_to_tsv(ts_filtered_tools, args.ts_filtered, format_list_col=True) + # if there are no filtered tools return the ts filtered tools + if filtered_tools: + export_tools_to_tsv(filtered_tools, args.filtered, format_list_col=True) + else: + export_tools_to_tsv(ts_filtered_tools, args.filtered, format_list_col=True) + else: - export_tools_to_tsv(ts_filtered_tools, args.filtered, format_list_col=True) + # if there are no ts filtered tools + print(f"No tools found for category {args.filtered}")