-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 751 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 751 Bytes
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
SHELL=/bin/bash
SRC = *.py
.PNONY: report
report: trials FORCE
python3 pfgen_eval.py result/**/trials.jsonl.xz
python3 pfgen_report.py
.PHONY: trials
trials: $(patsubst %/trial_001.jsonl,%/trials.jsonl.xz, \
$(wildcard result/*/*/*/trial_001.jsonl))
%/trials.jsonl.xz: %/trial_001.jsonl
cat $*/trial_???.jsonl | LC_ALL=C sort > $*/trials.jsonl
xz -9 -k -f $*/trials.jsonl
# Lint (ruff, mypy)
.PHONY: lint
lint:
ruff check $(SRC)
mypy $(SRC)
# Format code (black, isort)
.PHONY: format
format:
black $(SRC)
isort $(SRC)
#########################################################################################
# Generic rules
#########################################################################################
.PHONY: FORCE
FORCE: