From f931a094bdc042805a87468b1197c7286a9e179c Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 15:56:18 +0100 Subject: [PATCH 01/15] chore: add GitHub pull request template --- .github/pull_request_template.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..16d18a6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +## Pull request (PR) description: +> Provide a brief description of the PR here. +> +> It does not need to list what each individual commit does, but rather provide a high-level overview of the PR. + +## Issues resolved: +> Any associated issues should be provided here using the format: 'Resolves #' (e.g. Resolves #1). If there are none, use 'n/a' instead. From 960eedd1f705e992b3bbcb44cd30537253290d13 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 18:51:56 +0100 Subject: [PATCH 02/15] chore: add script to create pull request CI report - Added .github/workflows/pr_ci_report.py to create a markdown file from results of Pull Request CI Report workflow to be used as auto-generated comment in repo. --- .github/workflows/pr_ci_report.py | 131 ++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 .github/workflows/pr_ci_report.py diff --git a/.github/workflows/pr_ci_report.py b/.github/workflows/pr_ci_report.py new file mode 100644 index 0000000..906ea30 --- /dev/null +++ b/.github/workflows/pr_ci_report.py @@ -0,0 +1,131 @@ +''' +pr_ci_report.py + +Helper script for Pull Request CI Report GitHub Actions workflow +Ingests JSON artifacts containing job results and produces a markdown document with the generated result comment +''' + +# Import external dependencies +import glob, json + +# Define constant icons for pass/partial pass/fail +ICON_PASS = '✅' +ICON_PARTIAL = '⚠️' +ICON_FAIL = '❌' + +# load: given a glob pattern, read all matching JSON files into items and return +def load(pattern): + items = [] + for f in glob.glob(pattern): + with open(f) as fh: + items.append(json.load(fh)) + return items + +# os_key: given an item, return the os_name and os_ver variables (for operating system name/version) +def os_key(item): + return (item.get('os_name', 'Unknown'), item.get('os_ver', 'unknown')) + +# summary_icon: given passed and total jobs, return a summary icon depending on proportion of passed jobs +def summary_icon(passed, total): + if total == 0: + return 'n/a' + if passed == total: + return ICON_PASS + if passed == 0: + return ICON_FAIL + return ICON_PARTIAL + +# load Python and R test results +py = load('results/python/*/result.json') +r = load('results/r/*/result.json') + +# extract all OS keys and sort in descending order +os_keys = sorted(set(os_key(i) for i in py) | set(os_key(i) for i in r), reverse=True) + +# extract all Python versions and sort in ascending order +python_versions = sorted(set(i['python_version'] for i in py), reverse=False) + +# extract all R versions and sort in ascending order +r_versions = sorted(set(i['r_version'] for i in r), reverse=False) + + +# build summary comment as list of lines +lines = [] +lines.append('# Pull Request CI Report') + +# add caution alert about Crux/TRFP tests to comment +lines.append('') +lines.append('> [!CAUTION]') +lines.append('> GitHub Actions runners do not have ThermoRawFileParser or Crux installed. Tests dependent on these binaries are skipped and should instead be run manually before merging.') + +# add summary to comment +lines.append('') +lines.append('
') +lines.append('') +lines.append('## Summary') +lines.append('') +lines.append('Operating System | Source distributions built? | CLI available? | Passed Python tests? | Passed R tests?') +lines.append('--|--|--|--|--') +for name, ver in os_keys: + py_cells = [i for i in py if os_key(i) == (name, ver)] + r_cells = [i for i in r if os_key(i) == (name, ver)] + build_ok = len(py_cells) > 0 and all(c['build'] == 'pass' for c in py_cells) + cli_ok = len(py_cells) > 0 and all(c['cli'] == 'pass' for c in py_cells) + py_passed = sum(1 for c in py_cells if c['tests'] == 'pass') + r_passed = sum(1 for c in r_cells if c['tests'] == 'pass') + build_icon = ICON_PASS if build_ok else ICON_FAIL + cli_icon = ICON_PASS if cli_ok else ICON_FAIL + lines.append(f'{name} ({ver}) | {build_icon} | {cli_icon} | {summary_icon(py_passed, len(py_cells))} | {summary_icon(r_passed, len(r_cells))}') + +# add Python test results to comment +lines.append('') +lines.append('
') +lines.append('') +lines.append('## Python Tests') +lines.append('') +lines.append(f'Python versions tested: {", ".join(python_versions) if python_versions else "none"}') +if python_versions: + lines.append('') + lines.append(' Operating System | ' + ' | '.join(f'Python {v}' for v in python_versions)) + lines.append('-- |' * (len(python_versions) + 1)) + for name, ver in os_keys: + row = [f'{name} ({ver})'] + for v in python_versions: + match = next( + (result for result in py if os_key(result) == (name, ver) and result['python_version'] == v), + None, + ) + row.append('n/a' if match is None else (ICON_PASS if match['tests'] == 'pass' else ICON_FAIL)) + lines.append(' | '.join(row)) + +# add R test results to comment +lines.append('') +lines.append('
') +lines.append('') +lines.append('## R Tests') +lines.append('') +lines.append(f'R versions tested: {", ".join(r_versions) if r_versions else "none"}') +if r_versions: + lines.append('') + lines.append(' Operating System | ' + ' | '.join(f'R {v}' for v in r_versions)) + lines.append('-- |' * (len(r_versions) + 1)) + for name, ver in os_keys: + row = [f'{name} ({ver})'] + for v in r_versions: + match = next( + (result for result in r if os_key(result) == (name, ver) and result['r_version'] == v), + None, + ) + row.append('n/a' if match is None else (ICON_PASS if match['tests'] == 'pass' else ICON_FAIL)) + lines.append(' | '.join(row)) + +# add footer to comment +lines.append('') +lines.append('
') +lines.append('') +lines.append('---') +lines.append('_Auto-generated by the comMS Pull Request CI Report workflow. See full logs in the Actions run for this PR._') + +# write comment to markdown file +with open('pr_ci_report.md', 'w') as f: + f.write('\n'.join(lines)) \ No newline at end of file From 32e42d0bbfcda7c387d4fb632b4b4a99e20ca9fa Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 18:54:33 +0100 Subject: [PATCH 03/15] chore: add workflow for pull request CI reports - Added .github/workflows/pr-ci-report.yml to define a workflow for running Python and R tests automatically for a pull request, commenting the results as a table. --- .github/workflows/pr-ci-report.yml | 203 +++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 .github/workflows/pr-ci-report.yml diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml new file mode 100644 index 0000000..0b40277 --- /dev/null +++ b/.github/workflows/pr-ci-report.yml @@ -0,0 +1,203 @@ +name: Pull Request CI Report + +on: + pull_request: + +permissions: + contents: read + pull-requests: write + +jobs: + python-tests: + name: Python ${{ matrix.python-version }} (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + if: github.event.pull_request.head.repo.full_name == github.repository + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + python-version: ["3.14", "3.15"] + steps: + - uses: actions/checkout@v7 + + - name: OS version (Linux) + if: runner.os == 'Linux' + shell: bash + run: | + . /etc/os-release + echo "OS_NAME=$NAME" >> "$GITHUB_ENV" + echo "OS_VER=$VERSION_ID" >> "$GITHUB_ENV" + + - name: OS version (macOS) + if: runner.os == 'macOS' + shell: bash + run: | + echo "OS_NAME=macOS" >> "$GITHUB_ENV" + echo "OS_VER=$(sw_vers -productVersion)" >> "$GITHUB_ENV" + + - name: Install uv + uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d + with: + python-version: ${{ matrix.python-version }} + + - name: Sync dependencies + run: uv sync --all-extras + + - name: Run pytest + id: pytest + continue-on-error: true + run: uv run pytest + + - name: Build package + id: build + continue-on-error: true + run: uv build + + - name: Add venv bin to PATH + shell: bash + run: echo "$PWD/.venv/bin" >> "$GITHUB_PATH" + + - name: Check CLI entry point + id: cli + continue-on-error: true + run: comms --help + + - name: Write result file + if: always() + shell: bash + run: | + mkdir -p result + cat > result/result.json <> "$GITHUB_ENV" + echo "OS_VER=$VERSION_ID" >> "$GITHUB_ENV" + echo "USE_BUNDLED_LIBUV=1" >> "$GITHUB_ENV" + + - name: OS version (macOS) + if: runner.os == 'macOS' + shell: bash + run: | + echo "OS_NAME=macOS" >> "$GITHUB_ENV" + echo "OS_VER=$(sw_vers -productVersion)" >> "$GITHUB_ENV" + + - name: Set up R + uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.r-version }} + use-public-rspm: true + + - name: Install R dependencies + run: Rscript src/comms/r/install_deps.R + + - name: Run R tests + id: rtests + continue-on-error: true + run: Rscript -e 'testthat::test_dir("tests/r")' + + - name: Write result file + if: always() + shell: bash + run: | + mkdir -p result + cat > result/result.json < Date: Wed, 12 Aug 2026 19:37:43 +0100 Subject: [PATCH 04/15] chore: add workflow for checking main PR version - Added .github/workflows/pr-version-check.yml to check that any pull requests raised on merged are increasing the version number. --- .github/workflows/pr-version-check.yml | 66 ++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/pr-version-check.yml diff --git a/.github/workflows/pr-version-check.yml b/.github/workflows/pr-version-check.yml new file mode 100644 index 0000000..57514af --- /dev/null +++ b/.github/workflows/pr-version-check.yml @@ -0,0 +1,66 @@ +name: Main Branch Pull Request Version Check + +on: + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + version-check: + name: Check version bump + runs-on: ubuntu-latest + steps: + - name: Checkout PR branch + uses: actions/checkout@v7 + + - name: Read PR version + id: pr_version + run: | + VERSION=$(grep -m1 '^version *= *' pyproject.toml | sed -E 's/version *= *"([^"]+)"/\1/') + if [ -z "$VERSION" ]; then + echo "Could not read version from pyproject.toml" >&2 + exit 1 + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Read main version + id: main_version + run: | + git fetch origin main --depth=1 + VERSION=$(git show origin/main:pyproject.toml | grep -m1 '^version *= *' | sed -E 's/version *= *"([^"]+)"/\1/') + if [ -z "$VERSION" ]; then + echo "Could not read version from main's pyproject.toml" >&2 + exit 1 + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Install uv + uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d + + - name: Compare versions + run: | + PR_VERSION="${{ steps.pr_version.outputs.version }}" + MAIN_VERSION="${{ steps.main_version.outputs.version }}" + echo "PR version: $PR_VERSION" + echo "main version: $MAIN_VERSION" + uv run --with packaging python3 - "$PR_VERSION" "$MAIN_VERSION" <<'EOF' + import sys + from packaging.version import Version, InvalidVersion + + pr_raw, main_raw = sys.argv[1], sys.argv[2] + + try: + pr = Version(pr_raw) + main = Version(main_raw) + except InvalidVersion as e: + print(f"Could not parse version as PEP 440: {e}", file=sys.stderr) + sys.exit(1) + + if pr <= main: + print(f'Version in pyproject.toml ({pr_raw}) is not greater than main ({main_raw}). Versions must strictly increase.'', file=sys.stderr) + sys.exit(1) + + print(f'OK: {pr_raw} > {main_raw}'') + EOF \ No newline at end of file From 09903e5c27768b032bc79c0110bd7022d8aa56e5 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 20:05:18 +0100 Subject: [PATCH 05/15] chore: add workflow for publishing releases - Added .github/workflows/publish-release.yml to build source distributions and publish release to GitHub on pushes to main. --- .github/workflows/publish-release.yml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..126d199 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,40 @@ +name: Create comMS Release + +on: + push: + branches: [main] + +permissions: + contents: write + +jobs: + release: + name: Build and publish release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Install uv + uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d + + - name: Read version + id: version + run: | + VERSION=$(grep -m1 '^version *= *' pyproject.toml | sed -E 's/version *= *"([^"]+)"/\1/') + if [ -z "$VERSION" ]; then + echo "Could not read version from pyproject.toml" >&2 + exit 1 + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Build package + run: uv build + + - name: Publish release + uses: softprops/action-gh-release@v3 + with: + tag_name: v${{ steps.version.outputs.version }} + name: v${{ steps.version.outputs.version }} + generate_release_notes: true + draft: false + files: dist/* \ No newline at end of file From 0cca5199d6a633d9cce81e0d026fd94bbfecf65e Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 20:28:28 +0100 Subject: [PATCH 06/15] fix: fix pull request CI report workflow bugs - Modified .github/workflows/pr-ci-report.yml to fix incorrect R dependency installation path, and to use opencv-python-headless during Python tests to ensure they run on Linux. --- .github/workflows/pr-ci-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 0b40277..0659ec5 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -46,7 +46,7 @@ jobs: - name: Run pytest id: pytest continue-on-error: true - run: uv run pytest + run: uv run --with opencv-python-headless pytest - name: Build package id: build @@ -124,7 +124,7 @@ jobs: use-public-rspm: true - name: Install R dependencies - run: Rscript src/comms/r/install_deps.R + run: Rscript src/comms/r/deps/install_deps.R - name: Run R tests id: rtests From 453e29442a3a59316d2c8a7a45707fe578c09e19 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 20:34:26 +0100 Subject: [PATCH 07/15] fix: fix pull request CI report workflow bugs - Modified .github/workflows/pr-ci-report.yml to fix missing testthat installation and to install the dependencies required by Qt on Linux. --- .github/workflows/pr-ci-report.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 0659ec5..aeb487c 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -35,6 +35,27 @@ jobs: echo "OS_NAME=macOS" >> "$GITHUB_ENV" echo "OS_VER=$(sw_vers -productVersion)" >> "$GITHUB_ENV" + - name: Install Linux Qt runtime dependencies + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y \ + libegl1 \ + libgl1 \ + libdbus-1-3 \ + libxkbcommon-x11-0 \ + libxcb-cursor0 \ + libxcb-icccm4 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-randr0 \ + libxcb-render-util0 \ + libxcb-shape0 \ + libxcb-xinerama0 \ + libxcb-xfixes0 \ + xvfb + - name: Install uv uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d with: @@ -46,7 +67,7 @@ jobs: - name: Run pytest id: pytest continue-on-error: true - run: uv run --with opencv-python-headless pytest + run: uv run pytest - name: Build package id: build @@ -124,7 +145,9 @@ jobs: use-public-rspm: true - name: Install R dependencies - run: Rscript src/comms/r/deps/install_deps.R + run: | + Rscript -e 'install.packages("testthat", repos = "https://cloud.r-project.org")' + Rscript src/comms/r/deps/install_deps.R - name: Run R tests id: rtests From 2757e00fc6e742b423a1ec6d9c53b11831ef625f Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 20:51:46 +0100 Subject: [PATCH 08/15] test: fix r import tests - Modified tests/r/test_utils_import.R to correct R import tests which were not using the correct filenames for spectral count results files, causing issues with column names being imported. --- tests/r/test_utils_import.R | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/r/test_utils_import.R b/tests/r/test_utils_import.R index ce81684..c52881a 100644 --- a/tests/r/test_utils_import.R +++ b/tests/r/test_utils_import.R @@ -25,11 +25,11 @@ make_cont_csv <- function(tmp_dir) { path <- file.path(tmp_dir, "cont.csv") write_csv(tibble(protein.id="CONT001", protein.annotation="Keratin", protein.reason="skin"), path); path } -make_sc_file <- function(tmp_dir, filename="s1.spectral-counts.target.txt") { +make_sc_file <- function(tmp_dir, filename="s1_dNSAF.spectral-counts.target.txt") { path <- file.path(tmp_dir, filename) write_tsv(tibble( - proteinId = c("Mtrun001", "Mtrun002", "CONT001"), - dNSAF = c(0.6, 0.4, 0.1) + "protein id" = c("Mtrun001", "Mtrun002", "CONT001"), + "dNSAF" = c(0.6, 0.4, 0.1) ), path) path } @@ -92,8 +92,8 @@ test_that("loadSpectralCounts retains dNSAF column", { test_that("mergeResults produces a wide tibble with one dNSAF column per sample", { ref <- loadRefInfo(make_ref_info(tmp)) cont <- loadContInfo(make_cont_csv(tmp)) - s1 <- make_sc_file(tmp, "s1.spectral-counts.target.txt") - s2 <- make_sc_file(tmp, "s2.spectral-counts.target.txt") + s1 <- make_sc_file(tmp, "s1_dNSAF.spectral-counts.target.txt") + s2 <- make_sc_file(tmp, "s2_dNSAF.spectral-counts.target.txt") result <- mergeResults(list( s1=loadSpectralCounts(s1, ref, cont), s2=loadSpectralCounts(s2, ref, cont) @@ -106,7 +106,7 @@ test_that("mergeResults preserves proteinId and proteinAnnotation columns", { ref <- loadRefInfo(make_ref_info(tmp)) cont <- loadContInfo(make_cont_csv(tmp)) result <- mergeResults(list( - s1=loadSpectralCounts(make_sc_file(tmp, "s1.spectral-counts.target.txt"), ref, cont) + s1=loadSpectralCounts(make_sc_file(tmp, "s1_dNSAF.spectral-counts.target.txt"), ref, cont) )) expect_true(all(c("proteinId", "proteinAnnotation") %in% colnames(result))) }) @@ -114,13 +114,13 @@ test_that("mergeResults preserves proteinId and proteinAnnotation columns", { test_that("mergeResults fills absent proteins with 0 rather than NA", { ref <- loadRefInfo(make_ref_info(tmp)) cont <- loadContInfo(make_cont_csv(tmp)) - s2_path <- file.path(tmp, "s2_partial.spectral-counts.target.txt") + s2_path <- file.path(tmp, "s2.partial_dNSAF.spectral-counts.target.txt") write_tsv(tibble( - proteinId = "Mtrun001", - dNSAF = 1.0 + `protein id` = "Mtrun001", + `dNSAF` = 1.0 ), s2_path) result <- mergeResults(list( - s1=loadSpectralCounts(make_sc_file(tmp, "s1.spectral-counts.target.txt"), ref, cont), + s1=loadSpectralCounts(make_sc_file(tmp, "s1_dNSAF.spectral-counts.target.txt"), ref, cont), s2=loadSpectralCounts(s2_path, ref, cont) )) mtrun002_s2 <- result[result$proteinId == "Mtrun002", "dNSAF_s2"][[1]] From 722388e8e3dd4cb3e5c3465f3dc0600280ce04e6 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 20:56:48 +0100 Subject: [PATCH 09/15] fix: fix pull request CI report workflow bug - Modified .github/workflows/pr-ci-report.yml to include checkout step for posting summary comment so the pr_ci_report.py script is accessible. --- .github/workflows/pr-ci-report.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index aeb487c..f97aaaa 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -214,6 +214,9 @@ jobs: pattern: r-result-* path: results/r + - name: Checkout branch for workflow script + uses: actions/checkout@v7 + - name: Build summary id: build shell: bash From 6952d0336505444c526daa5237845ae05df6797d Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Wed, 12 Aug 2026 21:27:05 +0100 Subject: [PATCH 10/15] fix: fix pull request CI report workflow bug - Modified .github/workflows/pr-ci-report.yml to download required Linux dependencies for R packages. --- .github/workflows/pr-ci-report.yml | 143 +++++++++++++++-------------- 1 file changed, 76 insertions(+), 67 deletions(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index f97aaaa..2870694 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -111,73 +111,82 @@ jobs: run: exit 1 r-tests: - name: R ${{ matrix.r-version }} (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - if: github.event.pull_request.head.repo.full_name == github.repository - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest] - r-version: ["4.3.0", "4.4.3", "4.5.3", "4.6.1"] - steps: - - uses: actions/checkout@v7 - - - name: OS version (Linux) - if: runner.os == 'Linux' - shell: bash - run: | - . /etc/os-release - echo "OS_NAME=$NAME" >> "$GITHUB_ENV" - echo "OS_VER=$VERSION_ID" >> "$GITHUB_ENV" - echo "USE_BUNDLED_LIBUV=1" >> "$GITHUB_ENV" - - - name: OS version (macOS) - if: runner.os == 'macOS' - shell: bash - run: | - echo "OS_NAME=macOS" >> "$GITHUB_ENV" - echo "OS_VER=$(sw_vers -productVersion)" >> "$GITHUB_ENV" - - - name: Set up R - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.r-version }} - use-public-rspm: true - - - name: Install R dependencies - run: | - Rscript -e 'install.packages("testthat", repos = "https://cloud.r-project.org")' - Rscript src/comms/r/deps/install_deps.R - - - name: Run R tests - id: rtests - continue-on-error: true - run: Rscript -e 'testthat::test_dir("tests/r")' - - - name: Write result file - if: always() - shell: bash - run: | - mkdir -p result - cat > result/result.json <> "$GITHUB_ENV" + echo "OS_VER=$VERSION_ID" >> "$GITHUB_ENV" + echo "USE_BUNDLED_LIBUV=1" >> "$GITHUB_ENV" + + - name: OS version (macOS) + if: runner.os == 'macOS' + shell: bash + run: | + echo "OS_NAME=macOS" >> "$GITHUB_ENV" + echo "OS_VER=$(sw_vers -productVersion)" >> "$GITHUB_ENV" + + - name: Install Linux runtime dependencies + if: runner.os == 'Linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y \ + libcurl4-openssl-dev \ + libfontconfig1-dev + + - name: Set up R + uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.r-version }} + use-public-rspm: true + + - name: Install R dependencies + run: | + Rscript -e 'install.packages("testthat", repos = "https://cloud.r-project.org")' + Rscript src/comms/r/deps/install_deps.R + + - name: Run R tests + id: rtests + continue-on-error: true + run: Rscript -e 'testthat::test_dir("tests/r")' + + - name: Write result file + if: always() + shell: bash + run: | + mkdir -p result + cat > result/result.json < Date: Wed, 12 Aug 2026 22:39:11 +0100 Subject: [PATCH 11/15] fix: fix pull request CI report workflow bug - Modified .github/workflows/pr-ci-report.yml to include additional Linux dependencies for running R scripts, and to add debug for report comment. --- .github/workflows/pr-ci-report.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 2870694..7c22028 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -145,7 +145,9 @@ jobs: sudo apt-get update sudo apt-get install -y \ libcurl4-openssl-dev \ - libfontconfig1-dev + libfontconfig1-dev \ + libfribidi-dev \ + libharfbuzz-dev - name: Set up R uses: r-lib/actions/setup-r@v2 @@ -226,6 +228,15 @@ jobs: - name: Checkout branch for workflow script uses: actions/checkout@v7 + - name: Debug artifact contents + shell: bash + run: | + echo "=== Python results ===" + cat results/python/*/result.json 2>/dev/null || echo "No Python results found" + echo "" + echo "=== R results ===" + cat results/r/*/result.json 2>/dev/null || echo "No R results found" + - name: Build summary id: build shell: bash From 34c8ab8aeca6ea3b9cff70ad57eabdb3b4023f10 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Thu, 13 Aug 2026 08:52:58 +0100 Subject: [PATCH 12/15] chore: add debug step to pull request CI report - Modified .github/workflows/pr-ci-report.yml to add debug step and remove R version 4.3.0 from matrix. --- .github/workflows/pr-ci-report.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 7c22028..64b9d89 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -118,7 +118,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - r-version: ["4.3.0", "4.4.3", "4.5.3", "4.6.1"] + r-version: ["4.4.3", "4.5.3", "4.6.1"] steps: - uses: actions/checkout@v7 @@ -228,6 +228,10 @@ jobs: - name: Checkout branch for workflow script uses: actions/checkout@v7 + - name: List all downloaded files + shell: bash + run: find results -type f 2>/dev/null | sort + - name: Debug artifact contents shell: bash run: | From 93f0e3472e0e8030b40dc0acb2b92f855e7ae8cf Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Thu, 13 Aug 2026 10:05:59 +0100 Subject: [PATCH 13/15] chore: update pull request CI report workflow - Modified .github/workflows/pr-ci-report.yml to add additional Linux dependencies. - Modified .github/workflows/pr_ci_report.py to fix glob pattern. - Modified README.md to update minimum R version required. --- .github/workflows/pr-ci-report.yml | 7 ++++++- .github/workflows/pr_ci_report.py | 4 ++-- README.md | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 64b9d89..3636826 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -146,8 +146,13 @@ jobs: sudo apt-get install -y \ libcurl4-openssl-dev \ libfontconfig1-dev \ + libfreetype6-dev \ libfribidi-dev \ - libharfbuzz-dev + libharfbuzz-dev \ + libjpeg-dev \ + libpng-dev \ + libtiff5-dev \ + libwebp-dev - name: Set up R uses: r-lib/actions/setup-r@v2 diff --git a/.github/workflows/pr_ci_report.py b/.github/workflows/pr_ci_report.py index 906ea30..2794014 100644 --- a/.github/workflows/pr_ci_report.py +++ b/.github/workflows/pr_ci_report.py @@ -36,8 +36,8 @@ def summary_icon(passed, total): return ICON_PARTIAL # load Python and R test results -py = load('results/python/*/result.json') -r = load('results/r/*/result.json') +py = load("results/python/**/result.json") +r = load("results/r/**/result.json") # extract all OS keys and sort in descending order os_keys = sorted(set(os_key(i) for i in py) | set(os_key(i) for i in r), reverse=True) diff --git a/README.md b/README.md index 484ee66..c251cf7 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Tool | Minimum version | Purpose | Platform notes [ThermoRawFileParser][trfp-url] | 1.4.5 | `.RAW` → `.mzML` conversion | Versions < 2.0.0 require [Mono](https://mono-project.com) on Linux/macOS ### `comms report` dependencies -The `report` command requires R (≥ 4.3.0) and a set of R packages (listed in the [report command documentation](./docs/commands.md#the-report-command)). Check or install the required R packages with: +The `report` command requires R (≥ 4.4.0) and a set of R packages (listed in the [report command documentation](./docs/commands.md#the-report-command)). Check or install the required R packages with: ```bash comms r-utils check comms r-utils install From 33dd59485648a7106962b77ffe41536280d25ef3 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Thu, 13 Aug 2026 10:51:15 +0100 Subject: [PATCH 14/15] debug: pull request CI report workflow debugging --- .github/workflows/pr-ci-report.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 3636826..6149159 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -235,16 +235,16 @@ jobs: - name: List all downloaded files shell: bash - run: find results -type f 2>/dev/null | sort + run: ls -a - name: Debug artifact contents shell: bash run: | echo "=== Python results ===" - cat results/python/*/result.json 2>/dev/null || echo "No Python results found" + cat results/python/**/result.json 2>/dev/null || echo "No Python results found" echo "" echo "=== R results ===" - cat results/r/*/result.json 2>/dev/null || echo "No R results found" + cat results/r/**/result.json 2>/dev/null || echo "No R results found" - name: Build summary id: build From a049044526a379e802830b55043ac3d5b9d88359 Mon Sep 17 00:00:00 2001 From: Sam Holland Date: Thu, 13 Aug 2026 11:20:22 +0100 Subject: [PATCH 15/15] fix: fix pull request CI report workflow bug - Modified .github/workflows/pr-ci-report.yml to update post comment job so checkout runs first, to stop deletion of downloaded artifacts as before. --- .github/workflows/pr-ci-report.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr-ci-report.yml b/.github/workflows/pr-ci-report.yml index 6149159..1ed6fe6 100644 --- a/.github/workflows/pr-ci-report.yml +++ b/.github/workflows/pr-ci-report.yml @@ -216,6 +216,9 @@ jobs: if: always() && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: + - name: Checkout branch for workflow script + uses: actions/checkout@v7 + - name: Download Python results uses: actions/download-artifact@v7 continue-on-error: true @@ -230,22 +233,10 @@ jobs: pattern: r-result-* path: results/r - - name: Checkout branch for workflow script - uses: actions/checkout@v7 - - name: List all downloaded files shell: bash run: ls -a - - name: Debug artifact contents - shell: bash - run: | - echo "=== Python results ===" - cat results/python/**/result.json 2>/dev/null || echo "No Python results found" - echo "" - echo "=== R results ===" - cat results/r/**/result.json 2>/dev/null || echo "No R results found" - - name: Build summary id: build shell: bash