# Justfile for featuremesh-client-py

# Show all available commands
default:
    @just --list

[group('setup')]
[doc("Install all dependencies")]
install:
    uv sync --all-extras

[group('test')]
[doc("Run tests")]
test:
    uv run pytest tests/ -v

[group('test')]
[doc("Run tests with coverage")]
test-cov:
    uv run pytest tests/ -v --cov

[group('test')]
[doc("Show coverage in browser")]
show-coverage:
    uv run pytest tests/ --cov
    open build/coverage/html/index.html

[group('quality')]
[doc("Run linting")]
lint:
    uv run ruff check src/

[group('quality')]
[doc("Format code")]
fmt:
    uv run ruff format src/

[group('quality')]
[doc("Check formatting")]
fmt-check:
    uv run ruff format --check src/

[group('quality')]
[doc("Run type checking")]
typecheck:
    uv run mypy src/

[group('quality')]
[doc("Run all quality checks")]
check: lint fmt-check typecheck
    @echo "✅ All checks passed"

[group('build')]
[doc("Build package")]
build:
    uv build

[group('build')]
[doc("Clean build artifacts")]
clean:
    rm -rf build/ dist/ .pytest_cache/ .ruff_cache/

[group('ci')]
[doc("Run full CI pipeline locally")]
ci: check test build
    @echo "✅ CI pipeline passed"
