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

# Required
version: 2

build:
  os: "ubuntu-22.04"
  tools:
    python: "mambaforge-latest"
  jobs:
    pre_build:
      - python doc/generate_dimensions.py
      - doxygen ./doc/doxygen/doxygen.conf 1> /dev/null
      # Generate on-the-fly Sphinx configuration from Jupyter Book's _config.yml
      - "jupyter-book config sphinx doc/"
      - sed -i "1i\import os, sys; sys.path.append(os.path.abspath(\"./_ext\"))" doc/conf.py

  apt_packages:
    - graphviz

sphinx:
  # builder: html
  configuration: doc/conf.py
  # fail_on_warning: true

conda:
  environment: doc/environment.yml

formats: all
