From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4681C10EADB for ; Wed, 2 Mar 2022 12:56:48 +0000 (UTC) From: Jani Nikula To: Petri Latvala In-Reply-To: References: <20220131142818.2686782-1-Rodrigo.Siqueira@amd.com> <20220131142818.2686782-2-Rodrigo.Siqueira@amd.com> <3af10091-6a1f-0d13-944f-7f7833837e1e@amd.com> <87sfsurh88.fsf@intel.com> Date: Wed, 02 Mar 2022 14:56:41 +0200 Message-ID: <87bkyo5x86.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: [igt-dev] [RFC i-g-t 1/1] MAINTAINERS: Introduce MAINTAINERS file List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Qingqing Zhuo , igt-dev@lists.freedesktop.org, Sean Paul , Rodrigo Siqueira Jordao , Bhawanpreet Lakha , Mark Yacoub Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: --=-=-= Content-Type: text/plain On Wed, 02 Mar 2022, Petri Latvala wrote: > On Mon, Feb 07, 2022 at 02:31:03PM +0200, Jani Nikula wrote: >> FWIW, if I were to do this, I'd do it in yaml and implement it in >> python+strictyaml with a schema. No need to import a monster perl parser >> from kernel or implement our own. > > I really like this suggestion. The perl script from kernel is > completely overkill for IGT purposes where it would be mostly (or > 100%) used to collect Cc fields to patches for people volunteering for > doing review. Last week I hacked a bit on what my suggestion would look like, but decided I really don't have time for this. Anyway, attached is what I put together in less than an hour in case anyone wants to pick it up from here. You'll need strictyaml and whatthepatch from pip. The latter could perhaps be replaced with something better but it fit the bill now and it took only minutes to start using. Using strictyaml with a schema is a really powerful tool here. Put the attachments in igt root (they're not even patches, sorry), and try: $ ./maintainers.py some-igt.patch The MAINTAINERS used here is just a conversion from some earlier patch, don't put too much weight on the content, rather the format. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=MAINTAINERS KMS Generic API tests: Reviewers: - Rodrigo Siqueira - Qingqing Zhuo (Lilian) - Aurabindo Pillai Files: - tests/kms_atomic.c - tests/kms_atomic_interruptible.c - tests/kms_atomic_transition.c - tests/kms_properties.c - tests/kms_setmode.c - tests/kms_concurrent.c - tests/kms_prop_blob.c - tests/kms_multipipe_modeset.c KMS CRC API: Reviewers: - Rodrigo Siqueira - Sunpeng Li (Leo) - Dingchen Zhang (David) - Melissa Wen Files: - tests/kms_cursor_crc.c - tests/kms_pipe_crc_basic.c - tests/kms_rotation_crc.c KMS HDR: Reviewers: - Bhawanpreet Lakha KMS Color: Reviewers: - Stylon Wang - Bhawanpreet Lakha - Sunpeng Li (Leo) Files: - tests/kms_color.c KMS Content protection: Reviewers: - Dingchen Zhang (David) - Bhawanpreet Lakha Files: - tests/kms_content_protection.c KMS Cursor tests: Reviewers: - Rodrigo Siqueira - Nicholas Kazlauskas Files: - tests/kms_cursor_legacy.c - tests/kms_cursor_edge_walk.c - tests/kms_plane_cursor.c - tests/kms_plane_alpha_blend.c VRR tests: Reviewers: - Stylon Wang - Wayne Lin - Solomon Chiu - Aurabindo Pillai - Nicholas Kazlauskas Status: Maintained Files: - tests/kms_vrr.c KMS Vblank tests: Reviewers: - Aurabindo Pillai - Rodrigo Siqueira Status: Maintained Files: - tests/kms_vblank.c KMS Flip tests: Reviewers: - Aurabindo Pillai - Rodrigo Siqueira Status: Maintained Files: - tests/kms_flip.c - tests/kms_flip_event_leak.c KMS plane tests: Reviewers: - Bhawanpreet Lakha - Rodrigo Siqueira - Stylon Wang Status: Maintained Files: - tests/kms_plane.c - tests/kms_plane_scaling.c KMS Bandwidth: Reviewers: - Aurabindo Pillai Files: - tests/kms_bw.c AMDGPU: Maintainers: - Rodrigo Siqueira - Stylon Wang - Wayne Lin Status: Maintained Files: - tests/amdgpu/* AMDGPU AMD Plane: Maintainers: - Bhawanpreet Lakha Files: - tests/amdgpu/amd_plane.c AMDGPU AMD Link: Maintainers: - Bhawanpreet Lakha Files: - tests/amdgpu/amd_link_settings.c - tests/amdgpu/amd_dp_dsc.c - tests/amdgpu/amd_hotplug.c AMDGPU AMD Color: Maintainers: - Stylon Wang Reviewers: - Sunpeng Li (Leo) - Nicholas Kazlauskas Files: - tests/amdgpu/amd_color.c - tests/amdgpu/amd_max_bpc.c AMDGPU AMD content protection: Maintainers: - Stylon Wang Reviewers: - Bhawanpreet Lakha Files: - tests/amdgpu/amd_assr.c AMDGPU VRR/Freesync: Maintainers: - Stylon Wang - Solomon Chiu Reviewers: - Nicholas Kazlauskas - Aurabindo Pillai Files: - tests/amdgpu/amd_vrr_range.c All KMS tests: Reviewers: - Mark Yacoub Files: - tests/kms_* V3D tests: Reviewers: - Melissa Wen Files: - tests/v3d_* THE REST: Maintainers: - Arkadiusz Hiler - Petri Latvala Lists: - igt-dev@lists.freedesktop.org Issue Trackers: - https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues Patch Trackers: - https://patchwork.freedesktop.org/project/igt/series/?ordering=-last_updated Repositories: - git@gitlab.freedesktop.org:drm/igt-gpu-tools.git Files: - "*" - "*/" --=-=-= Content-Type: text/x-python Content-Disposition: attachment; filename=maintainers.py #!/usr/bin/env python3 import fnmatch import itertools import sys import strictyaml import whatthepatch maintainers_schema = strictyaml.MapPattern(strictyaml.Str(), strictyaml.Map({ strictyaml.Optional('Status'): strictyaml.Enum(["Supported", "Maintained"]), strictyaml.Optional('Maintainers'): strictyaml.Seq(strictyaml.Email()), strictyaml.Optional('Reviewers'): strictyaml.Seq(strictyaml.Email()), strictyaml.Optional('Lists'): strictyaml.Seq(strictyaml.Email()), strictyaml.Optional('Issue Trackers'): strictyaml.Seq(strictyaml.Url()), strictyaml.Optional('Patch Trackers'): strictyaml.Seq(strictyaml.Url()), strictyaml.Optional('Repositories'): strictyaml.Seq(strictyaml.Str()), strictyaml.Optional('Files'): strictyaml.Seq(strictyaml.Str()), })) with open('MAINTAINERS') as f: maintainers = strictyaml.load(f.read(), maintainers_schema).data with open(sys.argv[1]) as f: patch_files = list(set(itertools.chain.from_iterable((diff.header.old_path, diff.header.new_path) for diff in whatthepatch.parse_patch(f.read())))) for filename in patch_files: for k, v in maintainers.items(): for pattern in v.get('Files', []): if fnmatch.fnmatch(filename, pattern): print(f'{k}: {pattern} matches') --=-=-=--