aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2024-05-10 00:53:22 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-12-13 20:18:50 +0000
commit13728a610478714c6e4673fa0e4e036c71d8a107 (patch)
treeb76ef840d74a0759681a39badf97042b6f440280
parentc5de62092a4252ca106cb3c829a11ef36aa45a3f (diff)
downloadguix-13728a610478714c6e4673fa0e4e036c71d8a107.tar.gz
guix-13728a610478714c6e4673fa0e4e036c71d8a107.zip
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>
-rw-r--r--gnu/packages/python-xyz.scm42
1 files changed, 14 insertions, 28 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 14a5623af3..febada71ef 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -36409,43 +36409,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))