From 600f1364c9a69c4554cbd6e1c73b41a2067f7f12 Mon Sep 17 00:00:00 2001 From: Luke Sargent Date: Thu, 13 Aug 2026 08:47:46 -0700 Subject: [PATCH 1/3] adding ci.yml job for container version check --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27bb46d..60acbc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,45 @@ on: pull_request: jobs: + check-version-bump: + name: Check mcdi version bump + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check if cli_tools/mcdi changed + id: changed + run: | + git fetch origin "${{ github.base_ref }}" --depth=1 + if git diff --name-only "origin/${{ github.base_ref }}...HEAD" -- cli_tools/mcdi | grep -q .; then + echo "mcdi_changed=true" >> "$GITHUB_OUTPUT" + else + echo "mcdi_changed=false" >> "$GITHUB_OUTPUT" + fi + + - name: Read version from package __init__.py + if: steps.changed.outputs.mcdi_changed == 'true' + id: version + run: | + VERSION=$(grep -m1 '^__version__' cli_tools/mcdi/mcdi/__init__.py | sed -E 's/__version__ = "(.*)"/\1/') + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + + - uses: docker/setup-buildx-action@v3 + if: steps.changed.outputs.mcdi_changed == 'true' + + - name: Fail if version tag already exists on Quay + if: steps.changed.outputs.mcdi_changed == 'true' + run: | + IMAGE_REF="quay.io/goeckslab/mcdi:${{ steps.version.outputs.version }}" + if docker buildx imagetools inspect "$IMAGE_REF" >/dev/null 2>&1; then + echo "cli_tools/mcdi changed but version ${{ steps.version.outputs.version }} is already published at $IMAGE_REF." >&2 + echo "Bump __version__ in mcdi/__init__.py before merging." >&2 + exit 1 + fi + pytest: name: Unit tests (mcdi) runs-on: ubuntu-latest From cdb6cf41e85f64a27184f9a15949a24ca9924083 Mon Sep 17 00:00:00 2001 From: Luke Sargent Date: Thu, 13 Aug 2026 09:58:35 -0700 Subject: [PATCH 2/3] adding ci check for tool <-> galaxy tool version mismatch --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ tools/manifest_gdc/macros.xml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60acbc5..9044f08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,28 @@ jobs: exit 1 fi + check-tool-version-match: + name: Check Galaxy tool versions match mcdi package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Verify @TOOL_VERSION@ tokens match mcdi package version + run: | + MCDI_VERSION=$(grep -m1 '^__version__' cli_tools/mcdi/mcdi/__init__.py | sed -E 's/__version__ = "(.*)"/\1/') + echo "mcdi package version: $MCDI_VERSION" + fail=0 + for f in tools/*/macros.xml; do + TOOL_VERSION=$(grep -oP '(?<=)[^<]+' "$f" || true) + [ -z "$TOOL_VERSION" ] && continue + echo "$f: @TOOL_VERSION@ = $TOOL_VERSION" + if [ "$TOOL_VERSION" != "$MCDI_VERSION" ]; then + echo "::error file=$f::@TOOL_VERSION@ ($TOOL_VERSION) does not match mcdi package version ($MCDI_VERSION)" + fail=1 + fi + done + exit $fail + pytest: name: Unit tests (mcdi) runs-on: ubuntu-latest diff --git a/tools/manifest_gdc/macros.xml b/tools/manifest_gdc/macros.xml index 82d0627..9bdbc5e 100644 --- a/tools/manifest_gdc/macros.xml +++ b/tools/manifest_gdc/macros.xml @@ -1,5 +1,5 @@ - 0.4.0 + 0.5.0 0 22.05 From ade745ea8324717c344d5eb77163afac16a692ca Mon Sep 17 00:00:00 2001 From: Luke Sargent Date: Thu, 13 Aug 2026 10:07:01 -0700 Subject: [PATCH 3/3] performing version bump i should have done in the last PR ;( --- cli_tools/mcdi/mcdi/__init__.py | 2 +- tools/manifest_downloader/macros.xml | 2 +- tools/manifest_gdc/macros.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli_tools/mcdi/mcdi/__init__.py b/cli_tools/mcdi/mcdi/__init__.py index 24c15fa..3aaafce 100644 --- a/cli_tools/mcdi/mcdi/__init__.py +++ b/cli_tools/mcdi/mcdi/__init__.py @@ -6,7 +6,7 @@ import os -__version__ = "0.5.0" +__version__ = "0.6.0" # Container image build id (e.g. git SHA); empty for local/editable installs. BUILD = os.environ.get("MCDI_BUILD", "").strip() diff --git a/tools/manifest_downloader/macros.xml b/tools/manifest_downloader/macros.xml index 929f619..a262654 100644 --- a/tools/manifest_downloader/macros.xml +++ b/tools/manifest_downloader/macros.xml @@ -1,5 +1,5 @@ - 0.5.0 + 0.6.0 0 25.1 diff --git a/tools/manifest_gdc/macros.xml b/tools/manifest_gdc/macros.xml index 9bdbc5e..01e9c2a 100644 --- a/tools/manifest_gdc/macros.xml +++ b/tools/manifest_gdc/macros.xml @@ -1,5 +1,5 @@ - 0.5.0 + 0.6.0 0 22.05