forked from joshua-auchincloss/hatch-cython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
taskfile.yaml
78 lines (70 loc) · 2.24 KB
/
taskfile.yaml
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
version: '3'
tasks:
std-test:
dir: '{{ .DIR }}'
env:
HATCH_CYTHON_DEVEL: 1
cmds:
- hatch --verbose build --clean
- if [ -d "/Users/runner" ]; then hatch env remove; fi
- hatch run test
example:
dir: test_libraries/src_structure
cmds:
- task: std-test
vars:
DIR: test_libraries/src_structure
- if [ "$(cat ./caller_outputs.json | jaq .call)" -ne "true" ]; then exit 1; fi
- if [ "$(cat ./caller_outputs.json | jaq .includes)" -ne "true" ]; then exit 1; fi
only-included:
dir: test_libraries/only_included
cmds:
- task: std-test
vars:
DIR: test_libraries/only_included
simple-structure:
dir: test_libraries/simple_structure
cmds:
- rm -rf ./example_lib/*
- rm -rf ./tests/*
- cp -r ../src_structure/src/example_lib/* ./example_lib/
- cp -r ../src_structure/tests/* ./tests/
- rm ./tests/test_custom_includes.py
- rm ./example_lib/custom_includes.*
- task: std-test
vars:
DIR: test_libraries/simple_structure
- rm -rf ./example_lib/*
- rm -rf ./tests/*
- echo "" > ./example_lib/.gitkeep
- echo "" > ./tests/.gitkeep
clean:
cmds:
- rm -rf dist
- rm -rf **/dist
- rm -rf .coverag*
- rm -rf __pycache__
- rm -rf **/__pycache__
- rm -rf ./test_libraries/src_structure/src/**/**/*.c
- rm -rf ./test_libraries/src_structure/src/**/**/*.so
- rm -rf ./test_libraries/src_structure/src/**/**/*.cpp
- rm -rf ./test_libraries/src_structure/src/**/**/*.html
- rm -rf ./**/*.so
- rm -rf ./**/*.html
- rm -rf .ruff_cache
- rm -rf **/.ruff_cache
- rm -rf .pytest_cache
- rm -rf **/.pytest_cache
lint:
cmds:
- black .
- isort .
- ruff src --fix
- ruff . --fix
precommit:
cmds:
- task lint
- pre-commit run --all-files
missed:
cmds:
- python3 -m http.server -d ./htmlcov