[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[dependency-groups]
dev = [
    "mkdocs>=1.6.1",
    "mkdocs-material>=9.7.1",
    "prek>=0.2.29",
]
test = [
    "pytest>=9.0.2",
    "pytest-mock>=3.15.1",
    "pytest-xdist>=3.8.0",
]

[project]
name = "youtube-to-docs"
version = "0.0.83"
description = "Convert YouTube videos into structured docs, summaries, audio, and visual assets for easier discovery"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "google-api-python-client>=2.187.0",
    "isodate>=0.7.2",
    "mcp>=1.26.0",
    "polars>=1.36.1",
    "requests>=2.32.5",
    "rich>=14.2.0",
    "rich-argparse>=1.7.2",
    "youtube-transcript-api>=1.2.3",
]

[project.optional-dependencies]
aws = [
    "boto3>=1.42.49",
    "botocore[crt]",
]

azure = [
    "openai>=1.56.0",
]
gcp = [
    "google-genai",
    "google-cloud-speech>=2.29.0",
    "google-cloud-storage",
    "google-cloud-texttospeech",
    "google-cloud-translate>=3.0.0",
]
workspace = [
    "google-auth-oauthlib",
    "pypandoc>=1.16.2",
    "pypandoc_binary>=1.16.2",
]
m365 = [
    "msal>=1.34.0",
    "fastexcel>=0.12.0",
    "xlsxwriter>=3.2.9",
    "pypandoc>=1.16.2",
    "pypandoc_binary>=1.16.2",
]
audio = [
    "yt-dlp>=2026.01.29",
]
video = [
    "static-ffmpeg>=2.13",
]
app = [
    "fastapi>=0.135.1",
    "uvicorn[standard]>=0.41.0",
]
all = [
    "youtube-to-docs[aws,azure,gcp,workspace,m365,audio,video,app]",
]

[project.scripts]
youtube-to-docs = "youtube_to_docs.main:main"
youtube-to-docs-app = "youtube_to_docs.app:start_server"

[tool.setuptools.package-data]
youtube_to_docs = ["static/**"]

[tool.setuptools.packages.find]
include = ["youtube_to_docs*"]
exclude = [
    "tests*",
    "docs*",
    "scripts*",
    "commands*",
    "notebooks*",
    "youtube-to-docs-artifacts*",
    "summary-files*",
    "transcript-files*",
    "audio-files*",
    "infographic-files*",
    "speaker-extraction-files*",
    "qa-files*",
    "video-files*",
]

[tool.ruff]
# Match the project's Python version requirement
target-version = "py312"
line-length = 88

[tool.ruff.lint]
# Enable Pyflakes (`F`), pycodestyle (`E`, `W`), and isort (`I`)
select = ["E", "F", "I", "W"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

[tool.ruff.format]
# Use double quotes for strings.
quote-style = "double"
# Indent with spaces, rather than tabs.
indent-style = "space"
# Respect magic trailing commas.
skip-magic-trailing-comma = false
# Automatically detect the appropriate line ending.
line-ending = "auto"

[tool.pytest.ini_options]
addopts = "-n auto"
python_files = "*.py"
testpaths = ["tests"]
markers = [
    "integration: marks tests as integration tests (skipped by default)",
]

[tool.ty.environment]
python-version = "3.14"

[tool.ty.src]
exclude = ["scripts"]
