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

[project]
name = "mccole"
version = "1.5.0"
requires-python = ">=3.12"
authors = [
    {name = "Greg Wilson", email = "gvwilson@third-bit.com"},
]
maintainers = [
    {name = "Greg Wilson", email = "gvwilson@third-bit.com"},
]
description = "A simple static site generator for tutorials"
keywords = ["open source", "static site generator"]
readme = "README.md"
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
]
dependencies = [
    "beautifulsoup4>=4.14.3",
    "html5validator>=0.4.2",
    "jinja2>=3.1.6",
    "markdown>=3.10",
    "mkdocs>=1.6.1",
    "mkdocstrings[python]>=1.0.0",
    "mkdocs-material>=9.7.1",
    "pygments>=2.19.2",
    "tomli>=2.3.0"
]

[project.optional-dependencies]
dev = [
    "build>=1.3.0",
    "markdown-include>=0.8.1",
    "pytest>=9.0.2",
    "ruff>=0.14.10",
    "taskipy>=1.14.1",
    "twine>=6.2.0"
]

[project.scripts]
mccole = "mccole.clui:main"

[project.urls]
Repository = "https://github.com/gvwilson/mccole"
Documentation = "https://mccole.readthedocs.org"

[tool.taskipy.tasks]
build = {help = "build package", cmd = "python -m build"}
check = {help = "check code issues", cmd = "ruff check ."}
clean = {help = "clean up", cmd = """
rm -rf ./dist &&
find . -path './.venv' -prune -o -type d -name '__pycache__' -exec rm -rf {} + &&
find . -path './.venv' -prune -o -type f -name '*~' -exec rm {} + &&
find . -path './.venv' -prune -o -type d -name '.pytest_cache' -exec rm -rf {} + &&
find . -path './.venv' -prune -o -type d -name '.coverage' -exec rm {} +
"""}
docs = {help = "build documentation", cmd = """
mkdocs build &&
touch docs/.nojekyll &&
cp docs-requirements.txt docs/requirements.txt
"""}
fix = {help = "fix code issues", cmd = "ruff check --fix ."}
format = {help = "format code", cmd = "ruff format ."}
publish = {help = "publish using ~/.pypirc credentials", cmd = "twine upload --verbose dist/*"}
serve = {help = "serve documentation", cmd = "python -m http.server -d docs"}
test = {help = "run tests", cmd = "python -m pytest tests"}
