forked from CarperAI/Algorithm-Distillation-RLHF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 758 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 758 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
34
SHELL=/bin/bash
LINT_PATHS=algorithm_distillation/
pytest:
python -m pytest tests/
pytype:
pytype ${LINT_PATHS}
type: pytype
lint:
# stop the build if there are Python syntax errors or undefined names
flake8 ${LINT_PATHS} --count --select=E9,F63,F7 --show-source --statistics --max-line-length=88
flake8 ${LINT_PATHS} --count --exit-zero --ignore=E203,E501,F811 --show-source --statistics --max-line-length=88
format:
# Sort imports
isort ${LINT_PATHS}
# Reformat using black
black -l 88 ${LINT_PATHS}
check-codestyle:
# Sort imports
isort --check ${LINT_PATHS}
# Reformat using black
black --check -l 88 ${LINT_PATHS}
commit-checks: format type lint
clean:
cd docs && make clean
.PHONY: clean lint format check-codestyle commit-checks