[build-system]
requires = ["hatchling", "hatch-requirements-txt"]
build-backend = "hatchling.build"

[project]
name = "flaresolverr"
description = "Proxy server to bypass Cloudflare protection"
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
dynamic = ["dependencies", "version"]
keywords = []
authors = [
  { name = "Diego Heras (ngosang)", email = "ngosang@hotmail.es" },
]
classifiers = [
  "Development Status :: 4 - Beta",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3.7",
  "Programming Language :: Python :: 3.8",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: Implementation :: CPython",
  "Programming Language :: Python :: Implementation :: PyPy",
]

[project.urls]
Documentation = "https://github.com/flaresolverr/flaresolverr#readme"
Issues = "https://github.com/flaresolverr/flaresolverr/issues"
Source = "https://github.com/flaresolverr/flaresolverr"

[project.scripts]
flaresolverr = "flaresolverr.flaresolverr:main"

[tool.hatch.version]
path = "flaresolverr/__init__.py"

[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]

[tool.hatch.build]
include = [
  "flaresolverr",
  "package.json",
]

[tool.hatch.envs.default]
dependencies = [
  "pytest",
  "pytest-cov",
]

[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=flaresolverr --cov=tests {args}"
no-cov = "cov --no-cov {args}"

[[tool.hatch.envs.test.matrix]]
python = ["39", "310", "311"]

[tool.coverage.run]
branch = true
parallel = true

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