# Run here, or use `make -C packages/sag2 verify` from the repository root.
PYTHON ?= python3
VENV ?= .venv
RUN := $(VENV)/bin

.PHONY: install lint format test build verify
install:
	$(PYTHON) -m venv $(VENV)
	$(RUN)/python -m pip install -e ".[dev,tables]"

lint:
	$(RUN)/ruff check .
	$(RUN)/ruff format --check .

format:
	$(RUN)/ruff format .

test:
	$(RUN)/python -m pytest -q -m "not integration and not online"

build:
	$(RUN)/python -m build
	$(RUN)/python -m twine check dist/*
	$(RUN)/python scripts/check_release.py dist

verify: lint test build
