-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
112 lines (90 loc) · 3.06 KB
/
Copy pathMakefile
File metadata and controls
112 lines (90 loc) · 3.06 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Multi-Language Build System for cyborg-data
# Compatible with OpenShift Prow CI
#
# Prow can invoke these targets directly:
# make go-test - Run Go unit tests (Prow job: unit-go)
# make python-test - Run Python unit tests (Prow job: unit-python)
# make test - Run all tests
.PHONY: all test lint clean help go-test python-test go-lint python-lint go-build python-build python-typing
# Default target
all: test
PYTHON ?= python
help:
@echo "Multi-Language Build System for cyborg-data"
@echo ""
@echo "Available targets:"
@echo " make test - Run tests for both Go and Python"
@echo " make lint - Run linters for both Go and Python"
@echo " make build - Build examples for both languages"
@echo " make clean - Clean build artifacts"
@echo ""
@echo "Go-specific targets:"
@echo " make go-test - Run Go tests"
@echo " make go-test-with-gcs - Run Go tests with GCS support"
@echo " make go-lint - Run Go linter"
@echo " make go-build - Build Go examples"
@echo " make go-bench - Run Go benchmarks"
@echo ""
@echo "Python-specific targets:"
@echo " make python-test - Run Python tests"
@echo " make python-lint - Run Python linter"
@echo " make python-typing - Run Python type checker (mypy strict)"
@echo " make python-format - Format Python code with ruff"
@echo " make python-build - Build Python package"
@echo ""
@echo "Validation targets:"
@echo " make validate-parity - Validate API parity between Go and Python"
@echo " make docs - Build documentation"
# Combined targets
test: go-test python-test
@echo "✅ All tests passed (Go + Python)"
lint: go-lint python-lint
@echo "✅ All linters passed (Go + Python)"
build: go-build python-build
@echo "✅ All builds completed (Go + Python)"
clean: go-clean python-clean
@echo "✅ All artifacts cleaned"
# Go targets
go-test:
@echo "Running Go tests..."
cd go && $(MAKE) test
go-test-with-gcs:
@echo "Running Go tests with GCS support..."
cd go && $(MAKE) test-with-gcs
go-lint:
@echo "Running Go linter..."
cd go && $(MAKE) lint
go-build:
@echo "Building Go examples..."
cd go && $(MAKE) examples
go-clean:
@echo "Cleaning Go build artifacts..."
cd go && $(MAKE) clean
go-bench:
@echo "Running Go benchmarks..."
cd go && $(MAKE) bench
# Python targets
python-test:
@echo "Running Python tests..."
cd python && pytest
python-lint:
@echo "Running Python linter..."
cd python && ruff check .
python-typing:
@echo "Running Python type checker (mypy strict)..."
cd python && $(PYTHON) -m mypy orgdatacore
python-format:
@echo "Formatting Python code..."
cd python && ruff format .
python-build:
@echo "Building Python package..."
cd python && uv build
python-clean:
@echo "Cleaning Python build artifacts..."
cd python && rm -rf dist/ build/ *.egg-info .pytest_cache .mypy_cache .ruff_cache __pycache__
validate-parity:
@echo "Validating API parity between Go and Python..."
@./scripts/validate-api-parity.sh
docs: #todo
@echo "Building documentation..."
@echo "Documentation build not yet configured"