From 1718c2c51cffcdc53a4ee584cf2c5accd7584d2d Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:08:34 +0200 Subject: [PATCH 01/15] Create python-build-package.yml --- .github/workflows/python-build-package.yml | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/python-build-package.yml diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml new file mode 100644 index 0000000..5ebbef0 --- /dev/null +++ b/.github/workflows/python-build-package.yml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + python -m pip install . --no-cache-dir + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics From acd729c52961bd1e444a9bb3fdfc96974a2b0543 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:09:55 +0200 Subject: [PATCH 02/15] Update python-build-package.yml --- .github/workflows/python-build-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 5ebbef0..9d0802f 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Python package +name: Test Python Build on: push: From 95fdb5fa41fd7672ee63089c0273ce7fb9afffda Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:12:18 +0200 Subject: [PATCH 03/15] Update python-build-package.yml --- .github/workflows/python-build-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 9d0802f..1931159 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -19,9 +19,9 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From c2ff5b9e472e3bfe8e9bcc14faeffd5fc94c874b Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:28:03 +0200 Subject: [PATCH 04/15] Update python-build-package.yml --- .github/workflows/python-build-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 1931159..5decdf4 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Test Python Build +name: Test Python Build - Linux and macOS on: push: @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 From 49c33293c315d99acce807aaddab93d8ba95a92d Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:45:29 +0200 Subject: [PATCH 05/15] Update docker-publis.yml Lint .yml Update actions/checkout to v6 Update docker/setup-qemu-action to v4 This change is to preserve the githubactions up to date using Node24 as default. --- .github/workflows/docker-publish.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d261165..e578798 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -7,10 +7,10 @@ name: Docker on: pull_request: - branches: [ "main" ] - + branches: ["main"] + release: - types: [ published ] + types: [published] env: # Use docker.io for Docker Hub if empty @@ -18,10 +18,8 @@ env: # github.repository as / IMAGE_NAME: ${{ github.repository }} - jobs: build: - runs-on: ubuntu-latest permissions: contents: read @@ -32,12 +30,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Enable QEMU for cross-platform builds # https://github.com/docker/setup-qemu-action - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer @@ -45,7 +43,7 @@ jobs: if: github.event_name != 'pull_request' uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0 with: - cosign-release: 'v2.2.4' + cosign-release: "v2.2.4" # Set up BuildKit Docker container builder to be able to build # multi-platform images and export cache From 86d7b049d799021c902dce1a376ad10f20bdc6a6 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:47:48 +0200 Subject: [PATCH 06/15] Update python-build=package.yml Add windows to the list of platforms to test. --- .github/workflows/python-build-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 5decdf4..2fe4dc5 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.11", "3.12", "3.13", "3.14"] steps: From ec17d7693bffc0ed0d9856ebef9902e356168480 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:49:32 +0200 Subject: [PATCH 07/15] Update python-build=package.yml Add windows to the list of platforms to test. Bumps up actions/setup-python to v6 Bumps up actions/checkout to v6 V6 uses Node24 --- .github/workflows/python-build-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 2fe4dc5..cb5d7c6 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Test Python Build - Linux and macOS +name: Test Python Build on: push: From 14798ac33ccc5bc4ee971c7548973627b8bbfc08 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:51:00 +0200 Subject: [PATCH 08/15] Update python-publish.yml It uses now checkout v6 and setup-python v6 to keep running github actions. --- .github/workflows/python-publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3b0cb0e..4c12bcf 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -20,9 +20,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: "3.x" From aa7e81f65e5efcb01c30fb2a90bfeb55c858dfc6 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:53:31 +0200 Subject: [PATCH 09/15] Python-build-package now mimics docker-publish execution policy. --- .github/workflows/docker-publish.yml | 1 - .github/workflows/python-build-package.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e578798..bf7dca0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -8,7 +8,6 @@ name: Docker on: pull_request: branches: ["main"] - release: types: [published] diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index cb5d7c6..705b004 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -7,7 +7,7 @@ on: push: branches: ["main"] pull_request: - branches: ["main"] + branches: ["published"] jobs: build: From 1fb0d1ccbabf521e5bf3a129ecab2d80791e9732 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 15:55:05 +0200 Subject: [PATCH 10/15] Update python-build-package.yml --- .github/workflows/python-build-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 705b004..bdda51b 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -4,10 +4,10 @@ name: Test Python Build on: - push: - branches: ["main"] pull_request: - branches: ["published"] + branches: ["main"] + release: + types: [published] jobs: build: From 38d614605458b213efb16f6cc541c7697911cb18 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 16:18:39 +0200 Subject: [PATCH 11/15] Update Readme add squares and include Python version requirments --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ff089d4..7bf93f3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # Backsub - pixel-by-pixel channel subtraction tool for multiplexed immunofluorescence data +[![PyPI](https://img.shields.io/pypi/v/backsub?style=flat-square)](https://pypi.org/project/backsub/) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/backsub?style=flat-square)](https://pypi.org/project/backsub/) +[![PyPI - License](https://img.shields.io/pypi/l/backsub?style=flat-square)](https://pypi.org/project/backsub/) +[![PyPI - Downloads](https://img.shields.io/pypi/dm/backsub?style=flat-square)](https://pypi.org/project/backsub/) Backsub performs pixel-by-pixel background subtraction between marker and background channels scaled by their respective exposure times. The outputs are saved as pyramidal OME-TIFF files. It was originally developed for data produced by the Lunaphore COMET platform and is fully compatible with the [MCMICRO](https://mcmicro.org) pipeline. From 6de77303744258ffc811c078947fe2463dcf8a47 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 16:18:52 +0200 Subject: [PATCH 12/15] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bf93f3..95eb066 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ Marker_corrected = Marker_raw − Background × (Exposure_Marker / Exposure_Back ## Installation -Backsub can be installed directly from PyPI, or run in a preconfigured Docker container. For development or container builds, a fixed-version Conda environment is provided. +Backsub can be installed directly from PyPI, or run in a preconfigured Docker container. For development or container builds, a fixed-version Conda environment is provided. +Backsub requires Python >=3.11 ### Option 1: Install from PyPI From d5e3dcd055e933d96fd23e89d4cdb735c138593e Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Tue, 5 May 2026 16:20:18 +0200 Subject: [PATCH 13/15] Update pyproject.toml bumping up python version requirements --- pyproject.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1d17be8..a560310 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,15 +3,21 @@ name = "backsub" dynamic = ["version"] description = "Channel subtraction scaled by exposure times" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.11" license = { file = "LICENSE" } authors = [ { name="Krešimir Bestak", email="kbestak@gmail.com" } ] keywords = ["autofluorescence", "imaging", "immunofluorescence", "subtraction"] classifiers = [ + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Operating System :: Linux", + "Operating System :: MacOS", + "Operating System :: Windows", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License" ] dependencies = [ From 37202791abdf04d8f4a0df023550da40ae9b2c05 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Wed, 6 May 2026 15:50:09 +0200 Subject: [PATCH 14/15] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a560310..935f27f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", - "Operating System :: Linux", + "Operating System :: POSIX :: Linux", "Operating System :: MacOS", "Operating System :: Windows", "Intended Audience :: Science/Research", From 43bb0d475d463b66b876001eebec815db366f9e7 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Wed, 6 May 2026 15:51:32 +0200 Subject: [PATCH 15/15] Update Windows OS classification in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 935f27f..623b77d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", "Operating System :: POSIX :: Linux", "Operating System :: MacOS", - "Operating System :: Windows", + "Operating System :: Microsoft :: Windows", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License" ]