[project]
name = "django-global-search"
version = "0.0.6"
description = "Global search for Django Admin, search across all registered models with permissions and search_fields support"
readme = "README.md"
authors = [
    { name = "Youngkwang Yang", email = "me@youngkwang.dev" }
]
requires-python = ">=3.9"
dependencies = [
    "django>=4.2",
]
license = { text = "MIT" }
keywords = ["django", "search", "admin", "global"]
classifiers = [
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Framework :: Django",
    "Framework :: Django :: 4.2",
    "Framework :: Django :: 5.0",
    "Framework :: Django :: 5.1",
    "Framework :: Django :: 5.2",
    "License :: OSI Approved :: MIT License",
]

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

[dependency-groups]
dev = [
    "ruff>=0.13.3",
    "mkdocs>=1.6.1",
    "mkdocs-material>=9.5.47",
    "mkdocstrings[python]>=0.27.0",
]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
include = ["pyproject.toml", "src/**/*.py", "tests/"]
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".git-rewrite",
    ".hg",
    ".ipynb_checkpoints",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pyenv",
    ".pytest_cache",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    ".vscode",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "site-packages",
    "venv",
]

# Same as Black.
line-length = 100
indent-width = 4

# Assume Python 3.9
target-version = "py39"

[tool.ruff.lint]
select = [
    "B",  # flake8-bugbear
    "C4", # flake8-comprehensions
    "D",  # pydocstyle
    "E",  # Error
    "F",  # pyflakes
    "I",  # isort
    "N",  # pep8-naming
    "PGH",  # pygrep-hooks
    "PTH", # flake8-use-pathlib
    "Q",  # flake8-quotes
    "S",  # bandit
    "SIM",  # flake8-simplify
    "TRY",  # tryceratops
    "UP",  # pyupgrade
    "W",  # Warning
    "YTT", # flake8-2020
]
ignore = []

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

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

[tool.ruff.format]
docstring-code-format = true
