-
Notifications
You must be signed in to change notification settings - Fork 8
/
Taskfile.yml
149 lines (122 loc) · 3.7 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: '3'
vars:
PYVERSION:
sh: echo $(./scripts/builder.sh python3 --version | cut -d' ' -f2| cut -d'.' -f1-2)
tasks:
about:
desc: Generate about.py
cmds:
- ./scripts/builder.sh ./scripts/version.sh
audit:
desc: Audit the code
cmds:
- ./scripts/builder.sh pip-audit -r requirements.txt
builder:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- ./scripts/build.sh "3.9"
builder-3.10:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- ./scripts/build.sh "3.10"
builder-3.11:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- ./scripts/build.sh "3.11"
builder-3.12:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- ./scripts/build.sh "3.12"
builder-3.13:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- ./scripts/build.sh "3.13"
check:
desc: Check the style, bug and quality of the code
deps: [about]
cmds:
- echo {{.PYVERSION}}
- ./scripts/builder.sh ruff check archivist examples functests unittests
- ./scripts/builder.sh pycodestyle --format=pylint archivist examples functests unittests
- ./scripts/builder.sh python3 -m pylint archivist examples functests unittests
- task: check-pyright
check-pyright:
desc: Execute pyright
cmds:
- ./scripts/builder.sh python3 -m pyright --stats archivist
check-fixes:
desc: Show proposed fixes from ruff
deps: [about]
cmds:
- ./scripts/builder.sh ruff check --show-fixes archivist examples functests unittests
check-fixes-apply:
desc: Apply proposed fixes from ruff
deps: [about]
cmds:
- ./scripts/builder.sh ruff check --fix archivist examples functests unittests
clean:
desc: Clean git repo
cmds:
- find -name '*,cover' -type f -delete
- git clean -fdX
deps:
desc: Show dependency tree
cmds:
- ./scripts/builder.sh /bin/bash -c "pipdeptree"
docs:
desc: Create sphinx documentation
deps: [about, zipnotebooks]
cmds:
- ./scripts/builder.sh /bin/bash -c "cd docs && make clean && make html"
format:
desc: Format code using black
deps: [about]
cmds:
- ./scripts/builder.sh black archivist examples functests unittests
functests:
desc: Run functests - requires an archivist instance and a authtoken
deps: [about]
cmds:
- ./scripts/builder.sh ./scripts/functests.sh
pipeline-functests:
desc: Run functests with Junit xml output
deps: [about]
cmds:
- ./scripts/builder.sh ./scripts/pipeline_functests.sh
notebooks:
desc: Run jupyter notebooks
deps: [about]
cmds:
- ./scripts/notebooks.sh
publish:
desc: publish wheel package (will require username and password)
deps: [about]
cmds:
- ./scripts/builder.sh python3 -m twine upload --repository pypi dist/*
sbom:
desc: Audit the code
cmds:
- ./scripts/builder.sh ./scripts/sbom.sh
type-check:
desc: Runs the pyright type checker against the core archivist files
deps: [about]
cmds:
- ./scripts/builder.sh python3 -m pyright archivist
unittests:
desc: Run unittests
deps: [about]
cmds:
- ./scripts/builder.sh ./scripts/unittests.sh
venv:
desc: Builds the virtual environment
cmds:
- ./scripts/venv.sh
wheel:
desc: Builds python wheel package
deps: [about]
cmds:
- ./scripts/builder.sh ./scripts/wheel.sh
zipnotebooks:
desc: Zips notebooks so they can be downloaded
cmds:
- ./scripts/builder.sh ./scripts/zipnotebooks.sh