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

[project]
name = "nythop"
dynamic = ["version"]
description = 'Nythop is an esolang that takes Python and gives it a good shake, letting you write code in reverse for a coding experience like no other!'
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE.md" }
keywords = ["python", "esolang", "esoteric", "language", "programming"]
authors = [
  { name = "Luiz Eduardo Amaral", email = "luizamaral306@gmail.com" },
]
classifiers = [
  "Development Status :: 4 - Beta",
  "Programming Language :: Python",
  "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",
  "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
]
dependencies = []
scripts = {nythop = "nythop:cli", nythop-transpile = "nythop:transpile"}

[project.urls]
Documentation = "https://github.com/Luiz Eduardo Amaral/nythop#readme"
Issues = "https://github.com/Luiz Eduardo Amaral/nythop/issues"
Source = "https://github.com/Luiz Eduardo Amaral/nythop"

[tool.hatch.version]
path = "src/nythop/__about__.py"

[tool.hatch.envs.default]
dependencies = [
  "pre-commit>3.1",
  "coverage[toml]>=6.5",
  "pytest",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
test-cov = "coverage run -m pytest {args:tests}"
cov-report = [
  "- coverage combine",
  "coverage report -m",
]
cov = [
  "test-cov",
  "cov-report",
]
cov-xml = [
  "cov",
  "coverage xml",
]

[tool.hatch.envs.types]
extra-dependencies = [
  "mypy>=1.0.0",
  "pytest==8.3.3",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/nythop tests}"

[tool.mypy]
exclude = "tests/examples/"

[tool.coverage.run]
source_pkgs = ["nythop", "tests"]
branch = true
parallel = true
omit = [
  "src/nythop/__about__.py",
]

[tool.coverage.paths]
nythop = ["src/nythop", "*/nythop/src/nythop"]
tests = ["tests", "*/nythop/tests"]

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


[tool.ruff]
extend-exclude = ["tests/examples/"]

[tool.ruff.lint]
ignore = ["S102", "BLE001"]  # I'm fearless

[tool.ruff.lint.per-file-ignores]
"docs/*" = ["INP001"]
"tests/*" = ["S101"]
