[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]

[dependency-groups]
dev = [
  "bump2version",
  "diff-cover>=9.2.4",
  "isort",
  "mypy>=1.11.2",
  "pre-commit",
  "pytest",
  "pytest-asyncio>=0.23.8",
  "pytest-cov>=4.1.0",
  "ruff>=0.11.3",
  "smokeshow>=0.5.0",
  "respx>=0.21.0",
  "types-requests",
  "orcheo-sdk",
  "celery[redis]>=5.3.0",
  "redis>=5.0.0"
]
docs = [
  "mkdocs",
  "mkdocs-gen-files",
  "mkdocs-jupyter",
  "mkdocs-material",
  "mkdocstrings[python]>=0.28.1"
]
examples = [
  "orcheo-backend"
]

[project]
dependencies = [
  "agentensor>=0.0.4",
  "fastapi>=0.104.0",
  "uvicorn>=0.24.0",
  "pydantic>=2.4.2",
  "langchain-community>=0.0.10",
  "langchain-openai>=0.0.5",
  "python-dotenv>=1.0.0",
  "websockets>=12.0",
  "openai>=1.0.0",
  "croniter>=2.0.0",
  "langgraph-checkpoint-sqlite>=3.0.0",
  "langgraph-checkpoint-postgres>=3.0.0",
  "selenium>=4.32.0",
  "python-telegram-bot>=22.0",
  "feedparser>=6.0.11",
  "mcp[cli]>=1.12.0",
  "pymongo>=4.13.2",
  "motor>=3.6.0",
  "dynaconf>=3.2.4",
  "structlog>=24.4.0",
  "cryptography>=43.0.1",
  "RestrictedPython>=7.2",
  "py-mini-racer>=0.6.0",
  "langchain-google-genai>=3.0.0",
  "fastmcp>=2.13.0.2",
  "opentelemetry-api>=1.26.0",
  "opentelemetry-sdk>=1.26.0",
  "opentelemetry-exporter-otlp>=1.26.0",
  "httpx>=0.28.1",
  "pinecone>=8.0.0",
  "pinecone-text>=0.11.0",
  "langgraph>=1.0.5",
  "langchain>=1.1.3",
  "langchain-mcp-adapters>=0.2.1",
  "openai-chatkit>=1.4.0",
  "aiosqlite>=0.22.0",
  "psycopg[binary,pool]>=3.2.0",
  "pycryptodome>=3.20.0",
  "rouge-score>=0.1.2",
  "sacrebleu>=2.3.0"
]
description = "Add your description here"
name = "orcheo"
readme = "README.md"
requires-python = ">=3.12"
url = "https://github.com/AI-Colleagues/orcheo"
version = "0.23.0"

[project.scripts]
orcheo-canvas-lint = "orcheo.tooling.commands:canvas_lint"
orcheo-dev-canvas = "orcheo.tooling.commands:canvas_dev"
orcheo-dev-server = "orcheo.tooling.commands:dev_server"
orcheo-format = "orcheo.tooling.commands:format_code"
orcheo-lint = "orcheo.tooling.commands:lint"
orcheo-seed-env = "orcheo.tooling.env:main"
orcheo-test = "orcheo.tooling.commands:test"

[tool.coverage.report]
exclude_lines = [
  "pragma: no cover",
  "pragma: no branch",
  "@overload",
  "if TYPE_CHECKING:",
  "if typing.TYPE_CHECKING:"
]

[tool.coverage.run]
branch = true
command_line = "-m pytest"
source = ["agentensor", "orcheo", "orcheo_sdk", "orcheo_backend"]

[tool.hatch.build.targets.wheel]
packages = ["src/orcheo"]

[tool.mypy]
disallow_untyped_defs = true
ignore_missing_imports = true
python_version = "3.12"

[tool.pytest.ini_options]
filterwarnings = [
  "ignore:.*named widget classes is deprecated.*:DeprecationWarning",
  "ignore:.*named action classes is deprecated.*:DeprecationWarning"
]

[tool.ruff]
exclude = ["docs", "build"]
line-length = 88
# Allow unused variables when underscore-prefixed.
target-version = "py312"

[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
extend-select = [
  "D401",  # First line should be in imperative mood
  "D400",  # First line should end in a period.
  "D404",  # First word of the docstring should not be 'This'
  "TID252"  # No relative imports (not pep8 compliant)
]
ignore = [
  "PLR2004",  # magic value used in comparsion (i.e. `if ndays == 28: month_is_feb`).
  "PLR0913",  # too many arguments
  "D401",  # first line of docstring should be in imperative mood
  "D100"  # missing docstring in public module
]
select = [
  "E",  # pycodestyle
  "F",  # pyflakes
  "B",  # flake8-bugbear
  "D",  # pydocstyle
  "C90",  # mccabe complexity
  "I",  # isort
  "N",  # PEP8-naming
  "UP",  # pyupgrade (upgrade syntax to current syntax)
  "PLE",  # Pylint error https://github.com/charliermarsh/ruff#error-ple
  "PLR",  # Pylint refactor (e.g. too-many-arguments)
  "PLW"  # Pylint warning (useless-else-on-loop)
]

[tool.ruff.lint.isort]
known-first-party = ["agentensor", "orcheo", "orcheo_backend", "orcheo_sdk"]
lines-after-imports = 2
no-lines-before = ["future", "standard-library", "third-party", "first-party", "local-folder"]

[tool.ruff.lint.mccabe]
max-complexity = 10

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.uv.sources]
agentensor = {workspace = true}
orcheo-backend = {workspace = true}
orcheo-sdk = {workspace = true}

[tool.uv.workspace]
members = ["apps/backend", "packages/agentensor", "packages/sdk", "."]
