-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
73 lines (58 loc) · 1.5 KB
/
Taskfile.yml
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
# Taskfile to ease the use of dev tooling...
# note that task should be run in the virtual environment you set up with poetry.
#
# > poetry shell # this is analagous to `conda activate` or activating a venv.
# poetry> task reformat # runs the 'reformat' task, defined below to use ruff
# poetry> task fixme # this will run both the reformat and lint tasks
version: '3'
env:
SRCS: ./src
tasks:
fixme:
summary: |
Runs static code analysis tools, including reformat.
cmds:
- task: reformat
- task: lint
# - task: typecheck
# TODO: type checking....
reformat:
cmds:
- ruff format $SRCS
lint:
cmds:
- ruff check $SRCS
typecheck:
cmds:
- mypy --install-types --non-interactive $SRCS
tests:
summary: |
Runs all tests configured in pytest.
cmds:
- pytest --cov --sparse-ordering ./tests
tests.unittest:
summary: |
Run only tests marked as 'unittest'
cmds:
- pytest -m 'unittest' --cov --sparse-ordering ./tests
tests.integration:
summary: |
Run only tests marked as 'integration'
cmds:
- pytest -m 'integration' --cov --sparse-ordering ./tests
build:
summary: |
Builds the docs and a wheel for ease of installation.
cmds:
- task: doc
- task: wheel
- task: docker
doc:
cmds:
- sphinx-build -a -b html ./docs ./public
wheel:
cmds:
- poetry build
docker:
cmds:
- docker build . -t nldi-py