diff options
| author | Louis Burda <dev@sinitax.com> | 2026-02-28 18:54:19 +0100 |
|---|---|---|
| committer | Louis Burda <dev@sinitax.com> | 2026-02-28 18:54:19 +0100 |
| commit | be1dd21f8e4fbd5361531b4d8727a0d0d243e8ec (patch) | |
| tree | e7b540012e0510d1304d2dac8e137545ae103f75 /justfile | |
| parent | d70a199a72bf9a69eb4a3fcf166b0435918b2e33 (diff) | |
| download | selectui-main.tar.gz selectui-main.zip | |
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/justfile b/justfile new file mode 100644 index 0000000..9586090 --- /dev/null +++ b/justfile @@ -0,0 +1,90 @@ +# Justfile for selectui development tasks + +# Unset VIRTUAL_ENV to avoid conflicts with uv +export VIRTUAL_ENV := "" + +# Default recipe - show available commands +default: + @just --list + +# Install dependencies (including dev dependencies) +install: + uv sync --all-groups + +# Run all checks (ruff + mypy) +check: check-ruff check-mypy + +# Run ruff linter +check-ruff: + @echo "Running ruff..." + uv run ruff check src/ tests/ examples/ + +# Run mypy type checker +check-mypy: + @echo "Running mypy..." + uv run mypy src/ tests/ examples/ + +# Run all tests with pytest +test: + @echo "Running pytest..." + uv run pytest tests/ -v --tb=short + +# Run tests with coverage report +test-cov: + @echo "Running pytest with coverage..." + uv run pytest tests/ -v --cov=src/selectui --cov-report=term-missing --cov-report=html + +# Fix all auto-fixable issues +fix: fix-ruff + +# Run ruff with auto-fix +fix-ruff: + @echo "Running ruff --fix..." + uv run ruff check src/ tests/ examples/ --fix + +# Format code with ruff +fmt: + @echo "Formatting code with ruff..." + uv run ruff format src/ tests/ examples/ + +# Run all checks and tests +ci: check test + @echo "✅ All checks and tests passed!" + +# Clean build artifacts +clean: + @echo "Cleaning build artifacts..." + rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache htmlcov/ .coverage + find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true + +# Run the demo (interactive) +demo: + @echo "Running interactive demo..." + @echo "This will launch the selectui with sample data" + @echo "Press Ctrl+C to exit" + @echo "" + cat examples/example.json | jq -c '.[]' | uv run selectui + +# Run a specific example +example NUM: + @echo "Running example {{NUM}}..." + uv run python examples/pydantic_example.py {{NUM}} + +# Watch tests (requires entr) +watch-test: + @echo "Watching for changes..." + find src tests -name "*.py" | entr -c just test + +# Show project info +info: + @echo "Project: selectui" + @echo "Python: $(uv run python --version)" + @echo "Dependencies:" + @uv pip list + +# Lint everything (alias for check) +lint: check + +# Run pre-commit checks (check + test) +pre-commit: check test + @echo "✅ Pre-commit checks passed!" |
