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

Add scripts to extract workflows from WorkflowHub and UseGalaxy servers #158

Merged
merged 14 commits into from
Oct 16, 2024
Merged
6 changes: 6 additions & 0 deletions .github/workflows/fetch_filter_resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ jobs:
- name: Generate wordcloud and interactive table
run: |
bash sources/bin/format_tools.sh
- name: Fetch all workflows
run: |
bash sources/bin/extract_all_workflows.sh
- name: Filter workflows for communities
run: |
bash sources/bin/get_community_workflows.sh
- name: Fetch all tutorials
run: |
bash sources/bin/extract_all_tutorials.sh
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ concurrency:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: '3.11'
- name: Install tox
run: python -m pip install 'tox>=1.8.0'
- name: Lint
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Run tests
on: [push, pull_request_target]
on: [push, pull_request]

jobs:
test-tools:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.11']
environment: fetch-tools
steps:
- name: Checkout main
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Tool extraction
Expand All @@ -26,12 +29,15 @@ jobs:
bash sources/bin/format_tools.sh
test-tutorials:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.11']
steps:
- name: Checkout main
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Tutorial extraction
Expand All @@ -41,4 +47,23 @@ jobs:
PLAUSIBLE_API_KEY: ${{ secrets.PLAUSIBLE_API_TOKEN }}
- name: Tutorial filtering
run: |
bash sources/bin/get_community_tutorials.sh test
bash sources/bin/get_community_tutorials.sh test
test-workflows:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.11']
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Workflow extraction
run: |
bash sources/bin/extract_all_workflows.sh test
- name: Workflow filtering
run: |
bash sources/bin/get_community_workflows.sh test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Galaxy Communities Dock aka Galaxy Codex is a catalog of Galaxy resources (tools
This repository stores the sources to build this catalog. The catalog is automatically updated every week.


Any Galaxy community can be added to this project and benefit from the dedicated resources, including interactive tables that can be embedded into subdomains and website via an iframe. **Learn [how to add your community](https://training.galaxyproject.org/training-material//topics/dev/tutorials/community-tool-table/tutorial.html) in the dedicated GTN toturial**.
Any Galaxy community can be added to this project and benefit from the dedicated resources, including interactive tables that can be embedded into subdomains and website via an iframe. **Learn [how to add your community](https://training.galaxyproject.org/training-material//topics/dev/tutorials/community-tool-table/tutorial.html) in the dedicated GTN tutorial**.
15 changes: 15 additions & 0 deletions communities/microgalaxy/metadata/workflow_tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name:microgalaxy
bacteria
bacterial-genomics
antimicrobial-resistance
metagenomics
virology
amr
microbiome
asaim
pathogfair
abromics
bacterial
microgalaxy
name:metatranscriptomics
name:amplicon
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ include = '\.pyi?$'
isort = true

[tool.ruff]
target-version = "py38"

[tool.ruff.lint]
# Enable: pycodestyle errors (E), Pyflakes (F), flake8-bugbear (B),
# flake8-logging-format (G) and pyupgrade (UP)
select = ["E", "F", "B", "G", "UP"]
target-version = "py38"
# Exceptions:
# B008 Do not perform function calls in argument defaults (for FastAPI Depends and Body)
# B9 flake8-bugbear opinionated warnings
Expand Down
14 changes: 14 additions & 0 deletions sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@ To make a test run of the tool to check its functionalities follow [Usage](#Usag
$ bash sources/bin/get_community_tutorials.sh test
```

### Workflows

1. Workflow extraction

```bash
$ bash bin/extract_all_workflows.sh test
```

2. Workflow filtering

```bash
$ bash bin/get_community_workflowss.sh test
```

# Galaxy Labs framework

## What is a Galaxy Lab?
Expand Down
13 changes: 13 additions & 0 deletions sources/bin/extract_all_workflows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

if [ ! -z $1 ]
then
python sources/bin/extract_galaxy_workflows.py extract \
--all communities/all/resources/workflows.json \
--tools communities/all/resources/tools.json \
--test
else
python sources/bin/extract_galaxy_workflows.py extract \
--all communities/all/resources/workflows.json \
--tools communities/all/resources/tools.json
fi
Loading
Loading