# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and tools
build:
  os: ubuntu-22.04
  tools:
    python: "3.11"
  jobs:
    pre_create_environment:
      # Install system dependencies required for compilation
      - apt-get update
      - apt-get install -y build-essential
      - apt-get install -y libopencv-dev python3-opencv
      - apt-get install -y ffmpeg libsm6 libxext6
      - apt-get install -y graphviz graphviz-dev
    post_install:
      # Install package in development mode
      - pip install -e .

# Build documentation in the docs/ directory with Sphinx
sphinx:
  builder: html
  configuration: docs/conf.py
  fail_on_warning: false

# Explicitly set the version of Python and its requirements
python:
  install:
    - requirements: docs/requirements.txt
    - method: pip
      path: .
      extra_requirements:
        - docs
  system_packages: true

# Optional but recommended, declare the Python requirements required
# to build your documentation
formats:
  - pdf
  - epub
  - htmlzip

# Search configuration
search:
  ranking:
    api/**: -1
    tutorials/**: 1
    user_guide/**: 2
