renkin 0.15.5

Ultra-fast retrosynthesis engine for computer-aided synthesis planning (CASP) — pure Rust, WASM-ready, Python bindings via PyO3
Documentation
name: CI

on:
  push:
    branches: [master]
  pull_request:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo test

  lint:
    name: Lint
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      - run: cargo clippy -- -D warnings

  version-check:
    name: Version sync
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      - run: |
          VER=$(grep '^version' Cargo.toml | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
          echo "Checking version: $VER"
          if grep -rE 'renkin = "0\.[0-9]\."' docs/; then
            echo "ERROR: stale renkin version in docs/" && exit 1
          fi
          grep -q "version.*{${VER}}" README.md || \
            { echo "ERROR: README citation not updated to $VER"; exit 1; }
          echo "OK: all version references match $VER"

  python-smoke:
    name: Python smoke
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      - uses: PyO3/maturin-action@v1
        with:
          command: build
          args: --release --features python --out dist
      - run: |
          pip install dist/*.whl --force-reinstall
          python -c "
          import renkin
          assert hasattr(renkin, '__version__'), '__version__ missing'
          assert callable(renkin.find_routes), 'find_routes missing'
          assert callable(renkin.predict_forward), 'predict_forward missing'
          assert callable(renkin.validate_forward), 'validate_forward missing'
          result = renkin.find_routes('c1ccccc1', 3, 1, 0)
          assert result, 'find_routes returned empty'
          print('ok:', renkin.__version__)
          "