-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.09 KB
/
Makefile
File metadata and controls
39 lines (29 loc) · 1.09 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
.PHONY: help lint fmt install uninstall test deps deps-test
help:
@echo "Available targets:"
@echo " lint - Run YAML linting to check for issues"
@echo " fmt - Automatically fix common YAML linting issues"
@echo " install - Install orion and its dependencies"
@echo " uninstall - Uninstall orion"
@echo " test - Run the test suite with pytest"
@echo " help - Show this help message"
.DEFAULT_GOAL := help
lint: deps-test
yamllint examples
fmt:
@echo "Checking for YAML formatting tools..."
@yamlfmt examples/ \
@echo "Adding missing newlines at end of files..."
@yamllint --list-files config 2>/dev/null | xargs -I {} sh -c 'if [ -s "{}" ] && [ "$$(tail -c 1 "{}" | wc -l)" -eq 0 ]; then echo "" >> "{}"; fi'
@echo "Auto-fix complete! Run 'make lint' to check for remaining issues."
PIP := $(shell command -v uv > /dev/null 2>&1 && echo "uv pip" || echo "pip")
deps:
$(PIP) install -r requirements.txt
deps-test:
$(PIP) install -r requirements-test.txt
install: deps
$(PIP) install .
uninstall:
$(PIP) uninstall orion
test: deps-test lint
pytest orion/tests/