From patchwork Thu May 9 22:53:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 27292 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 853A927BBF1; Thu, 9 May 2024 23:59:05 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 A661827BBE9 for ; Thu, 9 May 2024 23:59:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5Chp-0006Cv-Lw; Thu, 09 May 2024 18:57:41 -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 ) id 1s5ChS-0005vp-9M for guix-patches@gnu.org; Thu, 09 May 2024 18:57:18 -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 ) id 1s5ChQ-0006Sj-4I for guix-patches@gnu.org; Thu, 09 May 2024 18:57:16 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5ChO-0002hU-E6 for guix-patches@gnu.org; Thu, 09 May 2024 18:57:14 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70855] [PATCH 27/92] gnu: dynaconf: Improve package style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2024 22:57:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70855@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 70855-submit@debbugs.gnu.org id=B70855.171529541410046 (code B ref 70855); Thu, 09 May 2024 22:57:14 +0000 Received: (at 70855) by debbugs.gnu.org; 9 May 2024 22:56:54 +0000 Received: from localhost ([127.0.0.1]:41108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Ch3-0002bm-Du for submit@debbugs.gnu.org; Thu, 09 May 2024 18:56:53 -0400 Received: from 3.mo576.mail-out.ovh.net ([188.165.52.203]:35419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5Ch0-0002bF-KR for 70855@debbugs.gnu.org; Thu, 09 May 2024 18:56:51 -0400 Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.148.200]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 4Vb6pC0M51z1VXn for <70855@debbugs.gnu.org>; Thu, 9 May 2024 22:56:51 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-mztqc (unknown [10.110.168.247]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D8F331FD67; Thu, 9 May 2024 22:56:50 +0000 (UTC) Received: from ngraves.fr ([37.59.142.99]) by ghost-submission-6684bf9d7b-mztqc with ESMTPSA id RAS8M7JUPWZGiicA+sK0vw (envelope-from ); Thu, 09 May 2024 22:56:50 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-99G003c08a10b7-2c8d-412e-8579-d9843d30aa4e, E63BAB6C0A71DD4DA934779D5D345DF804807214) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Fri, 10 May 2024 00:53:22 +0200 Message-ID: <20240509225530.24649-27-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240509225530.24649-1-ngraves@ngraves.fr> References: <20240509225530.24649-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6103221922803933922 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdeffedgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjedtkeehheesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejiedpmhhouggvpehsmhhtphhouhht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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 * gnu/packages/python-xyz.scm (dynaconf): Improve package-style and ignore coverage tests. [origin](snippet): More concise snippet. Remove coverage management. [arguments]<#:test-flags>: Add arguments from former check replacement phase. <#:phases>: Remove check replacement phase. Change-Id: I2a0e0a8dea5000aecc05707c35d307c867c96709 --- gnu/packages/python-xyz.scm | 42 +++++++++++++------------------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b34af56a1db..0863ce8fa01 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -34900,43 +34900,29 @@ (define-public dynaconf "0fj2ffvzfvjf4d7f672h5x5fzq26f8hax9j3dfsix158fwm0212w")) (patches (search-patches "dynaconf-unvendor-deps.patch")) (modules '((guix build utils))) - (snippet '(begin - ;; Remove vendored dependencies - (let ((unvendor '("click" "dotenv" "ruamel" "toml"))) - (with-directory-excursion "dynaconf/vendor" - (for-each delete-file-recursively unvendor))) - ;; Lower coverage quality gate for unit tests - (substitute* ".coveragerc" - (("fail_under = 95") "fail_under = 50")))))) + ;; Remove vendored dependencies + (snippet '(let ((unvendor '("click" "dotenv" "ruamel" "toml"))) + (with-directory-excursion "dynaconf/vendor" + (for-each delete-file-recursively unvendor)))))) (build-system pyproject-build-system) (arguments `(#:test-flags - '("-k" - ,(let ((click-tests '("test_negative_get" - "test_inspect_invalid_format"))) - ;; Disable integration tests - (string-append "not integration and not " - ;; These tests fail because we use Click 8.* instead of - ;; Click 7 - (string-join click-tests " and not ")))) + '("--ignore=tests/test_vault.py" ; depend on hvac and a live Vault + "-k" ,(let ((click-tests '("test_negative_get" + "test_inspect_invalid_format"))) + ;; Disable integration tests + (string-append "not integration and not " + ;; These tests fail because we use Click 8.* + ;; instead of Click 7 + (string-join click-tests " and not "))) + "tests") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-for-click-8 (lambda _ (substitute* "dynaconf/cli.py" (("click.get_os_args\\()") ;deprecated from Click 8.1+ - "sys.argv[1:]")))) - (replace 'check - (lambda* (#:key tests? test-flags #:allow-other-keys) - (when tests? - ;; These tests depend on hvac and a live Vault process. - (delete-file "tests/test_vault.py") - (apply invoke - `("py.test" ,@test-flags "-v" - "--cov-config" ".coveragerc" - "--cov=dynaconf" - "-l" "--tb=short" - "--maxfail=1" "tests/")))))))) + "sys.argv[1:]"))))))) (propagated-inputs (list python-click python-configobj python-dotenv-0.13.0 python-ruamel.yaml-0.16 python-toml python-tomli))