version: 2
updates:
  # Python dependencies via pip/uv
  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
    open-pull-requests-limit: 5
    labels:
      - "dependencies"
      - "python"
    commit-message:
      prefix: "deps(python)"
    groups:
      development:
        patterns:
          - "pytest*"
          - "ruff"
          - "mypy"
          - "pre-commit"
          - "bandit"
          - "codespell"
        update-types:
          - "minor"
          - "patch"

  # GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
    open-pull-requests-limit: 5
    labels:
      - "dependencies"
      - "github-actions"
    commit-message:
      prefix: "deps(actions)"

  # Docker dependencies
  - package-ecosystem: "docker"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
    open-pull-requests-limit: 3
    labels:
      - "dependencies"
      - "docker"
    commit-message:
      prefix: "deps(docker)"
    ignore:
      # CRITICAL: Python version must match FreeCAD's bundled Python (currently 3.11)
      # Using a different Python version causes ABI incompatibility crashes.
      # Only allow patch updates (e.g., 3.11-slim to 3.11.x-slim), not minor/major.
      - dependency-name: "python"
        update-types:
          - "version-update:semver-major"
          - "version-update:semver-minor"
