-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (39 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
53 lines (39 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: test integration_test unit_test format lint install help
help: ## Show this help message
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install package with all dependencies
pip install -e ".[all,dev]"
test: ## Run all unit tests
pytest tests/unit_tests/ -v
integration_test: ## Run integration tests (requires SpiceDB)
pytest tests/integration_tests/ -v
test_all: ## Run all tests (unit + integration)
pytest tests/ -v
test_watch: ## Run tests in watch mode
pytest-watch tests/unit_tests/
coverage: ## Run tests with coverage report
pytest --cov=langchain_spicedb --cov-report=html --cov-report=term tests/
@echo "Coverage report generated in htmlcov/index.html"
format: ## Format code with black and isort
black langchain_spicedb/ tests/
isort langchain_spicedb/ tests/
lint: ## Lint code with ruff
ruff check langchain_spicedb/ tests/
type_check: ## Type check with mypy
mypy langchain_spicedb/
clean: ## Clean up generated files
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf .pytest_cache/
rm -rf .coverage
rm -rf htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: ## Build distribution packages
python -m build
publish: ## Publish to PyPI (requires credentials)
python -m twine upload dist/*
publish_test: ## Publish to Test PyPI
python -m twine upload --repository testpypi dist/*