From de6a736b8723841e4eb0dc451b4ab6a61e118aa1 Mon Sep 17 00:00:00 2001 From: afloresep Date: Sat, 12 Sep 2026 16:09:31 +0200 Subject: [PATCH 1/3] Add Windows wheel build and manual Windows test job Publish workflow: build win_amd64 wheels with MSVC on windows-latest. The existing cibuildwheel smoke test (extension import plus a tree layout) runs on the Windows runner. A short SKBUILD_BUILD_DIR avoids MSVC MAX_PATH failures from OGDF's deep include paths. Tests workflow: add pytest-windows, a full from-source test run on windows-latest gated on workflow_dispatch and a weekly schedule, since compiling OGDF takes 20-30 minutes. It is not part of all-tests-pass. Claude-Session: https://claude.ai/code/session_01NA24G1jXYShzYSYEHRQZWJ --- .github/workflows/publish.yml | 9 +++++++- .github/workflows/tests.yml | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b9721d1..9fdef5f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,9 +38,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, macos-14, windows-latest] # ubuntu-latest = Linux x86_64 # macos-14 = macOS arm64 (Apple Silicon) + # windows-latest = Windows x86_64 (MSVC) steps: - uses: actions/checkout@v5 @@ -83,6 +84,12 @@ jobs: # macOS arm64 only on macos-14 runner CIBW_ARCHS_MACOS: "native" CIBW_ARCHS_LINUX: "x86_64" + CIBW_ARCHS_WINDOWS: "AMD64" + + # Windows: OGDF has deep include paths and MSVC still honours the + # 260-character MAX_PATH limit in places, so build in a short + # directory instead of cibuildwheel's temp dir. + CIBW_ENVIRONMENT_WINDOWS: 'SKBUILD_BUILD_DIR="C:/tb/{wheel_tag}"' - uses: actions/upload-artifact@v5 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2f653aa..d5268d7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,9 @@ on: branches: [main, master, visualization] pull_request: branches: [main, master] + workflow_dispatch: # manual trigger, also runs the Windows job + schedule: + - cron: "0 3 * * 1" # weekly, Monday 03:00 UTC; runs the Windows job # Cancel in-progress runs when a new push is made concurrency: @@ -78,6 +81,42 @@ jobs: - name: Run all tests run: python -m pytest -v + # Full tests with OGDF layout on Windows (MSVC). Building OGDF from source + # takes 20-30 minutes, so this runs only on manual trigger or on schedule, + # not on every push/PR. Not required for PRs to be mergeable. + pytest-windows: + if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + steps: + - name: Check out repository + uses: actions/checkout@v5 + with: + submodules: recursive + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Install tmap with bundled OGDF (MSVC) + env: + # Short build dir: OGDF include paths plus the default temp build + # dir can exceed MSVC's MAX_PATH limit. + SKBUILD_BUILD_DIR: C:/tb + run: | + python -m pip install --upgrade pip + python -m pip install ".[dev]" + + - name: Verify OGDF extension + run: python -c "from tmap.layout import OGDF_AVAILABLE; print('OGDF:', OGDF_AVAILABLE); assert OGDF_AVAILABLE" + + - name: Run all tests + run: python -m pytest -v + # This job is required to pass for PRs to be mergeable # It depends on all other jobs succeeding all-tests-pass: From c1475c90c0a25852f59a3269aead494721a88902 Mon Sep 17 00:00:00 2001 From: afloresep Date: Sat, 12 Sep 2026 19:42:45 +0200 Subject: [PATCH 2/3] Declare Windows x86_64 as a supported wheel platform Windows wheels build and pass the cibuildwheel smoke test on windows-latest, and the full test suite passes on Windows (554 passed, 34 skipped, matching Linux). Drop the WSL2 recommendation from the README and add the Windows classifier. Claude-Session: https://claude.ai/code/session_01NA24G1jXYShzYSYEHRQZWJ --- README.md | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67f5e28..37e5606 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The same path tracing and tree-distance colouring are available inside the inter pip install tmap2 ``` -Wheels are published for Linux x86_64 and macOS arm64 (Apple Silicon) on Python 3.11 to 3.13. Other platforms build the OGDF layout extension from source and need CMake and a C++17 compiler. Windows is not tested or supported; use [WSL2](https://learn.microsoft.com/windows/wsl/install), where the Linux wheel installs directly. +Wheels are published for Linux x86_64, macOS arm64 (Apple Silicon), and Windows x86_64 on Python 3.11 to 3.13. Other platforms build the OGDF layout extension from source and need CMake and a C++17 compiler. Optional extras: diff --git a/pyproject.toml b/pyproject.toml index e72b429..3e4e598 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", From 5844fd3cce0ffde314db1f05f0c32b292d6dbfd4 Mon Sep 17 00:00:00 2001 From: afloresep Date: Mon, 14 Sep 2026 14:38:30 +0200 Subject: [PATCH 3/3] Bump version to 0.3.1 Claude-Session: https://claude.ai/code/session_01NA24G1jXYShzYSYEHRQZWJ --- pyproject.toml | 2 +- src/tmap/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3e4e598..32b336a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "scikit_build_core.build" [project] name = "tmap2" -version = "0.3.0" +version = "0.3.1" description = "Tree-based visualization for high-dimensional data" readme = "README.md" license = {text = "MIT"} diff --git a/src/tmap/__init__.py b/src/tmap/__init__.py index d92c9c3..9050b37 100644 --- a/src/tmap/__init__.py +++ b/src/tmap/__init__.py @@ -50,7 +50,7 @@ def _extend_package_path_for_extensions() -> None: subset_anndata, ) -__version__ = "0.3.0" +__version__ = "0.3.1" __all__ = [ "__version__",