-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (42 loc) · 1.7 KB
/
Makefile
File metadata and controls
56 lines (42 loc) · 1.7 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
54
55
56
.PHONY: install install-dev clean lint test build publish check
.DEFAULT_GOAL := help
help: ## Show available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-12s %s\n", $$1, $$2}'
install: ## Install package
pip install -e .
install-dev: ## Install with dev dependencies
pip install -e ".[dev,lint,test]"
clean: ## Clean build artifacts
rm -rf build/ dist/ *.egg-info/ .pytest_cache/ .mypy_cache/ htmlcov/
find . -name __pycache__ -exec rm -rf {} +
find . -name "*.pyc" -delete
lint: ## Run code quality checks
black --check src/ tests/
isort --check-only src/ tests/
ruff check src/ tests/
mypy src/
test: ## Run tests
pytest
test-cov: ## Run tests with coverage
pytest --cov=basalam_sdk --cov-report=xml --cov-report=term-missing
check: ## Run all quality checks
make lint
make test
build: ## Build package
python3 -m build
publish: ## Publish to PyPI
@if [ -z "$(PYPI_TOKEN)" ]; then \
echo "Error: PYPI_TOKEN environment variable is required"; \
exit 1; \
fi
python -m twine upload dist/* --username __token__ --password $(PYPI_TOKEN)
publish-test: ## Publish to Test PyPI
@if [ -z "$(TEST_PYPI_TOKEN)" ]; then \
echo "Error: TEST_PYPI_TOKEN environment variable is required"; \
exit 1; \
fi
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* --username __token__ --password $(TEST_PYPI_TOKEN)
release: clean generate-stubs build publish ## Complete release process (clean, build, publish)
release-test: clean generate-stubs build publish-test ## Complete test release process (clean, build, publish to test PyPI)
generate-stubs: ## Generate type stubs for IDE autocomplete
python3 scripts/generate_stubs.py