Skip to content

Commit

Permalink
dvc.yaml: Configure annotation process for 'linux' repo
Browse files Browse the repository at this point in the history
Based on tool messages from trial run without any extra configuration
(state from the previous commit).
  • Loading branch information
jnareb committed Nov 26, 2024
1 parent 119b3d4 commit 512b9db
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
31 changes: 29 additions & 2 deletions dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,44 @@ vars:
- 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: ''
# --max-parents=1 is the same as --no-merges
args: --max-parents=1
- repo: linux
nick: all_authors-last_release
args: --max-parents=1 v6.8..v6.9
# 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

stages:
clone:
Expand All @@ -46,7 +73,7 @@ stages:
do:
desc: 'Generating annotations for ${item.nick} from-repo ${item.repo}'
cmd: >-
diff-annotate from-repo
diff-annotate ${item.annotate_args} from-repo
--output-dir=data/examples/annotations/${item.repo}/${item.nick}/
${repos_dir}/${item.repo}
${item.args}
Expand Down
1 change: 0 additions & 1 deletion tests/test_languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,3 @@ def test_languages_extra_cases_linux(caplog: LogCaptureFixture):

#actual = langs.annotate('scripts/stackusage')
#expected = {'language': 'Shell', 'type': 'programming', 'purpose': 'programming'}

0 comments on commit 512b9db

Please sign in to comment.