Skip to content

Commit

Permalink
Merge pull request #74 from simleo/wf_specific_ci
Browse files Browse the repository at this point in the history
Workflow-specific CI workflows
  • Loading branch information
simleo authored Dec 20, 2021
2 parents 8455256 + 806de2d commit 970e809
Show file tree
Hide file tree
Showing 26 changed files with 105 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.1] 2021-12-06

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "Fragment-based virtual screening using rDock for docking and SuCOS for pose scoring",
"release": "0.1.1",
"release": "0.1.2",
"steps": {
"0": {
"annotation": "Number of docking poses to generate per input compound",
Expand Down
5 changes: 5 additions & 0 deletions workflows/computational-chemistry/gromacs-dctmd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.1] 2021-12-06

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "dcTMD calculations with GROMACS",
"release": "0.1.1",
"release": "0.1.2",
"steps": {
"0": {
"annotation": "List of atom indices (separated with spaces) which make up the protein pull group",
Expand Down
5 changes: 5 additions & 0 deletions workflows/computational-chemistry/gromacs-mmgbsa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.1] 2021-12-06

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "MMGBSA calculations with GROMACS",
"release": "0.1.1",
"release": "0.1.2",
"steps": {
"0": {
"annotation": "Size of the MMGBSA ensemble",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.1] 2021-12-06

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "Create GRO and TOP complex files",
"release": "0.1.1",
"release": "0.1.2",
"steps": {
"0": {
"annotation": "pH for protonating the ligand. Set to -1.0 to skip.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.1] 2021-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"format-version": "0.1",
"license": "MIT",
"release": "0.1.1",
"release": "0.1.2",
"name": "Parallel Accession Download",
"steps": {
"0": {
Expand Down
18 changes: 9 additions & 9 deletions workflows/gen_crates.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
except ImportError:
from yaml import Loader

OWNER = "galaxyproject"
REPO = "iwc"
THIS_DIR = Path(__file__).absolute().parent

GH_WORKFLOW = "workflow_test.yml"
TARGET_OWNER = "iwc-workflows"
GH_API_URL = "https://api.github.com"
Expand All @@ -75,6 +75,7 @@
DOCKSTORE_CFG_VERSION = "1.2"
LM_URL = "https://api.lifemonitor.eu"
LM_API_KEY = os.getenv("LM_API_KEY")
CI_WORKFLOW = THIS_DIR / "wftest.yml"


class HubClient:
Expand Down Expand Up @@ -229,7 +230,7 @@ def get_workflow_name(repo_dir):
return f"{repo_dir.name}/{wf_entry['name']}"


def make_crate(crate_dir, target_owner, resource, planemo_version):
def make_crate(crate_dir, target_owner, planemo_version):
wf_id = get_wf_id(crate_dir)
planemo_id, planemo_source = get_planemo_id(crate_dir, wf_id)
crate = ROCrate(gen_preview=False)
Expand All @@ -254,6 +255,7 @@ def make_crate(crate_dir, target_owner, resource, planemo_version):
if readme_source.is_file():
crate.add_file(readme_source, "README.md")
suite = crate.add_test_suite(identifier="#test1")
resource = f"repos/{target_owner}/{crate_dir.name}/actions/workflows/{CI_WORKFLOW.name}"
crate.add_test_instance(suite, GH_API_URL, resource=resource,
service="github", identifier="test1_1")
crate.add_test_definition(suite, source=planemo_source,
Expand Down Expand Up @@ -343,13 +345,15 @@ def main(args):
args.hub_url = args.hub_url.rstrip("/")
if args.upload_to_hub or args.upload_to_lm:
client = HubClient(base_url=args.hub_url)
resource = f"repos/{args.owner}/{args.repo}/actions/workflows/{args.workflow}"
for repo in find_repos(args.root, exclude=args.exclude):
print(f"processing {repo}")
if args.no_overwrite and (repo / "ro-crate-metadata.json").is_file():
print(" crate exists, not overwriting")
else:
make_crate(repo, args.target_owner, resource, args.planemo_version)
target_ci_workflow = repo / ".github" / "workflows" / CI_WORKFLOW.name
target_ci_workflow.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(CI_WORKFLOW, target_ci_workflow)
make_crate(repo, args.target_owner, args.planemo_version)
if args.zip_dir:
# if args.no_overwrite, zip existing crates
path = zip_dir / f"{repo.name}.crate"
Expand Down Expand Up @@ -390,10 +394,6 @@ def main(args):
nargs="*", default=[os.getcwd()])
parser.add_argument("--exclude", metavar="PATH", nargs="*", default=(),
help="paths to exclude while searching for workflow repos")
parser.add_argument("--owner", metavar="STRING", default=OWNER,
help="owner of the github workflow that runs the tests")
parser.add_argument("--repo", metavar="STRING", default=REPO,
help="repository that contains the github workflow")
parser.add_argument("--workflow", metavar="STRING", default=GH_WORKFLOW,
help="github workflow file name (basename)")
parser.add_argument("--target-owner", metavar="STRING", default=TARGET_OWNER,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.2.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.2.1] 2021-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "COVID-19: consensus construction",
"release": "0.2.1",
"release": "0.2.2",
"steps": {
"0": {
"annotation": "Collection of VCFs produced by upstream workflows for variation analysis",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.3.1] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.3] 2021-09-22

### Changed
Expand All @@ -24,12 +29,10 @@ statistics are calculated:

* the tool can now emit variant calls at complex sites with > 1 lengths of
both the REF and the ALT allele, which were previously dropped

* the workflow became more complex; to account for shortcomings of medaka
tools annotate, the variant call statistics of regular variants and of
primer binding site variants have to be determined in separate runs of the
tool

* All key INFO fields (DP, DP4, AF) will change slightly in this version of
the workflow

Expand All @@ -38,7 +41,6 @@ which have been introduced into version 0.3 of the PE Illumina worflow for
amplicon data before:

- Update ivar trim to version 1.3.1

- Run ivar trim as the last mapped reads processing step before variant
calling, i.e., after left-alignment of indels

Expand All @@ -47,7 +49,6 @@ and:
- Rename the output of the ivar trim step to "Fully processed reads for
variant calling (primer-trimmed, realigned reads)" like the corresponding
output of the PE Illumina workflow

- Fix a typo in the allowed input formats for the collection of sequenced
reads, which caused fastqsanger.gz data to undergo an implicit and
unnecessary decompression step.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "COVID-19: variation analysis of ARTIC ONT data",
"release": "0.3",
"release": "0.3.1",
"steps": {
"0": {
"annotation": "ONT reads from ARTIC assay with fastqsanger encoding",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.2.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.2.1] 2021-11-04

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Peter van Heusden"
}
],
"release": "0.2.1",
"release": "0.2.2",
"format-version": "0.1",
"license": "MIT",
"name": "SARS-CoV-2 Illumina Amplicon pipeline - iVar based",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.4.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.4.1] 2021-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "COVID-19: variation analysis on ARTIC PE data",
"release": "0.4.1",
"release": "0.4.2",
"steps": {
"0": {
"annotation": "Illumina reads from ARTIC assay with fastqsanger encoding",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.2.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.2.1] 2021-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "COVID-19: variation analysis on WGS PE data",
"release": "0.2.1",
"release": "0.2.2",
"steps": {
"0": {
"annotation": "Illumina reads with fastqsanger encoding",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.3] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.2] 2021-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "COVID-19: variation analysis on WGS SE data",
"release": "0.1.2",
"release": "0.1.3",
"steps": {
"0": {
"annotation": "Illumina reads with fastqsanger encoding",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.1.2] 2021-12-13

### Added
- Added GitHub Actions workflow. No functional changes.

## [0.1.1] 2021-07-23

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-version": "0.1",
"license": "MIT",
"name": "COVID-19: variation analysis reporting",
"release": "0.1.1",
"release": "0.1.2",
"steps": {
"0": {
"annotation": "Allele Frequency Filter. This is the minimum allele frequency required for variants to be included in the report.",
Expand Down
24 changes: 24 additions & 0 deletions workflows/wftest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Periodic workflow test
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
setup:
name: Setup cache
uses: galaxyproject/iwc/.github/workflows/setup.yml@main
with:
python-version-list: "[\"3.7\"]"
galaxy-fork: galaxyproject
galaxy-branch: master
test:
name: Test workflow
needs: setup
uses: galaxyproject/iwc/.github/workflows/test_workflows.yml@main
with:
galaxy-head-sha: ${{ needs.setup.outputs.galaxy-head-sha }}
python-version-list: "[\"3.7\"]"
galaxy-fork: galaxyproject
galaxy-branch: master
repository-list: '.'
check-outputs: true

0 comments on commit 970e809

Please sign in to comment.