-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (50 loc) · 1.7 KB
/
Makefile
File metadata and controls
62 lines (50 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
57
58
59
60
61
62
# EggAI SDK Makefile
# For examples, see: https://github.com/eggai-tech/eggai-examples
PYTHON ?= python3.12
VENV_NAME ?= .venv
.PHONY: install install-sdk install-docs test lint format build publish clean deep-clean
# Install SDK and docs
install: install-sdk install-docs
# Install SDK
install-sdk:
@echo "Installing SDK dependencies..."
cd sdk && poetry install
# Install docs
install-docs:
@echo "Installing documentation dependencies..."
cd docs && poetry install
# Run SDK tests
test:
@echo "Running SDK tests..."
cd sdk && poetry run pytest -v
# Lint SDK code
lint:
@echo "Linting SDK code..."
cd sdk && poetry run ruff check .
# Format SDK code
format:
@echo "Formatting SDK code..."
cd sdk && poetry run ruff format .
# Build SDK package
build:
@echo "Building SDK package..."
cd sdk && poetry build
# Publish to PyPI (requires credentials)
publish: build
@echo "Publishing to PyPI..."
cd sdk && poetry publish
# Clean Python cache files
clean:
@echo "Cleaning Python cache files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type f -name "*.pyo" -delete 2>/dev/null || true
find . -type f -name "*.pyd" -delete 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "*.egg" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "dist" -exec rm -rf {} + 2>/dev/null || true
# Deep clean - removes virtual environments as well
deep-clean: clean
@echo "Removing virtual environments..."
find . -type d -name "$(VENV_NAME)" -exec rm -rf {} + 2>/dev/null || true