[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "affine"
description = "Matrices describing affine transformation of the plane"
dynamic = ["version"]
authors = [
    {name = "Sean Gillies", email = "sean.gillies@gmail.com"},
]
readme = "README.rst"
keywords = ["affine", "transformation", "matrix"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "License :: OSI Approved :: BSD License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3 :: Only",
    "Topic :: Multimedia :: Graphics :: Graphics Conversion",
    "Topic :: Scientific/Engineering :: GIS",
    "Typing :: Typed",
]
license = {text = "BSD-3-Clause"}
requires-python = ">=3.9"
dependencies = [
    "attrs",
]

[project.optional-dependencies]
test = [
    "numpy",
    "pytest >=4.6",
    "pytest-cov",
]
dev = [
    "coveralls",
]

[project.urls]
Source = "https://github.com/rasterio/affine"

[tool.flit.sdist]
include = [
    "AUTHORS.txt",
    "CHANGES.txt",
    "LICENSE.txt",
    "docs/",
    "tests/",
]

[tool.pytest.ini_options]
pythonpath = "src"
testpaths = ["tests"]

[tool.ruff.lint]
select = [
    "B",  # flake8-bugbear
    "D",  # pydocstyle
    "E", "W",  # pycodestyle
    "F",  # Pyflakes
    "I",  # isort
    "NPY", # NumPy-specific rules
    "PT", # flake8-pytest-style
    "RET", # flake8-return
    "RUF", # Ruff-specific rules
    "SIM", # flake8-simplify
    "UP", # pyupgrade
]
ignore = [
    "D105",  # Missing docstring in magic method
]

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

[tool.ruff.lint.isort]
force-sort-within-sections = true

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