a6d578c4a8
The test suite was carrying migration scars and a long tail of low-density assertions over SDK-derived behavior. Drop it wholesale. - Delete ``tests/`` (42 files, ~4900 LoC). - Drop ``pytest`` / ``pytest-asyncio`` / ``pytest-cov`` / ``pytest-mock`` from the dev dependency group; ``uv sync`` uninstalls the matching wheels. - Strip the pytest + coverage config blocks, the ``flake8-pytest-style`` ruff selector, the ``tests/**`` per-file ignores, the ``[tool.mypy.overrides] tests.*`` block, and the ``"tests"`` entry from bandit's ``exclude_dirs``. - Drop the ``test`` / ``test-cov`` Makefile targets; ``dev`` no longer depends on tests. - Strip the ``# Testing`` block from ``.gitignore`` (``.coverage``, ``.pytest_cache/``, ``htmlcov/``, ``coverage.xml``, ``nosetests.xml``, ``.tox/``, ``.hypothesis/``). ruff (27) and mypy (82) baselines unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
73 lines
2.3 KiB
Makefile
73 lines
2.3 KiB
Makefile
.PHONY: help install dev-install format lint type-check security check-all clean pre-commit setup-dev dev
|
|
|
|
help:
|
|
@echo "Available commands:"
|
|
@echo " setup-dev - Install all development dependencies and setup pre-commit"
|
|
@echo " install - Install production dependencies"
|
|
@echo " dev-install - Install development dependencies"
|
|
@echo ""
|
|
@echo "Code Quality:"
|
|
@echo " format - Format code with ruff"
|
|
@echo " lint - Lint code with ruff and pylint"
|
|
@echo " type-check - Run type checking with mypy and pyright"
|
|
@echo " security - Run security checks with bandit"
|
|
@echo " check-all - Run all code quality checks"
|
|
@echo ""
|
|
@echo "Development:"
|
|
@echo " pre-commit - Run pre-commit hooks on all files"
|
|
@echo " clean - Clean up cache files and artifacts"
|
|
|
|
install:
|
|
uv sync --no-dev
|
|
|
|
dev-install:
|
|
uv sync
|
|
|
|
setup-dev: dev-install
|
|
uv run pre-commit install
|
|
@echo "✅ Development environment setup complete!"
|
|
@echo "Run 'make check-all' to verify everything works correctly."
|
|
|
|
format:
|
|
@echo "🎨 Formatting code with ruff..."
|
|
uv run ruff format .
|
|
@echo "✅ Code formatting complete!"
|
|
|
|
lint:
|
|
@echo "🔍 Linting code with ruff..."
|
|
uv run ruff check . --fix
|
|
@echo "📝 Running additional linting with pylint..."
|
|
uv run pylint strix/ --score=no --reports=no
|
|
@echo "✅ Linting complete!"
|
|
|
|
type-check:
|
|
@echo "🔍 Type checking with mypy..."
|
|
uv run mypy strix/
|
|
@echo "🔍 Type checking with pyright..."
|
|
uv run pyright strix/
|
|
@echo "✅ Type checking complete!"
|
|
|
|
security:
|
|
@echo "🔒 Running security checks with bandit..."
|
|
uv run bandit -r strix/ -c pyproject.toml
|
|
@echo "✅ Security checks complete!"
|
|
|
|
check-all: format lint type-check security
|
|
@echo "✅ All code quality checks passed!"
|
|
|
|
pre-commit:
|
|
@echo "🔧 Running pre-commit hooks..."
|
|
uv run pre-commit run --all-files
|
|
@echo "✅ Pre-commit hooks complete!"
|
|
|
|
clean:
|
|
@echo "🧹 Cleaning up cache files..."
|
|
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
|
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
|
|
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
|
|
find . -name "*.pyc" -delete 2>/dev/null || true
|
|
@echo "✅ Cleanup complete!"
|
|
|
|
dev: format lint type-check
|
|
@echo "✅ Development cycle complete!"
|