forked from openmodelingfoundation/skills
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
107 lines (87 loc) · 3.05 KB
/
Copy pathMakefile
File metadata and controls
107 lines (87 loc) · 3.05 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
# ---- config ----
PYTHON ?= python3
SCRIPTS := scripts
EVALS := evals
CROSS_EVAL := $(EVALS)/cross-skills.json
TOOLS_RUN := docker compose run --rm --entrypoint python3 tools
TOOLS_EXEC := docker compose run --rm tools
# ---- default ----
.PHONY: all
all: help
# ---- help ----
.PHONY: help
help:
@echo "OMF Skills repository — supported make targets"
@echo ""
@echo " make help Show this help message"
@echo " make validate Run the canonical repository validation suite (CI-equivalent)"
@echo " make container-validate Run the full validation suite inside the supported container"
@echo " make test Run repository tests / evals only (no lint or format)"
@echo " make lint Run static analysis (markdown lint)"
@echo " make format Apply repository formatting (prettier on md/json)"
@echo " make clean Remove generated artifacts"
@echo " make report Aggregate failure report from evals"
@echo ""
@echo "Prefer these targets over invoking docker, python, pytest, npm, etc. directly."
# ---- canonical validation ----
# make validate is the single obvious entry point. It runs the same checks as CI.
.PHONY: validate
validate: container-validate
# ---- containerized validation ----
# Authoritative, CI-equivalent validation runs inside the supported container.
.PHONY: container-validate
container-validate:
@echo "=== Running containerized validation ==="
@$(MAKE) lint
@$(MAKE) test
@echo "=== Container validation completed ==="
# ---- tests (no lint, no format) ----
.PHONY: test
test: validate-evals cross validate-skills
# ---- individual validation targets ----
.PHONY: validate-skills
validate-skills:
@$(TOOLS_RUN) $(SCRIPTS)/validate_individual_skills.py
.PHONY: validate-evals
validate-evals:
@$(TOOLS_RUN) $(SCRIPTS)/validate_evals_schema.py
.PHONY: cross
cross:
@$(TOOLS_RUN) $(SCRIPTS)/validate_cross_skills.py $(CROSS_EVAL)
# ---- per-skill evals (placeholder) ----
SKILLS := document fair hpc omfa ospool peer-review
.PHONY: skills
skills: $(SKILLS)
.PHONY: $(SKILLS)
$(SKILLS):
@echo "Running evals for $@"
$(PYTHON) $(SCRIPTS)/run_skill_evals.py $@
# ---- aggregate report ----
.PHONY: report
report:
@$(TOOLS_RUN) $(SCRIPTS)/aggregate_failures.py
# ---- full pipeline (legacy alias, same as validate) ----
.PHONY: full
full: validate
# ---- CI Pipeline (legacy alias, same as validate) ----
.PHONY: ci
ci: validate
# ---- formatting ----
.PHONY: format
format:
$(TOOLS_EXEC) 'prettier --write **/*.{md,json}'
# ---- linting ----
LINT_GLOBS := docs/agent-skills-creation-reference.md docs/SKILL-TEMPLATE.md docs/SKILLS-ASSESSMENT.md docs/VALIDATION.md docs/data-analysis-skills.md docs/roadmap.md
.PHONY: lint
lint:
$(TOOLS_EXEC) 'markdownlint-cli2 $(LINT_GLOBS)'
.PHONY: lint-all
lint-all:
$(TOOLS_EXEC) 'markdownlint-cli2 **/*.md'
# ---- clean ----
.PHONY: clean
clean:
@rm -f results_cross.json
@find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
@find . -type f -name '*.pyc' -delete 2>/dev/null || true
@echo "Cleaned generated artifacts"