ztensor 1.2.3

Unified, zero-copy, and safe I/O for deep learning formats
Documentation
name: Check

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

jobs:
  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pip install black
      - name: Black
        run: black --check .
      - name: Rustfmt
        run: cargo fmt --check

  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pip install numpy h5py
      - name: Rust tests
        run: cargo test --features all-formats

  python-test:
    name: Python Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Setup venv
        run: |
          python -m venv .venv
          .venv/bin/pip install maturin numpy torch safetensors onnx h5py gguf ml-dtypes pytest
      - name: Build extension
        run: .venv/bin/maturin develop --release --features python
      - name: Run tests
        run: .venv/bin/pytest python/tests/ -v