[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70855] [PATCH 27/92] gnu: dynaconf: Improve package style.
From: |
Nicolas Graves |
Subject: |
[bug#70855] [PATCH 27/92] gnu: dynaconf: Improve package style. |
Date: |
Fri, 10 May 2024 00:53:22 +0200 |
* 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))
--
2.41.0
- [bug#70855] [PATCH 31/92] gnu: python-nbval: Move to pyproject-build-system., (continued)
- [bug#70855] [PATCH 31/92] gnu: python-nbval: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 33/92] gnu: python-pytest-runner: Improve package style., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 38/92] gnu: behave: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 34/92] gnu: gunicorn: Update to 21.2.0., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 35/92] gnu: python-unidecode: Update to 1.3.8., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 37/92] gnu: python-tinycss: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 14/92] gnu: Add ghc-language-python., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 15/92] gnu: python-xcffib: Move to (gnu packages xorg)., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 20/92] gnu: python-alembic: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 22/92] gnu: conda: Reindent., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 27/92] gnu: dynaconf: Improve package style.,
Nicolas Graves <=
- [bug#70855] [PATCH 28/92] gnu: zulip-term: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 36/92] gnu: python-cbor2: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 23/92] gnu: python-conda-package-handling: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 25/92] gnu: gunicorn: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 26/92] gnu: python-arrow: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 39/92] gnu: python-cucumber-tag-expressions: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 40/92] gnu: python-flask-login: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 41/92] gnu: python-parse-type: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 42/92] gnu: python-amqp: Move to pyproject-build-system., Nicolas Graves, 2024/05/09
- [bug#70855] [PATCH 44/92] gnu: python-sphinx: Ignore failing tests., Nicolas Graves, 2024/05/09