plotters-statistical 0.2.0

Statistical chart primitives (box, violin, ROC, PR, regularization-path, residual) as native plotters series
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"

jobs:
  build-test:
    name: fmt / clippy / test / doc / examples
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cache cargo registry and target
        uses: actions/cache@v4
        with:
          path: |

            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

      # plotters' default font backend needs fontconfig + a font present.
      - name: Install font dependencies
        run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev fonts-dejavu-core

      - name: Format check
        run: cargo fmt --all -- --check

      - name: Clippy (deny warnings)
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Test
        run: cargo test --all-features

      - name: Doc build
        run: cargo doc --no-deps --all-features

      # Cheap regression check: every example must render without panicking.
      # (Definition of done for Milestone 0.)
      - name: Run examples
        run: |

          for ex in box_plot violin_plot roc_curve precision_recall_curve regularization_path residual_plot dashboard ecdf qq_plot calibration_curve gain_chart heatmap correlation_heatmap missingness_heatmap pair_plot; do
            echo "::group::example $ex"
            cargo run --example "$ex"
            echo "::endgroup::"
          done

  msrv:
    name: MSRV (1.70)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@1.70.0
      - run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev fonts-dejavu-core
      - name: Build on MSRV
        run: cargo build --all-targets