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 GHA to periodically update class subworkflows and open a PR #5

Open
wants to merge 8 commits into
base: poc-classes
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ indent_size = unset
# ignore python and markdown
[*.{py,md}]
indent_style = unset

[*.nf.test]
insert_final_newline = false
48 changes: 48 additions & 0 deletions .github/workflows/update-class-subworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update class subworkflows

on:
schedule:
- cron: "0 0 * * *" # Run every day at midnight
workflow_dispatch:

jobs:
update_modules:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.x"

- name: Install nf-core
run: pip install nf-core

- name: Update subworkflows
run: nf-core subworkflows --git-remote https://github.com/mirpedrol/class-modules.git update --all --no-preview --update-deps

- name: Check if there are changes
run: |
git diff --exit-code ${GITHUB_WORKSPACE} || echo "changed=YES" >> $GITHUB_ENV
echo "Files changed: ${{ env.changed }}"

# Commit the changes
- name: Commit changes
if: env.changed == 'YES'
run: |
git config user.email "[email protected]"
git config user.name "mirpedrol"
git add .
git status
git commit -m "[automated] Update class subworkflows"

# Open a new PR to dev with the changes
- name: Create PR
if: env.changed == 'YES'
run: |
git checkout -b automated-update-class-subworkflows
git push origin automated-update-class-subworkflows
gh pr create --title "Update class subworkflows" --body "This PR updates the class subworkflows form the mirpedrol/class-modules repo" --base poc-classes --head automated-update-class-subworkflows
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- [email protected]

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3"
rev: "3.0.3"
hooks:
- id: editorconfig-checker
alias: ec
9 changes: 8 additions & 1 deletion conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 2,
memory: '6.GB',
time: '6.h'
]
}
params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'
Expand All @@ -27,4 +33,5 @@ params {

// Input data for full size test
input = params.pipelines_testdata_base_path + 'multiplesequencealign/samplesheet/v1.0/samplesheet_full.csv'
alignment = 'clustalo/align'
}
14 changes: 8 additions & 6 deletions conf/test_parameters.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 2,
memory: '6.GB',
time: '6.h'
]
}
params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

skip_stats = true
skip_eval = true
skip_compression = false

// Input data
input = params.pipelines_testdata_base_path + 'multiplesequencealign/samplesheet/v1.0/samplesheet_test_af2.csv'
alignment = 'clustalo/align'
}
14 changes: 8 additions & 6 deletions conf/test_pdb.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 2,
memory: '6.GB',
time: '6.h'
]
}
params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

skip_stats = true
calc_irmsd = true
calc_sp = false
Expand All @@ -28,4 +29,5 @@ params {

// Input data
input = params.pipelines_testdata_base_path + 'multiplesequencealign/samplesheet/v1.0/samplesheet_test.csv'
alignment = 'clustalo/align'
}
36 changes: 18 additions & 18 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@
"mirpedrol": {
"clustalo/align": {
"branch": "main",
"git_sha": "1ecfdd11db17d75ba0499992d8d0a3222885645e",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_alignment"]
},
"clustalo/guidetree": {
"branch": "main",
"git_sha": "1ecfdd11db17d75ba0499992d8d0a3222885645e",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["modules", "msa_guidetree"]
},
"clustalo/treealign": {
"branch": "main",
"git_sha": "3987b7c6d9bcfc037c4976142b126c18558b0aed",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_treealign"]
},
"famsa/align": {
"branch": "main",
"git_sha": "1ecfdd11db17d75ba0499992d8d0a3222885645e",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_alignment"]
},
"famsa/guidetree": {
"branch": "main",
"git_sha": "1ecfdd11db17d75ba0499992d8d0a3222885645e",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_guidetree"]
},
"famsa/treealign": {
"branch": "main",
"git_sha": "3987b7c6d9bcfc037c4976142b126c18558b0aed",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_treealign"]
},
"kalign/align": {
"branch": "main",
"git_sha": "34e891b859086dd03e52e79abcf47b3863fcb3cb",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_alignment"]
},
"learnmsa/align": {
"branch": "main",
"git_sha": "caf37f3ee943a8101000b25ba502f038f8bfeb87",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_alignment"]
},
"mafft": {
Expand All @@ -52,17 +52,17 @@
},
"magus/align": {
"branch": "main",
"git_sha": "caf37f3ee943a8101000b25ba502f038f8bfeb87",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_alignment"]
},
"magus/guidetree": {
"branch": "main",
"git_sha": "519be3b194f5e2e271436398c1646c538867fe3e",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_guidetree"]
},
"magus/treealign": {
"branch": "main",
"git_sha": "3987b7c6d9bcfc037c4976142b126c18558b0aed",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_treealign"]
},
"muscle5/super5": {
Expand All @@ -72,12 +72,12 @@
},
"tcoffee/align": {
"branch": "main",
"git_sha": "1ecfdd11db17d75ba0499992d8d0a3222885645e",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_alignment"]
},
"tcoffee/treealign": {
"branch": "main",
"git_sha": "3987b7c6d9bcfc037c4976142b126c18558b0aed",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["msa_treealign"]
}
}
Expand All @@ -86,17 +86,17 @@
"mirpedrol": {
"msa_alignment": {
"branch": "main",
"git_sha": "927094f07130b8fa3ac0b8d1f46fd7d252809418",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["subworkflows"]
},
"msa_guidetree": {
"branch": "main",
"git_sha": "4748294a96583ecb2c3952e7f81aca426386cc0b",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["subworkflows"]
},
"msa_treealign": {
"branch": "main",
"git_sha": "0165b5b51bb1fe396a90c2db93c1f4e70b170816",
"git_sha": "c9e7bf0f32e3867e1b208b03ca69acb086ff97ca",
"installed_by": ["subworkflows"]
}
}
Expand Down Expand Up @@ -157,12 +157,12 @@
"nf-core": {
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "56372688d8979092cafbe0c5c3895b491166ca1c",
"git_sha": "c2b22d85f30a706a3073387f30380704fcae013b",
"installed_by": ["subworkflows"]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "1b6b9a3338d011367137808b49b923515080e3ba",
"git_sha": "d588e574e40a8aeba3636e2b766358091bfa3aa0",
"installed_by": ["subworkflows"]
},
"utils_nfschema_plugin": {
Expand Down
4 changes: 2 additions & 2 deletions modules/mirpedrol/clustalo/align/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
"""
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mirpedrol/clustalo/guidetree/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/yaml-schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/meta-schema.json
name: "clustalo_guidetree"
description: Renders a guidetree in clustalo
keywords:
Expand Down
7 changes: 3 additions & 4 deletions modules/mirpedrol/clustalo/guidetree/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
"""
}
}
Expand All @@ -29,5 +29,4 @@ nextflow_process {
)
}
}

}
}
8 changes: 4 additions & 4 deletions modules/mirpedrol/clustalo/treealign/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
"""
}
}
Expand All @@ -30,8 +30,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
input[1] = CLUSTALO_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test_summary'], tree]}
"""
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mirpedrol/famsa/align/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/yaml-schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/meta-schema.json
name: "famsa_align"
description: Aligns sequences using FAMSA
keywords:
Expand Down
4 changes: 2 additions & 2 deletions modules/mirpedrol/famsa/align/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
"""
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mirpedrol/famsa/guidetree/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/yaml-schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/meta-schema.json
name: "famsa_guidetree"
description: Renders a guidetree in famsa
keywords:
Expand Down
6 changes: 3 additions & 3 deletions modules/mirpedrol/famsa/guidetree/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
"""
}
}
Expand All @@ -29,4 +29,4 @@ nextflow_process {
)
}
}
}
}
2 changes: 1 addition & 1 deletion modules/mirpedrol/famsa/treealign/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/yaml-schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/modules/meta-schema.json
name: "famsa_treealign"
description: Aligns sequences using FAMSA
keywords:
Expand Down
8 changes: 4 additions & 4 deletions modules/mirpedrol/famsa/treealign/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
"""
}
}
Expand All @@ -30,8 +30,8 @@ nextflow_process {
process {
"""
input[0] = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true)
]
input[1] = FAMSA_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test_summary'], tree]}
"""
}
Expand Down
Loading
Loading