forked from datatrails/datatrails-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
100 lines (83 loc) · 2.75 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
version: '3'
tasks:
about:
desc: Generate about.py
cmds:
- ./scripts/builder.sh ./scripts/version.sh
status:
- test -s archivist/about.py
audit:
desc: Audit the code
deps: [about]
cmds:
- ./scripts/builder.sh pip-audit -r requirements.txt
builder:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- docker build --no-cache --build-arg VERSION=3.7 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
builder-3.8:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- docker build --no-cache --build-arg VERSION=3.8 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
builder-3.9:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- docker build --no-cache --build-arg VERSION=3.9 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
builder-3.10:
desc: Build a docker environment with the right dependencies and utilities
cmds:
- docker build --no-cache --build-arg VERSION=3.10 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
check:
desc: Check the style, bug and quality of the code
deps: [about]
cmds:
- ./scripts/builder.sh python3 --version
- ./scripts/builder.sh pycodestyle --format=pylint setup.py archivist examples functests unittests
- ./scripts/builder.sh python3 -m pylint --rcfile=pylintrc setup.py 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]
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 setup.py archivist examples functests unittests
functests:
desc: Run functests - requires an archivist instance and a authtoken
deps: [about]
cmds:
- ./scripts/builder.sh ./scripts/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/*
unittests:
desc: Run unittests
deps: [about]
cmds:
- ./scripts/builder.sh ./scripts/unittests.sh
wheel:
desc: Builds python wheel package
deps: [about]
cmds:
- rm -rf *egg-info
- rm -rf build
- rm -f dist/*
- python3 setup.py bdist_wheel