-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 1.11 KB
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 1.11 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
SHELL = bash
TEST_DATA_PATH ?= yeat/tests/data
PYFILES = $(shell find yeat/ -type f -name "*.py")
## #===== development tasks =====#
## help: print this help message and exit
help: Makefile
@sed -n 's/^## //p' Makefile
## test: run short-running automated tests
test:
pytest --cov=yeat -m "not long and not grid"
## testgrid: run grid-specific automated tests
testgrid:
pytest --cov=yeat -m grid --basetemp=tmp
## testall: run all tests, excluding grid-specific tests
testall:
pytest --cov=yeat -m 'not grid'
## style: check code style against Black
style:
black --line-length=99 --check $(PYFILES)
snakefmt --line-length=9999 --check yeat/workflow
## format: autoformat Python code
format:
black --line-length=99 $(PYFILES)
snakefmt --line-length=9999 yeat/workflow
## hooks: deploy Git pre-commit hooks for development
hooks:
echo "#!/usr/bin/env bash" > .git/hooks/pre-commit
echo "set -eo pipefail" >> .git/hooks/pre-commit
echo "make format" >> .git/hooks/pre-commit
echo 'git add $$(ls yeat/*.py yeat/*/*.py)' >> .git/hooks/pre-commit
chmod 755 .git/hooks/pre-commit