tskit 0.15.0

rust interface to tskit
Documentation
on:
  push:
    branches: [main, dev]
  pull_request:

name: Python data round trips

jobs:
  test-metadata:
    name: Test Python metadata round trips
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-24.04]
        rust:
          - stable
        python: [ "3.13d" ]
    steps:
      - name: Cancel Previous Runs
        uses: styfle/cancel-workflow-action@0.12.1
        with:
          access_token: ${{ secrets.GITHUB_TOKEN }}

      - uses: actions/checkout@v6.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          submodules: recursive
      - uses: dtolnay/rust-toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
      - uses: Swatinem/rust-cache@v2.8.2
      - name: Install the latest version of uv
        uses: astral-sh/setup-uv@v6
        with:
          activate-environment: true
          version: "latest"
          python-version: ${{ matrix.python }}
      - name: run JSON metadata example
        run: |
          cargo run --example json_metadata --features derive
      - name: run bincode metadata example
        run: |
          cargo run --example bincode_metadata --features derive
      - name: setup Python and run tests
        run: |
          uv pip install -r python/requirements_locked_3_13.txt
          uv pip install python/tskit_glue
          LD_LIBRARY_PATH=$(dirname "$(realpath "$(uv python find)")")/../lib uv run python -m pytest python
      - name: Confirm linkage to python-debug
        run: |
          cargo build --manifest-path python/tskit_glue/Cargo.toml
          LD_LIBRARY_PATH=$(dirname "$(realpath "$(uv python find)")")/../lib uv run ldd python/tskit_glue/target/debug/libtskit_glue.so
      - name: Test zerocopy
        run: |
          LD_LIBRARY_PATH=$(dirname "$(realpath "$(uv python find)")")/../lib uv run cargo test --manifest-path python/zerocopy/Cargo.toml