diff --git a/.github/codeowners/README.md b/.github/codeowners/README.md new file mode 100644 index 000000000..494a57020 --- /dev/null +++ b/.github/codeowners/README.md @@ -0,0 +1,5 @@ +This directory contains automation that helped us generate the [`CODEOWNERS`](/CODEOWNERS) file. + +- `main_dirs.txt` is a list of the "main" directories for which we want a list of code owners; this was generated with `find -d`, and manually choosing the "main" directories +- `generate-codeowners.rb` reads `main_dirs.txt` and uses `git` logs to find the unique set of authors for all of the files within each directory; it then writes a new `CODEOWNERS` file +- finally, we go through the `CODEOWNERS` file manually to decide which contributors to keep; those contributors will be notified in PR reviews, so for example we may not want to include contributors who are not involved in the project any more diff --git a/.github/codeowners/generate-codeowners.rb b/.github/codeowners/generate-codeowners.rb new file mode 100755 index 000000000..60e16d2bc --- /dev/null +++ b/.github/codeowners/generate-codeowners.rb @@ -0,0 +1,107 @@ +#!/usr/bin/env ruby +# run this script from the TOP level directory + +GithubHandles = { + '' => 'ajhobart', + '' => 'afilippi67', + '' => 'drewkenjo', + '' => 'huckb', + '' => 'bleaktwig', + '' => 'c-dilks', + '' => 'forcar', + '' => 'cpecar', + '' => 'heddle', + '' => 'dpayette', + '' => '', + '' => '', + '' => 'hauenst', + '' => 'fbossu', + '' => 'fxgirod', + '' => 'gavalian', + '' => 'gangel85', + '' => 'Guillaum-C', + '' => 'josnewton', + '' => '', + '' => 'forcar', + '' => 'latifkabir', + '' => 'mcontalb', + '' => 'mathieuouillon', + '' => 'mholtrop', + '' => 'mdefurne', + '' => 'miho', + '' => 'baltzell', + '' => 'naharrison', + '' => 'markovnick', + '' => 'N-Plx', + '' => '', + '' => 'PChatagnon', + '' => 'rafopar', + '' => 'raffaelladevita', + '' => '', + '' => '', + '' => '', + '' => 'sly2j', + '' => 'tongtongcao', + '' => 'gurjyan', + '' => 'zieglerv', + '' => 'ajhobart', + '' => 'forcar', + '' => 'cqplatt', + '' => 'dcpayette', + '' => '', + '' => 'efuchey', + '' => 'Hattawy', + '' => 'huckb', + '' => 'jwgibbs', + '' => 'mariangela-bondi', + '' => 'marmstr4', + '' => 'mcontalb', + '' => 'mpaolone', + '' => 'rtysonCLAS12', + '' => 'tongtongcao', + '' => 'zieglerv', +} + +codeowners = File.open('CODEOWNERS', 'w') +unknown_authors = [] + +File.readlines('.github/codeowners/main_dirs.txt').map(&:chomp).each do |line| + if line.match? /^#/ or line.empty? + codeowners.puts line + next + end + + if line == '*' + codeowners.puts [line, '@baltzell', '@raffaelladevita', '@c-dilks'].join(' ') + next + end + + puts line + these_authors = [] + file_list = `git ls-files #{line.sub /\/\*$/, ''}`.split "\n" + file_list.each do |file| + puts " - #{file}" + authors = `git shortlog -s -n -- '#{file}'`.split("\n").map do |line| + "<" + line.split(' ')[1..-1].join(' ') + ">" + end + handles = authors.map do |author| + handle = GithubHandles[author] + if handle != '' + "@#{handle}" + else + unknown_authors << author + author + end + end.reject{|h|h.match?(/dependabot/)} + these_authors += handles + end + codeowners.puts "#{line.gsub(' ','\ ')} #{these_authors.uniq.join(' ')}" + +end + +unless unknown_authors.empty? + $stderr.puts "WARNING: the following authors have unknown GitHub handles:" + $stderr.puts unknown_authors.uniq.sort +end + +codeowners.close diff --git a/.github/codeowners/main_dirs.txt b/.github/codeowners/main_dirs.txt new file mode 100644 index 000000000..5dbed7793 --- /dev/null +++ b/.github/codeowners/main_dirs.txt @@ -0,0 +1,97 @@ +# primary maintainers +* + +# infrastructure +.github/* +bin/* +docs/* +external-dependencies/* +libexec/* +parent/* + +# common-tools +common-tools/clara-io/* +common-tools/clas-analysis/* +common-tools/clas-io/* +common-tools/clas-jcsg/* +common-tools/clas-logging/* +common-tools/clas-math/* +common-tools/clas-physics/* +common-tools/clas-reco/* +common-tools/clas-tracking/* +common-tools/clas-utils/* +common-tools/cnuphys/* +common-tools/coat-lib/* +common-tools/parent/* +common-tools/swim-tools/* + +# common-tools / clas-detector +common-tools/clas-detector/src/main/java/org/jlab/detector/banks/* +common-tools/clas-detector/src/main/java/org/jlab/detector/base/* +common-tools/clas-detector/src/main/java/org/jlab/detector/calib/* +common-tools/clas-detector/src/main/java/org/jlab/detector/decode/* +common-tools/clas-detector/src/main/java/org/jlab/detector/epics/* +common-tools/clas-detector/src/main/java/org/jlab/detector/examples/* +common-tools/clas-detector/src/main/java/org/jlab/detector/helicity/* +common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/* +common-tools/clas-detector/src/main/java/org/jlab/detector/swaps/* +common-tools/clas-detector/src/main/java/org/jlab/detector/view/* +common-tools/clas-detector/src/test/* + +# common-tools / clas-geometry +common-tools/clas-geometry/src/main/java/org/jlab/detector/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/abs/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/base/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/component/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/bst/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/cnd/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/dc/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ec/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/fmt/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ft/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ftof/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/fx/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/geant/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/gemc/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/gui/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/prim/* +common-tools/clas-geometry/src/main/java/org/jlab/geom/view/* + +# etc +etc/bankdefs/* +etc/benchmarks/* +etc/data/* +etc/ejml/* +etc/logging/* +etc/nnet/* +etc/services/* + +# reconstruction +reconstruction/alert/* +reconstruction/band/* +reconstruction/bg/* +reconstruction/cnd/* +reconstruction/cvt/* +reconstruction/dc/* +reconstruction/eb/* +reconstruction/ec/* +reconstruction/ec/src/* +reconstruction/fmt/* +reconstruction/ft/* +reconstruction/htcc/* +reconstruction/ltcc/* +reconstruction/mc/* +reconstruction/mltn/* +reconstruction/postproc/* +reconstruction/raster/* +reconstruction/rich/* +reconstruction/rtpc/* +reconstruction/swaps/* +reconstruction/tof/* +reconstruction/urwell/* +reconstruction/vtx/* + +# validation +validation/* diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..4a1d48066 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,97 @@ +# primary maintainers +* @baltzell @raffaelladevita @c-dilks + +# infrastructure +.github/* @c-dilks @baltzell +bin/* @c-dilks @baltzell @raffaelladevita @naharrison @zieglerv @gavalian @jwgibbs +docs/* @c-dilks @baltzell +external-dependencies/* @baltzell +libexec/* @c-dilks +parent/* @raffaelladevita @baltzell @c-dilks @naharrison @zieglerv + +# common-tools +common-tools/clara-io/* @baltzell @raffaelladevita +common-tools/clas-analysis/* @raffaelladevita @baltzell @naharrison @zieglerv @marmstr4 +common-tools/clas-io/* @raffaelladevita @baltzell @gavalian @naharrison @zieglerv @forcar @drewkenjo @huckb +common-tools/clas-jcsg/* @drewkenjo @naharrison @raffaelladevita @baltzell @zieglerv @gangel85 @mcontalb @cqplatt @mariangela-bondi @gavalian @cpecar +common-tools/clas-logging/* @baltzell @raffaelladevita +common-tools/clas-math/* @raffaelladevita @baltzell @zieglerv @tongtongcao +common-tools/clas-physics/* @raffaelladevita @baltzell @naharrison @zieglerv @drewkenjo @gavalian @fxgirod +common-tools/clas-reco/* @raffaelladevita @baltzell @naharrison @zieglerv @josnewton @mcontalb @gavalian @afilippi67 @N-Plx @drewkenjo @rafopar @gurjyan @dcpayette @hauenst +common-tools/clas-tracking/* @zieglerv @baltzell @raffaelladevita @tongtongcao +common-tools/clas-utils/* @raffaelladevita @baltzell @naharrison @zieglerv @gavalian +common-tools/cnuphys/* @heddle @naharrison @raffaelladevita @baltzell @zieglerv @tongtongcao +common-tools/coat-lib/* @raffaelladevita @baltzell @gavalian @naharrison @zieglerv @drewkenjo +common-tools/parent/* @raffaelladevita @baltzell @naharrison @zieglerv +common-tools/swim-tools/* @raffaelladevita @baltzell @zieglerv @heddle @tongtongcao @gurjyan + +# common-tools / clas-detector +common-tools/clas-detector/src/main/java/org/jlab/detector/banks/* @baltzell @raffaelladevita +common-tools/clas-detector/src/main/java/org/jlab/detector/base/* @naharrison @baltzell @raffaelladevita @afilippi67 @forcar @mcontalb @zieglerv @drewkenjo +common-tools/clas-detector/src/main/java/org/jlab/detector/calib/* @naharrison @baltzell @gavalian @raffaelladevita +common-tools/clas-detector/src/main/java/org/jlab/detector/decode/* @baltzell @raffaelladevita @gavalian @drewkenjo @naharrison @forcar @mdefurne @zieglerv @fbossu @mholtrop @fxgirod @Guillaum-C +common-tools/clas-detector/src/main/java/org/jlab/detector/epics/* @raffaelladevita +common-tools/clas-detector/src/main/java/org/jlab/detector/examples/* @raffaelladevita @naharrison @gavalian @baltzell +common-tools/clas-detector/src/main/java/org/jlab/detector/helicity/* @baltzell @raffaelladevita +common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/* @baltzell +common-tools/clas-detector/src/main/java/org/jlab/detector/swaps/* @baltzell +common-tools/clas-detector/src/main/java/org/jlab/detector/view/* @naharrison @drewkenjo +common-tools/clas-detector/src/test/* @naharrison + +# common-tools / clas-geometry +common-tools/clas-geometry/src/main/java/org/jlab/detector/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/abs/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/base/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/component/* @naharrison @raffaelladevita +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/* @mathieuouillon @naharrison @raffaelladevita @gavalian +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/alert/* @mathieuouillon +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/bst/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/cnd/* @naharrison @raffaelladevita +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/dc/* @gavalian @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ec/* @naharrison @raffaelladevita +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/fmt/* @raffaelladevita +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ft/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/detector/ftof/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/fx/* @baltzell +common-tools/clas-geometry/src/main/java/org/jlab/geom/geant/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/gemc/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/gui/* @naharrison +common-tools/clas-geometry/src/main/java/org/jlab/geom/prim/* @naharrison @zieglerv @raffaelladevita @baltzell @gavalian @mcontalb +common-tools/clas-geometry/src/main/java/org/jlab/geom/view/* @naharrison + +# etc +etc/bankdefs/* @hauenst @naharrison @raffaelladevita @zieglerv @gavalian @fxgirod @gangel85 @dcpayette @baltzell @drewkenjo @josnewton @afilippi67 @markovnick @rafopar @mathieuouillon @mpaolone @huckb @ajhobart @N-Plx @tongtongcao @forcar @mcontalb @rtysonCLAS12 +etc/benchmarks/* @naharrison +etc/data/* @drewkenjo +etc/ejml/* @raffaelladevita @gavalian +etc/logging/* @baltzell +etc/nnet/* @gavalian +etc/services/* @baltzell @raffaelladevita @zieglerv + +# reconstruction +reconstruction/alert/* @baltzell @raffaelladevita @mathieuouillon @mpaolone @efuchey +reconstruction/band/* @raffaelladevita @baltzell @zieglerv @hauenst +reconstruction/bg/* @baltzell @raffaelladevita +reconstruction/cnd/* @raffaelladevita @baltzell @naharrison @zieglerv @PChatagnon @ajhobart +reconstruction/cvt/* @zieglerv @raffaelladevita @baltzell @naharrison @drewkenjo @fbossu @N-Plx @Guillaum-C +reconstruction/dc/* @naharrison @raffaelladevita @baltzell @zieglerv @drewkenjo @tongtongcao @gurjyan @mcontalb @hauenst @latifkabir @gavalian @bleaktwig @N-Plx @marmstr4 +reconstruction/eb/* @baltzell @naharrison @raffaelladevita @sly2j @zieglerv @josnewton +reconstruction/ec/* @naharrison @raffaelladevita @baltzell @zieglerv @forcar @gavalian @rafopar +reconstruction/ec/src/* @forcar @naharrison @raffaelladevita @baltzell @gavalian @rafopar +reconstruction/fmt/* @baltzell @raffaelladevita +reconstruction/ft/* @naharrison @raffaelladevita @baltzell @zieglerv @afilippi67 +reconstruction/htcc/* @raffaelladevita @baltzell @naharrison @zieglerv @markovnick +reconstruction/ltcc/* @naharrison @raffaelladevita @baltzell @zieglerv @sly2j +reconstruction/mc/* @baltzell @raffaelladevita @rafopar @zieglerv +reconstruction/mltn/* @baltzell @raffaelladevita @gavalian +reconstruction/postproc/* @baltzell +reconstruction/raster/* @baltzell @raffaelladevita @N-Plx +reconstruction/rich/* @drewkenjo @raffaelladevita @baltzell @naharrison @zieglerv @mcontalb +reconstruction/rtpc/* @dcpayette @raffaelladevita @baltzell @mathieuouillon @zieglerv @Hattawy @dpayette +reconstruction/swaps/* @baltzell @raffaelladevita +reconstruction/tof/* @naharrison @zieglerv @raffaelladevita @baltzell @drewkenjo @gavalian +reconstruction/urwell/* @baltzell @raffaelladevita @tongtongcao +reconstruction/vtx/* @baltzell @raffaelladevita @zieglerv + +# validation +validation/* @baltzell @naharrison @raffaelladevita @c-dilks @gurjyan @zieglerv