[build-system]
requires = ["hatchling>=1.24.2", "hatch-vcs>=0.3.0"]
build-backend = "hatchling.build"

[project]
name = "hatch"
description = "Modern, extensible Python project management"
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
keywords = [
  "build",
  "dependency",
  "environment",
  "hatch",
  "packaging",
  "plugin",
  "publishing",
  "release",
  "versioning",
]
authors = [
  { name = "Ofek Lev", email = "oss@ofek.dev" },
]
classifiers = [
  "Development Status :: 5 - Production/Stable",
  "Intended Audience :: Developers",
  "License :: OSI Approved :: MIT License",
  "Natural Language :: English",
  "Operating System :: OS Independent",
  "Programming Language :: Python :: 3.8",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: Implementation :: CPython",
  "Programming Language :: Python :: Implementation :: PyPy",
  "Topic :: Software Development :: Build Tools",
]
dependencies = [
  "click>=8.0.6",
  "hatchling>=1.24.2",
  "httpx>=0.22.0",
  "hyperlink>=21.0.0",
  "keyring>=23.5.0",
  "packaging>=23.2",
  "pexpect~=4.8",
  "platformdirs>=2.5.0",
  "rich>=11.2.0",
  "shellingham>=1.4.0",
  "tomli-w>=1.0",
  "tomlkit>=0.11.1",
  "userpath~=1.7",
  "virtualenv>=20.26.1",
  "zstandard<1",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://hatch.pypa.io/latest/"
Sponsor = "https://github.com/sponsors/ofek"
History = "https://hatch.pypa.io/dev/history/hatch/"
Tracker = "https://github.com/pypa/hatch/issues"
Source = "https://github.com/pypa/hatch"

[project.scripts]
hatch = "hatch.cli:main"

[tool.hatch.version]
source = "vcs"

[tool.hatch.version.raw-options]
version_scheme = "python-simplified-semver"
local_scheme = "no-local-version"
parentdir_prefix_version = "hatch-"
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "hatch-v*"]

[tool.hatch.build.hooks.vcs]
version-file = "src/hatch/_version.py"

[tool.hatch.build.targets.sdist]
exclude = [
  "/.github",
  "/backend",
  "/scripts",
]

[tool.mypy]
disallow_untyped_defs = false
disallow_incomplete_defs = false
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
warn_no_return = false
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = [
    "*.hatchling.*",
    "*.hatch.utils.*",
]
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_no_return = true

[tool.coverage.run]
branch = true
source_pkgs = ["hatch", "hatchling", "tests"]
omit = [
  "backend/src/hatchling/__main__.py",
  "backend/src/hatchling/bridge/*",
  "backend/src/hatchling/ouroboros.py",
  "src/hatch/__main__.py",
  "src/hatch/cli/new/migrate.py",
  "src/hatch/utils/shells.py",
]

[tool.coverage.paths]
hatch = ["src/hatch", "*/hatch/src/hatch"]
hatchling = ["backend/src/hatchling", "*/hatch/backend/src/hatchling"]
tests = ["tests", "*/hatch/tests"]

[tool.coverage.report]
exclude_lines = [
  "no cov",
  "if __name__ == .__main__.:",
  "if TYPE_CHECKING:",
]
