Skip to content

Fill disease annotations for 794 human PXD datasets from PRIDE records. #695

Fill disease annotations for 794 human PXD datasets from PRIDE records.

Fill disease annotations for 794 human PXD datasets from PRIDE records. #695

Workflow file for this run

name: SDRF review gate
on:
pull_request:
paths:
- 'datasets/**/*.sdrf.tsv'
- 'datasets/**/*.sdrf'
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install sdrf-pipelines from GitHub (main)
run: |
set -euo pipefail
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade "git+https://github.com/bigbio/sdrf-pipelines.git@main"
python -m pip show sdrf-pipelines
- name: Collect changed SDRF files
id: changed
run: |
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.event.pull_request.head.sha }}"
# Three-dot diff: changes introduced by this PR relative to the merge-base,
# NOT every file that differs between the two branch tips. A two-dot diff
# ("$base" "$head") reports files changed on the base branch since the PR
# branched as if the PR changed them, re-reviewing the whole corpus.
git diff --name-only --diff-filter=AM "$base...$head" \
| grep -E 'datasets/.*\.sdrf(\.tsv)?$' > changed.txt || true
echo "count=$(wc -l < changed.txt)" >> "$GITHUB_OUTPUT"
echo "Changed SDRF files:"; cat changed.txt
- name: Snapshot base versions of changed files
if: steps.changed.outputs.count != '0'
run: |
base="${{ github.event.pull_request.base.sha }}"
mkdir -p .base
while IFS= read -r f; do
[ -n "$f" ] || continue
mkdir -p ".base/$(dirname "$f")"
# Missing on base => newly added file; leave absent so the gate checks it in full.
git show "$base:$f" > ".base/$f" 2>/dev/null || rm -f ".base/$f"
done < changed.txt
- name: Run SDRF review gate
if: steps.changed.outputs.count != '0'
run: |
xargs -a changed.txt python3 .github/scripts/sdrf_review.py --baseline .base