-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.dist.yml
More file actions
145 lines (132 loc) · 3.43 KB
/
Taskfile.dist.yml
File metadata and controls
145 lines (132 loc) · 3.43 KB
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
# neng -- Non-Extravagant Name Generator
# Copyright (C) 2024 Wojciech Głąb (github.com/Zedran)
#
# This file is part of neng.
#
# neng is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 only.
#
# neng is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with neng. If not, see <https://www.gnu.org/licenses/>.
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