@default: venv lint test build

@venv:
    # uv sync --group dev
    uv sync --python 3.12 --group dev

@run *ARGS:
    uv run main.py {{ ARGS }}

@lint:
    uv run ruff check . --fix
    uv run ruff format .

@test:
    mkdir -p artifacts

    # uv run --python 3.10 pytest --cov=slackflare
    # uv run --python 3.11 pytest --cov=slackflare
    uv run --python 3.12 pytest --cov=slackflare
    # uv run --python 3.13 pytest --cov=slackflare
    # uv run --python 3.14 pytest --cov=slackflare

    uv run coverage report -m
    # uv run coverage html -d artifacts/htmlcov
    # open artifacts/htmlcov/index.html

@build:
    rm -rf dist
    uv build --no-sources

@publish: build
    uv publish --token "$(pass show pypi/token)"
