Skip to content
Merged
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
10 changes: 9 additions & 1 deletion shared/vendored/.github/workflows/update-downstream-repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- main
workflow_dispatch:
inputs:
force:
description: 'Pass --force to git subrepo pull'
type: boolean
required: false
default: false

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -106,7 +112,7 @@ jobs:
git switch -c "$branch"
fi

git subrepo pull "$VENDORED_PATH"
git subrepo pull "$VENDORED_PATH" ${{ inputs.force && '--force' || '' }}

# Check for changes to determine if we need to create/update PRs
changes=$(git rev-list --count "$parent".."$branch")
Expand All @@ -124,6 +130,8 @@ jobs:
Subrepo changes may break workflows and require manual updates to
fix errors. It is safe to add manual updates directly to this PR
since they will not be overwritten by future automatic updates.

${{ inputs.force && 'Subrepo updates were made with the `--force` flag so it overwrites any local changes in the subrepo.' || '' }}
run: |
if [[ "$changes" == "1" ]]; then
git push origin HEAD
Expand Down
4 changes: 2 additions & 2 deletions shared/vendored/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/nextstrain/shared
branch = main
commit = 0fb80b17054fdd283d35a6c4c00e3cab810a5781
parent = 75428af330b0ec08ebcbe764fe53d9bf6e2b1f63
commit = 9b91ad2885963b5596ef80f78db12c1f1f7577b7
parent = 35f06c363137ee08a2ff2e184cd5cb433aedf6e4
method = merge
cmdver = 0.4.9
1 change: 1 addition & 0 deletions shared/vendored/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Snakemake workflow functions that are shared across many pathogen workflows that

- [config.smk](snakemake/config.smk) - Shared functions for handling workflow configs.
- [remote_files.smk](snakemake/remote_files.smk) - Exposes the `path_or_url` function which will use Snakemake's storage plugins to download/upload files to remote providers as needed.
- [dependencies.py](./snakemake/dependencies.py) - Helper functions for checking dependency versions.


## Software requirements
Expand Down
3 changes: 3 additions & 0 deletions shared/vendored/snakemake/config.smk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Shared functions to be used within a Snakemake workflow for handling
workflow configs.
"""
from dependencies import set_min_augur_version
set_min_augur_version("34.1.0")

import os
import sys
import yaml
Expand Down
10 changes: 10 additions & 0 deletions shared/vendored/snakemake/dependencies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from packaging import version
from augur.__version__ import __version__ as augur_version
import sys


def set_min_augur_version(min_augur_version: str):
if version.parse(augur_version) < version.parse(min_augur_version):
print("This pipeline needs a newer version of augur than you currently have...")
print(f"Current augur version: {augur_version}. Minimum required: {min_augur_version}")
sys.exit(1)