[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
160/361: gnu: dynaconf: Improve package style.
From: |
guix-commits |
Subject: |
160/361: gnu: dynaconf: Improve package style. |
Date: |
Thu, 21 Nov 2024 06:29:10 -0500 (EST) |
sharlatan pushed a commit to branch python-team
in repository guix.
commit a613f0cb1318eedfcb3bd8e01110d54fa164a2a0
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Fri May 10 00:53:22 2024 +0200
gnu: dynaconf: Improve package style.
* 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
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
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 2e9fe797cb..08672fa25d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -36302,43 +36302,29 @@ Python @code{set} interface.")
"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))
- 97/361: gnu: Add python-jupyter-server-terminals., (continued)
- 97/361: gnu: Add python-jupyter-server-terminals., guix-commits, 2024/11/21
- 109/361: gnu: python-cattrs: Update to 23.2.3., guix-commits, 2024/11/21
- 105/361: gnu: python-sparqlkernel: Patch install script., guix-commits, 2024/11/21
- 106/361: gnu: Add python-pathable., guix-commits, 2024/11/21
- 119/361: gnu: Add python-whatthepatch., guix-commits, 2024/11/21
- 141/361: gnu: python-mutagen: Move to pyproject-build-system., guix-commits, 2024/11/21
- 137/361: gnu: python-transient: Move to pyproject-build-system., guix-commits, 2024/11/21
- 138/361: gnu: python-black: Move to pyproject-build-system., guix-commits, 2024/11/21
- 143/361: gnu: python-zope-i18nmessageid: Update to 5.1.1., guix-commits, 2024/11/21
- 140/361: gnu: python-codespell: Improve package style., guix-commits, 2024/11/21
- 160/361: gnu: dynaconf: Improve package style.,
guix-commits <=
- 173/361: gnu: python-parse-type: Move to pyproject-build-system., guix-commits, 2024/11/21
- 251/361: gnu: behave: Update to 1.2.7.dev5., guix-commits, 2024/11/21
- 253/361: gnu: python-pooch: Adjust inputs., guix-commits, 2024/11/21
- 254/361: gnu: python-pycollada: Adjust inputs., guix-commits, 2024/11/21
- 256/361: gnu: python-sphinx-autodoc-typehints: Update to 1.23.0., guix-commits, 2024/11/21
- 276/361: gnu: python-accupy: Adjust inputs., guix-commits, 2024/11/21
- 295/361: gnu: python-distributed: Adjust inputs., guix-commits, 2024/11/21
- 70/361: gnu: Add python-fqdn., guix-commits, 2024/11/21
- 163/361: gnu: python-dateutil: Move to pyproject-build-system., guix-commits, 2024/11/21
- 218/361: gnu: python-cssselect2: Move to pyproject-build-system., guix-commits, 2024/11/21