Message ID | cover.1721411923.git.zimon.toutoune@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1044C27BBEA; Fri, 19 Jul 2024 19:29:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2531727BBE2 for <patchwork@mira.cbaines.net>; Fri, 19 Jul 2024 19:29:15 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1sUsLo-0004jr-OY; Fri, 19 Jul 2024 14:29:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sUsLn-0004da-2w for guix-patches@gnu.org; Fri, 19 Jul 2024 14:29:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sUsLm-0008Qt-QF; Fri, 19 Jul 2024 14:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1sUsLl-0006KU-Ny; Fri, 19 Jul 2024 14:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71697] [PATCH v5 0/3] Add dry-run to guix lint References: <8cb162bcde91d3b39453de576caadb9a6f8f8733.1718990517.git.zimon.toutoune@gmail.com> In-Reply-To: <8cb162bcde91d3b39453de576caadb9a6f8f8733.1718990517.git.zimon.toutoune@gmail.com> Resent-From: Simon Tournier <zimon.toutoune@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 19 Jul 2024 18:29:01 +0000 Resent-Message-ID: <handler.71697.B71697.172141369924285@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71697 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Simon Tournier <zimon.toutoune@gmail.com> Cc: Josselin Poiret <dev@jpoiret.xyz>, Maxim Cournoyer <maxim.cournoyer@gmail.com>, Mathieu Othacehe <othacehe@gnu.org>, Tobias Geerinckx-Rice <me@tobias.gr>, Florian Pelz <pelzflorian@pelzflorian.de>, 71697@debbugs.gnu.org, Christopher Baines <guix@cbaines.net>, Matthew Trzcinski <matt@excalamus.com>, Christopher Baines <guix@cbaines.net>, Josselin Poiret <dev@jpoiret.xyz>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr> X-Debbugs-Original-Xcc: Christopher Baines <guix@cbaines.net>, Josselin Poiret <dev@jpoiret.xyz>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr> Received: via spool by 71697-submit@debbugs.gnu.org id=B71697.172141369924285 (code B ref 71697); Fri, 19 Jul 2024 18:29:01 +0000 Received: (at 71697) by debbugs.gnu.org; 19 Jul 2024 18:28:19 +0000 Received: from localhost ([127.0.0.1]:50851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1sUsL5-0006Jd-8Z for submit@debbugs.gnu.org; Fri, 19 Jul 2024 14:28:19 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:40945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zimon.toutoune@gmail.com>) id 1sUsL2-0006JT-VQ for 71697@debbugs.gnu.org; Fri, 19 Jul 2024 14:28:17 -0400 Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-36872b6d9bcso52362f8f.3 for <71697@debbugs.gnu.org>; Fri, 19 Jul 2024 11:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721413637; x=1722018437; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jEF8Hd+i38hiDWULF7NlfngRbMXURrQ28+eEUtsHllQ=; b=X25MLN41yaeQgaMOkbuUwF2WQuPaHGK+dowBRu/Yai0GsGj5cb9QdGD6OsHn+NUUbr W9wx5GDzyzp5s9SWH1QX05vFeUX9ChJztFOBZlj2JaFOUXy8pC3hnwNblBRrFC5myQu+ cRv6s0YOxUShoKhWfmy/gn7y3OAwg2hAtAUqJp3QKVMpKaUL0D4oxtTmRR/SJIHfO7j+ ZEFxfBBTFHNmoWJvBkoatLb+vdsrQtkx61cAQLcKsPkx5PLn8EwWB3dcaFGOX0s6gu9q Albd6FKMbrSVFcfPS2YcUkcuOdPezljQr023lxAiJbkM+P9ElpE3JrLi/rYitqKnRD5F huSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721413637; x=1722018437; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jEF8Hd+i38hiDWULF7NlfngRbMXURrQ28+eEUtsHllQ=; b=CbHNSI6H3s2l9RXngwWPiGrbpWyyx0VIku0Th77JgFhyRZcNfzbX6td0I6CPJc9r5h J0bHKg0s9CuW7F4bMhUxFjqLQ9hUgk+AnRL3y6Ddz8bPD6yfG7u2/c8Xk31w95uQgszf UgPaVUf0kAMtwLpS8v0EVk/70tvIChp8oJ1Ws98cOwzpNtPOuYmVr614ceGDChxPqmxz UQwp0dI1neO2rQfIuguIUimvSQdvojU/o4YoU0fV9j0Y3KDFW8P+BGzcJBm0Xkb/EEBU PnLDSdxl9uBravvyVs1SQPYVzWLCQgjz55eibREkZY8rETJcEOsCt3ubbB53DoHXrCpw BTag== X-Forwarded-Encrypted: i=1; AJvYcCVMtCDNMLgKZzevvjtE2HJ/zYHK9bhxboneXWV55RYI7wido7qsUwqwXODZUrUoYoL+9Bhmah2zjwzfkeNVt/MA9eewZHw= X-Gm-Message-State: AOJu0YzAZeaeHgf7404t07WsjvVOezamFdlgv+PhTWZALT/2eVZeHeaM YfNqUR8kwpxbGL3/+QVTEa6zEPEoLZytFSeJrSZk2hbFIFZoFVK4 X-Google-Smtp-Source: AGHT+IHNjnfNHOpXF/vCrXiYQs4cSU7CLPNcD4YSu0YOkapuEe/Xwrvz1A4zINR3xtr9VDUU9do2kQ== X-Received: by 2002:a05:6000:4013:b0:367:90a8:4d3b with SMTP id ffacd0b85a97d-369b675c4bamr164924f8f.3.1721413636452; Fri, 19 Jul 2024 11:27:16 -0700 (PDT) Received: from lili.univ-paris-diderot.fr (roam-nat-fw-prg-194-254-61-40.net.univ-paris-diderot.fr. [194.254.61.40]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d68fa09bsm34588345e9.7.2024.07.19.11.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jul 2024 11:27:16 -0700 (PDT) From: Simon Tournier <zimon.toutoune@gmail.com> Date: Fri, 19 Jul 2024 20:27:04 +0200 Message-ID: <cover.1721411923.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Commit Message
Simon Tournier
July 19, 2024, 6:27 p.m. UTC
Hi, Examples are probably better than many words. :-) --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix lint --dry-run guix lint: error: too much information to display, did nothing and exit $ ./pre-inst-env guix lint --dry-run hello gnu/packages/base.scm:94:2: hello@2.12.1: all the 27 checkers would run. $ ./pre-inst-env guix lint --dry-run hello -c derivation gnu/packages/base.scm:94:2: hello@2.12.1: 1/27 checkers would run: derivation. $ ./pre-inst-env guix lint --dry-run hello -n gnu/packages/base.scm:94:2: hello@2.12.1: 18/27 checkers would run at the exclusion of: archival cve github-url gnu-description haskell-stackage home-page refresh source synopsis. $ ./pre-inst-env guix lint --dry-run hello -c derivation -x derivation gnu/packages/base.scm:94:2: hello@2.12.1: none of 27 checkers would run $ # Using modified package with the new package properties $ ./pre-inst-env guix lint --dry-run hello python-scikit-learn -x cve gnu/packages/base.scm:94:2: hello@2.12.1: 26/27 checkers would run at the exclusion of: cve. gnu/packages/machine-learning.scm:1723:2: python-scikit-learn@1.4.2: 23/27 checkers would run at the exclusion of: archival cve name synopsis. --8<---------------cut here---------------end--------------->8--- I think it addresses all the comments. The idea is to display the most relevant information, i.e., the message displays the shortest list of checkers between the excluded ones and the others, because, IMHO, it eases to get what would run. --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix lint --dry-run hello -c name,tests-true,compiler-for-target,description,inputs-should-be-native,inputs-should-not-be-input,input-labels,wrapper-inputs,license,optional-tests,mirror-url,source-file-name,source-unstable-tarball,profile-collisions,patch-file-names,patch-headers,formatting,synopsis,gnu-description,home-page,source,github-url,cve,refresh,archival,haskell-stackage gnu/packages/base.scm:94:2: hello@2.12.1: 26/27 checkers would run at the exclusion of: derivation. --8<---------------cut here---------------end--------------->8--- Well, since I did some typo when testing, the last patch of the series is included for the same price. ;-) --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix lint -c dervation guix lint: error: dervation: invalid checker hint: Did you mean `derivation'? --8<---------------cut here---------------end--------------->8--- WDYT? Cheers, simon --8<---------------cut here---------------start------------->8--- --8<---------------cut here---------------end--------------->8--- Simon Tournier (3): scripts: lint: Add 'dry-run' option. scripts: lint: Honor package property to exclude checkers. scripts: lint: Add hint for checker typo. doc/guix.texi | 19 +++++++++- guix/scripts/lint.scm | 81 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 92 insertions(+), 8 deletions(-) base-commit: 9724e61cda80e4c59a2eb419a453887ecc551b9a
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 34dc5c8d26..cbebc6494e 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1775,6 +1775,7 @@ (define-public python-scikit-learn python-pytest-xdist)) (propagated-inputs (list python-numpy python-threadpoolctl python-scipy python-joblib)) + (properties '((lint-excluded-checkers . (archival name synopsis)))) (home-page "https://scikit-learn.org/") (synopsis "Machine Learning in Python") (description