-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.dist.yml
128 lines (116 loc) · 2.76 KB
/
Taskfile.dist.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
version: '3'
output: prefixed
vars:
SCRIPTS: 'internal/scripts'
tasks:
audit:
aliases: [a]
desc: Generate files for manual transformation audit
cmds:
- go run {{.SCRIPTS}}/audit/audit.go
deps:
- test
generates:
- audit/*
sources:
- ./*.go
- embed/*
- '{{.SCRIPTS}}/audit/audit.go'
cover:
aliases: [c]
desc: Generate test coverage report
cmds:
- go test -coverprofile=coverage.out
- go tool cover -html=coverage.out -o coverage.html
generates:
- ./coverage.html
- ./coverage.out
sources:
- ./*.go
- internal/tests/*.go
- testdata/*
embed:
aliases: [e]
desc: Generate embedded files from neng's word lists
cmds:
- go run {{.SCRIPTS}}/embed/embed.go
deps:
- res
generates:
- embed/*
sources:
- res/adj*
- res/adv*
- res/noun*
- res/verb*
- '{{.SCRIPTS}}/common/common.go'
- '{{.SCRIPTS}}/embed/embed.go'
lists:
aliases: [l, r, res]
desc: Generate neng's main lists from WordNet resources
cmds:
- go run {{.SCRIPTS}}/res/res.go
ignore_error: true
generates:
- res/adj
- res/adv
- res/noun
- res/verb
sources:
- res/filters/*
- res/misc/*
- res/wordnet/data.*
- '{{.SCRIPTS}}/common/common.go'
- '{{.SCRIPTS}}/res/res.go'
source:
aliases: [s]
desc: Setup WordNet source for task res
summary: |
Download and unpack the standalone WordNet database v3.1.
This task is not compatible with Windows command line interfaces.
To run it, use Unix-like shell environment, such as Git Bash.
cmds:
- tar -zxf res/wordnet/wn3.1.dict.tar.gz --strip-components=1 -C res/wordnet/
deps:
- _dlwnet
status:
- test -f res/wordnet/data.adj
- test -f res/wordnet/data.adv
- test -f res/wordnet/data.noun
- test -f res/wordnet/data.verb
test:
aliases: [t]
desc: Run tests for the package
deps:
- embed
vars:
VERBOSE: '{{default "" .VERBOSE}}'
cmds:
- go test {{.VERBOSE}}
sources:
- ./*.go
- embed/*
- internal/tests/*.go
- testdata/*
- symbols/*.go
- go.mod
testv:
aliases: [tv]
desc: Run tests with -v flag
cmds:
- task: test
vars: { VERBOSE: '-v' }
update:
aliases: [u]
desc: Update dependencies
cmds:
- go get -u
- go mod tidy
_dlwnet:
desc: Internal task that ensures WordNet database tarball is present
internal: true
cmds:
- mkdir -p res/wordnet
- curl -so res/wordnet/wn3.1.dict.tar.gz https://wordnetcode.princeton.edu/wn3.1.dict.tar.gz
status:
- test -f res/wordnet/wn3.1.dict.tar.gz