From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iPOvEOhy5F5XNgAA0tVLHw (envelope-from ) for ; Sat, 13 Jun 2020 06:32:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6ND+C+hy5F7CNQAA1q6Kng (envelope-from ) for ; Sat, 13 Jun 2020 06:32:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D0B9A9404D7 for ; Sat, 13 Jun 2020 06:32:07 +0000 (UTC) Received: from localhost ([::1]:53224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjzi2-0008M3-QL for larch@yhetil.org; Sat, 13 Jun 2020 02:32:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjzhj-0008Lu-CW for guix-devel@gnu.org; Sat, 13 Jun 2020 02:31:47 -0400 Received: from sender4-op-o10.zoho.com ([136.143.188.10]:17016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjzhf-0002C4-Cv for guix-devel@gnu.org; Sat, 13 Jun 2020 02:31:47 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1592029900; cv=none; d=zohomail.com; s=zohoarc; b=SvlPJ0qf33u0ZTVkqviOYElpZSSjEv/0vDTFoO9FGaA9LZ3DPoOYllsK2NPyL+6Y9RahYva3dd8jr8ezd4DwhQ4aNU9gblLm9yrioO3TL0Gy72UvSVJGFNwAypoLHN5NHbhCGbvvM0/rrz69RS3J2qqd8I2RtcBjXH5CoEAT2Is= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592029900; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=671FdHsGvD6HVUItCE0cJ8Zdl+4gfkMBptCxCDEOhkg=; b=cX+OY8ggrtdrffOYKW10/PZoU/Z4e9i112uEsyQADCXoNiT+1Yk/323izzi3lNKK/zdse+n5H+OPrWYH9wOYaWlGAKismL7WKVHago/zhOJHoSiIKMUgSHHFPfiFdKBkJU3LsoA9TIMIzTz3NFoAu7SRHnLDKkIOg7JwE+3/CYA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1592029900; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=References:From:To:Subject:In-reply-to:Message-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=671FdHsGvD6HVUItCE0cJ8Zdl+4gfkMBptCxCDEOhkg=; b=QpXOuWthS3fs8SMEQlxJX00CGqY3EoXkcboH34LXcXSQb98SpA1Ty4/SlpnVAaUQ h7B8xYBLT8G8xgHLfpPoSAWG22EdlPwfQQRLsHC/fqBxrRXTWJUEUNejHEHYVnIkvMu 2TdXTmkKwLTy3S1BstjJPSrVUIddgcyImj6L2Y4U= Received: from Rasoir (lfbn-idf1-1-1299-119.w90-79.abo.wanadoo.fr [90.79.23.119]) by mx.zohomail.com with SMTPS id 1592029897120192.34957213833184; Fri, 12 Jun 2020 23:31:37 -0700 (PDT) References: <87pna3ewlh.fsf@elephly.net> User-agent: mu4e 1.4.4; emacs 26.3 From: Edouard Klein To: guix-devel@gnu.org Subject: Re: generate commit messages for package updates In-reply-to: <87pna3ewlh.fsf@elephly.net> Message-ID: <87366zzdc3.fsf@rdklein.fr> Date: Sat, 13 Jun 2020 08:31:24 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.10; envelope-from=edk@beaver-labs.com; helo=sender4-op-o10.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/13 02:31:41 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=beaver-labs.com header.s=zoho header.b=QpXOuWth; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -2.21 X-TUID: SmB41WQikHPY Thank you Ricardo ! Writing commit messages by hand is a major pain, especially for newcommers like me. For simple commits it took me more time to write the message than to write the code. The mistakes I made writing the commit messages made the reviewers lose time correcting them. Automating this task away is exactly what we need :) Ricardo Wurmus writes: > Hi Guix, > > I=E2=80=99m currently working on upgrading all Bioconductor packages to t= he 3.11 > release. The hardest work here is to write commit messages for the 200+ > packages that have changed. Even with the =E2=80=9Cupdate=E2=80=9D yasni= ppet and magit > this takes a very long time. > > I wrote a little tool to reduce the amount of time needed to create > commits. It is not fully automatic yet as it requires my input to stage > hunks, but the commit messages it produces take all input changes into > account, which is something the =E2=80=9Cupdate=E2=80=9D yasnippet does n= ot do. > > After =E2=80=9Cguix refresh -t bioconductor -u=E2=80=9D, manually verifyi= ng and > implementing the suggested changes, and building all packages, I run > =E2=80=9Cgit add -p=E2=80=9D to stage hunks that belong to the same packa= ge definition. > Then I run the attached tool to make a commit: > > ./committer.scm | git commit -F - > > The tool works by looking at the unified diff in the staging area and > generating two S-expressions corresponding to the original package > definition and the changed package definition, respectively. It then > looks at the inputs, propagated-inputs, and native-inputs fields and > generates a GNU ChangeLog-style commit message describing the changes. > > Here=E2=80=99s an example diff: > > --8<---------------cut here---------------start------------->8--- > modified gnu/packages/bioconductor.scm > @@ -2701,29 +2701,32 @@ gene and isoform level using RNA-seq data") > (define-public r-karyoploter > (package > (name "r-karyoploter") > - (version "1.12.4") > + (version "1.14.0") > (source (origin > (method url-fetch) > (uri (bioconductor-uri "karyoploteR" version)) > (sha256 > (base32 > - "03jmfgmw35hrgn3pc5lq6pblzhfx9fp4l6dx50rp303lr7kjxp9v"))= )) > + "0h0gk4xd95k5phy6qcsv7j931d7gk3p24i2fg4mz5dsk110lpifs"))= )) > (build-system r-build-system) > (propagated-inputs > - `(("r-regioner" ,r-regioner) > + `(("r-annotationdbi" ,r-annotationdbi) > + ("r-bamsignals" ,r-bamsignals) > + ("r-bezier" ,r-bezier) > + ("r-biovizbase" ,r-biovizbase) > + ("r-digest" ,r-digest) > + ("r-genomeinfodb" ,r-genomeinfodb) > + ("r-genomicfeatures" ,r-genomicfeatures) > ("r-genomicranges" ,r-genomicranges) > ("r-iranges" ,r-iranges) > - ("r-rsamtools" ,r-rsamtools) > ("r-memoise" ,r-memoise) > + ("r-regioner" ,r-regioner) > + ("r-rsamtools" ,r-rsamtools) > ("r-rtracklayer" ,r-rtracklayer) > - ("r-genomeinfodb" ,r-genomeinfodb) > ("r-s4vectors" ,r-s4vectors) > - ("r-biovizbase" ,r-biovizbase) > - ("r-digest" ,r-digest) > - ("r-bezier" ,r-bezier) > - ("r-bamsignals" ,r-bamsignals) > - ("r-annotationdbi" ,r-annotationdbi) > ("r-variantannotation" ,r-variantannotation))) > + (native-inputs > + `(("r-knitr" ,r-knitr))) > (home-page "https://bioconductor.org/packages/karyoploteR/") > (synopsis "Plot customizable linear genomes displaying arbitrary dat= a") > (description "This package creates karyotype plots of arbitrary geno= mes and > --8<---------------cut here---------------end--------------->8--- > > =E2=80=A6and this is the generated commit message: > > --8<---------------cut here---------------start------------->8--- > gnu: r-karyoploter: Update to 1.14.0. > > * gnu/packages/bioconductor.scm (r-karyoploter): Update to 1.14.0. > [propagated-inputs]: Add r-genomicfeatures. > [native-inputs]: Add r-knitr. > --8<---------------cut here---------------end--------------->8--- > > Obviously, this can be improved by avoiding the staging area and > operating on all hunks in all selected files, so that more than one > commit can be made at a time. But I thought I=E2=80=99d share this hack = anyway, > crude as it is.