[project]
name = "evo-sdk"
version = "0.1.20"
description = "Python SDK for using Seequent Evo"
requires-python = ">=3.10"
dependencies = [
    "evo-sdk-common[aiohttp,notebooks,jmespath]>=0.5.12",
    "evo-widgets>=0.1.0",
    "evo-blockmodels[aiohttp,notebooks,pyarrow]>=0.1.0",
    "evo-objects[aiohttp,notebooks,utils]>=0.3.3",
    "evo-files[aiohttp,notebooks]>=0.2.3",
    "evo-colormaps[aiohttp,notebooks]>=0.0.2",
    "evo-compute[aiohttp,notebooks]>=0.0.1rc2",
    "jupyter",
]
dynamic = ["readme"]

[project.urls]
Source = "https://github.com/SeequentEvo/evo-python-sdk"
Tracker = "https://github.com/SeequentEvo/evo-python-sdk/issues"
Homepage = "https://www.seequent.com/"
Documentation = "https://developer.seequent.com/"

[dependency-groups]
test = [
    "pytest",
    "freezegun",
    "parameterized==0.9.0",
    "pytest-asyncio>=1.1.0",
]
dev = [
    "pre-commit >= 4",
    "ruff==0.14.0",              # keep in sync with .pre-commit-config.yaml
    "bumpver",
    "coverage[toml]",
    "mkdocstrings-python",
    { include-group = "test" },
]

[tool.ruff]
line-length = 120

[tool.ruff.lint]
extend-select = ["I", "RUF022"]

[tool.ruff.lint.isort]
known-first-party = ["evo"]

[tool.uv]
required-version = ">=0.9.0,<0.10.0"

[tool.uv.sources]
evo-sdk-common = { workspace = true }
evo-widgets = { workspace = true }
evo-colormaps = { workspace = true }
evo-files = { workspace = true }
evo-objects = { workspace = true }
evo-compute = { workspace = true }
code-samples = { path = "code-samples" }
evo-blockmodels = { workspace = true }

[tool.uv.workspace]
members = ["packages/*"]

[[tool.uv.index]]
name = "pypi.org"
url = "https://pypi.org/simple"

[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
include = ["packages"]

[tool.hatch.build.targets.wheel]
include = ["packages"]

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
# Literal TOML strings (single quotes) need no escaping of backslashes.
# Converts relative links to absolute links in PyPI
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
replacement = '[\1](https://github.com/SeequentEvo/evo-python-sdk/tree/main/\g<2>)'
