diff mbox series

[bug#66690,v2,3/8] gnu: python-schema-salad: Update to 8.5.20240102191335.

Message ID f20397e6cd488968c3d4a6e261ca3ee5db8c4ee1.1708029746.git.arunisaac@systemreboot.net
State New
Headers show
Series Upgrade cwltool | expand

Commit Message

Arun Isaac Feb. 15, 2024, 8:46 p.m. UTC
* gnu/packages/bioinformatics.scm (python-schema-salad): Update to
8.5.20240102191335.
[native-inputs]: Add python-pytest-xdist.
[propagated-inputs]: Add python-importlib-resources and
python-mypy-extensions. Remove python-lockfile, python-rdflib-jsonld and
python-typing-extensions. Replace python-mistune with python-mistune-next.
[arguments]: Use G-expressions. Set exact version number. Skip more tests that
require network access.

Change-Id: I4de4704f58f40fdf9bf4c02e41c2c353beaa3eb2
---
 gnu/packages/bioinformatics.scm | 61 ++++++++++++++++++++-------------
 1 file changed, 38 insertions(+), 23 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 84577ef760..75cfad51a6 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -5001,37 +5001,52 @@  (define-public python-pyfasta
 (define-public python-schema-salad
   (package
     (name "python-schema-salad")
-    (version "8.2.20211116214159")
+    (version "8.5.20240102191335")
     (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "schema-salad" version))
-       (sha256
-        (base32
-         "005dh2y45x92zl8sf2sqjmfvcqr4hrz8dfckgkckv87003v7lwqc"))))
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "schema-salad" version))
+        (sha256
+         (base32
+          "035202p696i3jylb8b3nm9qcxsqby15hhqn1dl4nrz73a17p0ckx"))))
     (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'check 'skip-failing-tests
-           (lambda _
-             ;; Skip tests that require network access.
-             (substitute* "schema_salad/tests/test_cwl11.py"
-               (("^def test_(secondaryFiles|outputBinding)" all)
-                (string-append "@pytest.mark.skip(reason="
-                               "\"test requires network access\")\n"
-                               all))))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-version
+            (lambda _
+              ;; Set exact version.
+              (substitute* "setup.py"
+                (("use_scm_version=True")
+                 (string-append "version=\"" #$version "\"")))))
+          (add-before 'check 'skip-failing-tests
+            (lambda _
+              ;; Skip tests that require network access.
+              (let ((skip-test
+                     (lambda (test-pattern)
+                       (string-append "@pytest.mark.skip(reason="
+                                      "\"test requires network access\")\n"
+                                      test-pattern))))
+                (substitute* "schema_salad/tests/test_cg.py"
+                  (("^def test_(load(_by_yaml_metaschema|_metaschema|_cwlschema|)|include|idmap|idmap2)\\(" all)
+                   (skip-test all)))
+                (substitute* "schema_salad/tests/test_cwl11.py"
+                  (("^def test_(secondaryFiles|outputBinding|yaml_tab_error)\\(" all)
+                   (skip-test all)))
+                (substitute* "schema_salad/tests/test_examples.py"
+                  (("^def test_bad_schemas\\(" all)
+                   (skip-test all)))))))))
     (propagated-inputs
      (list python-cachecontrol
-           python-lockfile
-           python-mistune
+           python-importlib-resources
+           python-mistune-next
+           python-mypy-extensions
            python-rdflib
-           python-rdflib-jsonld
            python-requests
-           python-ruamel.yaml
-           python-typing-extensions))
+           python-ruamel.yaml))
     (native-inputs
-     (list python-black python-pytest python-pytest-runner))
+     (list python-black python-pytest python-pytest-runner python-pytest-xdist))
     (home-page "https://github.com/common-workflow-language/schema_salad")
     (synopsis "Schema Annotations for Linked Avro Data (SALAD)")
     (description