[project]
name = "pystac"
description = "Python library for working with the SpatioTemporal Asset Catalog (STAC) specification"
readme = "README.md"
version = "1.15.2"
authors = [
    { name = "Rob Emanuele", email = "rdemanuele@gmail.com" },
    { name = "Jon Duckworth", email = "duckontheweb@gmail.com" },
]
maintainers = [{ name = "Pete Gadomski", email = "pete.gadomski@gmail.com" }]
keywords = ["pystac", "imagery", "raster", "catalog", "STAC"]
license = { text = "Apache-2.0" }
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Natural Language :: English",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
]
requires-python = ">=3.10"
dependencies = [
    "pystac-core>=1.15.0,<2",
    "pystac-ext-classification",
    "pystac-ext-datacube",
    "pystac-ext-eo",
    "pystac-ext-file",
    "pystac-ext-grid",
    "pystac-ext-item-assets",
    "pystac-ext-label",
    "pystac-ext-mgrs",
    "pystac-ext-mlm",
    "pystac-ext-pointcloud",
    "pystac-ext-projection",
    "pystac-ext-raster",
    "pystac-ext-render",
    "pystac-ext-sar",
    "pystac-ext-sat",
    "pystac-ext-scientific",
    "pystac-ext-storage",
    "pystac-ext-table",
    "pystac-ext-timestamps",
    "pystac-ext-version",
    "pystac-ext-view",
    "pystac-ext-xarray-assets",
]

[project.optional-dependencies]
jinja2 = ["jinja2<4.0"]
orjson = ["orjson>=3.5"]
urllib3 = ["urllib3>=2.6.3"]
validation = ["jsonschema~=4.18"]

[dependency-groups]
dev = [
    "asv>=0.6.4",
    "codespell<2.5",
    "coverage>=7.6.2",
    "doc8>=1.1.2",
    "filelock>=3.20.1", # No direct dependency, avoid CVE-2025-68146.
    "html5lib>=1.1",
    "jinja2>=3.1.4",
    "jsonschema>=4.23.0",
    "mypy>=1.11.2",
    "orjson>=3.10.7",
    "packaging>=24.1",
    "pre-commit>=4.0.1",
    "pytest-cov>=5.0.0",
    "pytest-mock>=3.14.0",
    "pytest-pystac",
    "pytest-recording>=0.13.2",
    "pytest>=8.3.3",
    "requests-mock>=1.12.1",
    "ruff>=0.6.9",
    "types-html5lib>=1.1.11.20240806",
    "types-jsonschema>=4.23.0.20240813",
    "types-orjson>=3.6.2",
    "types-python-dateutil>=2.9.0.20241003",
    "types-urllib3>=1.26.25.14",
    "urllib3>=1.26.19",
    "virtualenv>=20.26.6",
]
docs = [
    "adlfs>=2024.12.0",
    "aiohttp>=3.13.3",  # No direct dependency, avoid CVE-2025-69223
    "boto3>=1.35.39",
    "ipython>=8.28.0",
    "jinja2>=3.1.4",
    "jupyter>=1.1.1",
    "jupyterlab>=4.4.8", # No direct dependency, avoid CVE-2025-59842.
    "nbsphinx>=0.9.5",
    "odc-stac>=0.4.0",
    "planetary-computer>=1.0.0",
    "pydata-sphinx-theme>=0.15.4",
    "rasterio>=1.4.1",
    "rioxarray>=0.19.0",
    "shapely>=2.0.6",
    "sphinx>=8.1.1",
    "sphinx-autobuild>=2024.10.3",
    "sphinx-design>=0.6.1",
    "sphinxcontrib-fulltoc>=1.2.0",
    "starlette>=0.49.1", # No direct dependency, avoid CVE-2025-62727.
    "xpystac>=0.2.0",
    "zarr>=2.18.3",
]

[project.urls]
Documentation = "https://pystac.readthedocs.io"
Repository = "https://github.com/stac-utils/pystac"
Issues = "https://github.com/stac-utils/pystac/issues"
Changelog = "https://github.com/stac-utils/pystac/blob/main/CHANGELOG.md"
Discussions = "https://github.com/radiantearth/stac-spec/discussions/categories/stac-software"

[tool.codespell]
skip = "CHANGELOG.md"

[tool.coverage.run]
branch = true
source = ["core"]

[tool.coverage.report]
fail_under = 65
exclude_lines = ["if TYPE_CHECKING:"]

[tool.doc8]
ignore-path = ["docs/_build", "docs/tutorials"]
max-line-length = 88

[tool.mypy]
show_error_codes = true
strict = true
exclude = ["conftest\\.py$"]
mypy_path = [
    "core",
    "extensions/classification",
    "extensions/datacube",
    "extensions/eo",
    "extensions/file",
    "extensions/grid",
    "extensions/item_assets",
    "extensions/label",
    "extensions/mgrs",
    "extensions/mlm",
    "extensions/pointcloud",
    "extensions/projection",
    "extensions/raster",
    "extensions/render",
    "extensions/sar",
    "extensions/sat",
    "extensions/scientific",
    "extensions/storage",
    "extensions/table",
    "extensions/timestamps",
    "extensions/version",
    "extensions/view",
    "extensions/xarray_assets",
]
explicit_package_bases = true

[[tool.mypy.overrides]]
module = ["jinja2"]
ignore_missing_imports = true

[tool.ruff]
line-length = 88
lint.select = ["E", "F", "I"]
lint.isort.known-first-party = ["pystac"]

[tool.pytest.ini_options]
filterwarnings = ["error"]
addopts = "--block-network --record-mode=none"

[tool.hatch.build.targets.sdist]
only-include = ["README.md", "LICENSE", "pystac"]

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

[tool.uv.sources]
pystac-core = { workspace = true }
pystac-ext-classification = { workspace = true }
pystac-ext-datacube = { workspace = true }
pystac-ext-eo = { workspace = true }
pystac-ext-file = { workspace = true }
pystac-ext-grid = { workspace = true }
pystac-ext-item-assets = { workspace = true }
pystac-ext-label = { workspace = true }
pystac-ext-mgrs = { workspace = true }
pystac-ext-mlm = { workspace = true }
pystac-ext-pointcloud = { workspace = true }
pystac-ext-projection = { workspace = true }
pystac-ext-raster = { workspace = true }
pystac-ext-render = { workspace = true }
pystac-ext-sar = { workspace = true }
pystac-ext-sat = { workspace = true }
pystac-ext-scientific = { workspace = true }
pystac-ext-storage = { workspace = true }
pystac-ext-table = { workspace = true }
pystac-ext-timestamps = { workspace = true }
pystac-ext-version = { workspace = true }
pystac-ext-view = { workspace = true }
pystac-ext-xarray-assets = { workspace = true }
pytest-pystac = { workspace = true }

[tool.uv.workspace]
members = ["core", "extensions/*", "pytest-pystac"]

[tool.uv]
exclude-newer = "10 days"  # matches dependabot cool-down

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