[project]
name = "pygitweb-workspace"
version = "0.3.1"
description = "Workspace root for postgit, pygittools, and pygitweb"
requires-python = ">=3.12"
dependencies = []

[dependency-groups]
dev = [
    "ruff",
    "pytest",
    "mypy>=1.20.1",
    "coverage>=7.15.2",
    "pytest-impacted>=0.35.0",
]
# Playwright runs the browser integration test and the JavaScript unit tests (--js-tests).
playwright = [
    "playwright==1.63.0"
]

[tool.uv.workspace]
members = ["postgit", "pygittools", "pygittools-mcp", "pygitweb"]

[tool.uv]
package = false
default-groups = ["dev"]

[tool.ruff]
line-length = 120

[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
docstring-code-format = true

[tool.ruff.lint]
select = [
    # pycodestyle
    "E",
    # Pyflakes
    "F",
    # pyupgrade
    "UP",
    # flake8-bugbear
    "B",
    # flake8-simplify
    "SIM",
    # isort
    "I",
]

[tool.pytest.ini_options]
markers = [
	"timing: index timing smoke tests (disabled by default; run with --run-timing)",
	"js: JavaScript unit tests (disabled by default; run with --js-tests)",
	"playwright: browser integration tests (disabled by default; run with --playwright)",
]

[tool.mypy]
exclude = [
    ".*_test\\.py",
    # scripts/pytest.py would otherwise shadow the real pytest package
    "^scripts/",
]

[tool.pgt]
actions = [
	{ name = "ruff check", script = "scripts/ruff_check.py" },
	{ name = "ruff format", script = "scripts/ruff_format.py" },
	{ name = "mypy", script = "scripts/mypy.py" },
	{ name = "pytest", script = "scripts/pytest.py" },
]

[tool.pgt.sets.testversions]
actions = [
	{ name = "pytest 3.12", script = "scripts/pytest_version.py", args = ["3.12"] },
	{ name = "pytest 3.13", script = "scripts/pytest_version.py", args = ["3.13"] },
	{ name = "pytest 3.14", script = "scripts/pytest_version.py", args = ["3.14"] },
	{ name = "pytest 3.15", script = "scripts/pytest_version.py", args = ["3.15"] }
]