-
Notifications
You must be signed in to change notification settings - Fork 2
/
dvc.yaml
250 lines (242 loc) · 9.66 KB
/
dvc.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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
vars:
# where to clone Git repositories (should be external directory)
- repos_dir: ~/example_repositories
# list of Git repositories to clone, and their URLs
- repos:
- name: tensorflow
url: https://github.com/tensorflow/tensorflow.git
- name: qtile
url: https://github.com/qtile/qtile.git
- name: linux
url: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- name: git
# Git Source Code Mirror
url: https://github.com/git/git.git
# repositories, and authors in those repositories, to analyze/annotate
- authors:
- repo: tensorflow
nick: ezhulenev
annotate_args: ''
args: [email protected]
- repo: tensorflow
nick: yong.tang
annotate_args: ''
args: [email protected]
- repo: qtile
nick: all_authors-no_merges
annotate_args: >-
--ext-to-language=".hgignore:Ignore List"
--filename-to-language=".hgignore:Ignore List"
--filename-to-language=README:Text
--filename-to-language=PACKAGING:Text
--filename-to-language=BUILDING:Text
--filename-to-language=changelog:Text
# --max-parents=1 is the same as --no-merges
args: --max-parents=1
- repo: linux
nick: all_authors-last_release
# using folded style (denoted by “>”), with strip chomping mode (denoted by "-")
# we could have maybe used DVC dictionary unpacking instead
# https://dvc.org/doc/user-guide/project-structure/dvcyaml-files#dictionary-unpacking
annotate_args: >-
--ext-to-language=.rs:Rust
--filename-to-language=Makefile.lib:Makefile
--filename-to-language=Makefile.config:Makefile
--filename-to-language=Makefile.deps:Makefile
--filename-to-language=Makefile.perf:Makefile
--filename-to-language=Makefile.ubsan:Makefile
--pattern-to-purpose=Makefile.*:project
--filename-to-language=Kconfig:Kconfig
--filename-to-language=Kconfig.debug:Kconfig
--pattern-to-purpose=Kconfig*:project
--ext-to-language=".S:Unix Assembly"
--ext-to-language=".rules:Udev Rules File"
--filename-to-language=README:Text
--filename-to-language=CONTRIBUTORS:Text
--filename-to-language=MAINTAINERS:Text
--ext-to-language=".dts:Device Tree Source"
--ext-to-language=".dtsi:Device Tree Source include"
--ext-to-language=".dtso:Device Tree Source overlay"
--pattern-to-purpose=*.dts:data
--pattern-to-purpose=*.dts?:data
args: --max-parents=1 v6.8..v6.9
- repo: git
nick: jnareb
annotate_args: >-
--ext-to-language=.cgi:Perl
--filename-to-language=config.mak.in:Makefile
--filename-to-language="git.spec.in:RPM Spec"
args: --max-parents=1 --author=jnareb
- repo: linux
nick: all_authors-2021_2023
annotate_args: >-
--ext-to-language=.rs:Rust
--filename-to-language=Makefile.lib:Makefile
--filename-to-language=Makefile.config:Makefile
--filename-to-language=Makefile.deps:Makefile
--filename-to-language=Makefile.perf:Makefile
--filename-to-language=Makefile.ubsan:Makefile
--pattern-to-purpose=Makefile.*:project
--filename-to-language=Kconfig:Kconfig
--filename-to-language=Kconfig.debug:Kconfig
--pattern-to-purpose=Kconfig*:project
--ext-to-language=".S:Unix Assembly"
--ext-to-language=".rules:Udev Rules File"
--filename-to-language=README:Text
--filename-to-language=CONTRIBUTORS:Text
--filename-to-language=MAINTAINERS:Text
--ext-to-language=".dts:Device Tree Source"
--ext-to-language=".dtsi:Device Tree Source include"
--ext-to-language=".dtso:Device Tree Source overlay"
--pattern-to-purpose=*.dts:data
--pattern-to-purpose=*.dts?:data
args: --max-parents=1 --after=2021.01.01 --before=2023.12.31
- repo: linux
nick: all_authors-2021_2023-no_repo
annotate_args: >-
--ext-to-language=.rs:Rust
--filename-to-language=Makefile.lib:Makefile
--filename-to-language=Makefile.config:Makefile
--filename-to-language=Makefile.deps:Makefile
--filename-to-language=Makefile.perf:Makefile
--filename-to-language=Makefile.ubsan:Makefile
--pattern-to-purpose=Makefile.*:project
--filename-to-language=Kconfig:Kconfig
--filename-to-language=Kconfig.debug:Kconfig
--pattern-to-purpose=Kconfig*:project
--ext-to-language=".S:Unix Assembly"
--ext-to-language=".rules:Udev Rules File"
--filename-to-language=README:Text
--filename-to-language=CONTRIBUTORS:Text
--filename-to-language=MAINTAINERS:Text
--ext-to-language=".dts:Device Tree Source"
--ext-to-language=".dtsi:Device Tree Source include"
--ext-to-language=".dtso:Device Tree Source overlay"
--pattern-to-purpose=*.dts:data
--pattern-to-purpose=*.dts?:data
args: --no-use-repo --max-parents=1 --after=2021.01.01 --before=2023.12.31
stages:
clone:
foreach: ${repos}
do:
desc: 'Clone ${item.name} repository from ${item.url}'
cmd:
- >-
if [ -d ${repos_dir}/${item.name} ]; then
echo 'Repository ${item.name} already cloned, skipping';
else
git clone ${item.url} ${repos_dir}/${item.name};
fi
- echo ${item.url} >data/examples/${item.name}.url
outs:
- data/examples/${item.name}.url
annotate:
foreach: ${authors}
do:
desc: 'Generating annotations for ${item.nick} from-repo ${item.repo}'
cmd: >-
diff-annotate ${item.annotate_args} from-repo
--output-dir=data/examples/annotations/${item.repo}/${item.nick}/
${repos_dir}/${item.repo}
${item.args}
deps:
- src/diffannotator/annotate.py
- data/examples/${item.repo}.url
outs:
- data/examples/annotations/${item.repo}/${item.nick}/
purpose-counter:
foreach: ${repos}
do:
desc: 'Running `diff-gather-stats purpose-counter ...` on ${item.name} repo'
cmd: >-
diff-gather-stats --annotations-dir=''
purpose-counter
--output=data/examples/stats/${item.name}.purpose-counter.json
data/examples/annotations/${item.name}/
deps:
- data/examples/annotations/${item.name}
- src/diffannotator/gather_data.py
outs:
- data/examples/stats/${item.name}.purpose-counter.json
purpose-per-file:
foreach: ${repos}
do:
desc: 'Running `diff-gather-stats purpose-per-file ...` on ${item.name} repo'
cmd: >-
diff-gather-stats --annotations-dir=''
purpose-per-file
data/examples/stats/${item.name}.purpose-per-file.json
data/examples/annotations/${item.name}/
deps:
- data/examples/annotations/${item.name}
- src/diffannotator/gather_data.py
outs:
- data/examples/stats/${item.name}.purpose-per-file.json
lines-stats:
foreach: ${repos}
do:
desc: 'Running `diff-gather-stats lines-stats ...` on ${item.name} repo'
cmd: >-
diff-gather-stats --annotations-dir=''
lines-stats
data/examples/stats/${item.name}.lines-stats.json
data/examples/annotations/${item.name}/
deps:
- data/examples/annotations/${item.name}
- src/diffannotator/gather_data.py
outs:
- data/examples/stats/${item.name}.lines-stats.json
lines-stats.purpose-to-type:
foreach: ${repos}
do:
desc: 'Running `diff-gather-stats lines-stats --purpose-to-annotation...` on ${item.name} repo'
cmd: >-
diff-gather-stats --annotations-dir=''
lines-stats
--purpose-to-annotation=data
--purpose-to-annotation=documentation
--purpose-to-annotation=markup
--purpose-to-annotation=other
--purpose-to-annotation=project
--purpose-to-annotation=test
data/examples/stats/${item.name}.lines-stats.purpose-to-type.json
data/examples/annotations/${item.name}/
deps:
- data/examples/annotations/${item.name}
- src/diffannotator/gather_data.py
outs:
- data/examples/stats/${item.name}.lines-stats.purpose-to-type.json
timeline:
foreach: ${repos}
do:
desc: 'Running `diff-gather-stats timeline ...` on ${item.name} repo'
cmd: >-
diff-gather-stats --annotations-dir=''
timeline
data/examples/stats/${item.name}.timeline.json
data/examples/annotations/${item.name}/
deps:
- data/examples/annotations/${item.name}
- src/diffannotator/gather_data.py
outs:
- data/examples/stats/${item.name}.timeline.json
timeline.purpose-to-type:
foreach: ${repos}
do:
desc: 'Running `diff-gather-stats timeline --purpose-to-annotation...` on ${item.name} repo'
cmd: >-
diff-gather-stats --annotations-dir=''
timeline
--purpose-to-annotation=data
--purpose-to-annotation=documentation
--purpose-to-annotation=markup
--purpose-to-annotation=other
--purpose-to-annotation=project
--purpose-to-annotation=test
data/examples/stats/${item.name}.timeline.purpose-to-type.json
data/examples/annotations/${item.name}/
deps:
- data/examples/annotations/${item.name}
- src/diffannotator/gather_data.py
outs:
- data/examples/stats/${item.name}.timeline.purpose-to-type.json