[project]
name = "asimpy"
version = "0.6.1"
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 discrete event simulator using async/await"
keywords = ["open source", "discrete event simulation"]
readme = "README.md"
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
]
dependencies = []

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

[tool.hatch.build.targets.wheel]
packages = ["src/asimpy"]

[tool.coverage.report]
exclude_lines = [
    "@abstractmethod",
    "if TYPE_CHECKING:",
]

[dependency-groups]
dev = [
    "build>=1.4.0",
    "coverage>=7.13.2",
    "markdown-include>=0.8.1",
    "mkdocs>=1.6.1",
    "mkdocs-awesome-pages-plugin>=2.10.1",
    "mkdocs-material>=9.7.1",
    "mkdocstrings[python]>=1.0.0",
    "pytest>=9.0.2",
    "ruff>=0.14.10",
    "taskipy>=1.14.1",
    "twine>=6.2.0",
    "ty>=0.0.11",
]

[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 {} +
"""}
docs = {help = "build documentation", cmd = """
mkdocs build &&
touch docs/.nojekyll &&
cp docs-requirements.txt docs/requirements.txt
"""}
coverage = {help = "run tests with coverage", cmd = """
python -m coverage run -m pytest tests
python -m coverage report --show-missing
"""}
fix = {help = "fix code issues", cmd = "ruff check --fix ."}
format = {help = "format code", cmd = "ruff format ."}
lint = {help = "run all code checks", cmd = "task check && task types"}
examples = {help = "regenerate example output", cmd = """
mkdir -p output &&
for file in examples/*.py
do
    name=$(basename "$file" .py)
    python "$file" > "output/$name.txt" 2>&1
done
"""}
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 = "pytest tests"}
types = {help = "check types", cmd = "ty check ."}
