[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
137/233: gnu: Add python-openapi-spec-validator.
From: |
guix-commits |
Subject: |
137/233: gnu: Add python-openapi-spec-validator. |
Date: |
Sun, 24 Apr 2022 23:39:55 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython-polyglossia
in repository guix.
commit 2bac7d97356a9701a2d9ba5770c28e9e77dca1b1
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Apr 17 14:22:02 2022 -0400
gnu: Add python-openapi-spec-validator.
* gnu/packages/python-web.scm (python-openapi-spec-validator): New variable.
---
gnu/packages/python-web.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 29b8271e94..1c46070bc9 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1483,6 +1483,61 @@ JSON Schema Specification Draft 2020-12.
@end itemize")
(license license:bsd-3)))
+(define-public python-openapi-spec-validator
+ (package
+ (name "python-openapi-spec-validator")
+ (version "0.4.0")
+ (source
+ (origin
+ (method git-fetch) ;no tests in pypi release
+ (uri (git-reference
+ (url "https://github.com/p1c2u/openapi-spec-validator")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-coverage-pytest-options
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("^--cov.*") ""))))
+ ;; XXX: PEP 517 manual build copied from python-isort.
+ (replace 'build
+ (lambda _
+ (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv"
+ ;; The example tests attempt to fetch resources from
+ ;; the Internet (see:
+ ;;
https://github.com/p1c2u/openapi-spec-validator/issues/151).
+ "-k" "not Example and not Exampe"))))
+ (replace 'install
+ (lambda _
+ (let ((whl (car (find-files "dist" "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" #$output whl)))))))
+ (native-inputs (list python-poetry-core python-pypa-build python-pytest))
+ (propagated-inputs
+ (list python-jsonschema
+ python-openapi-schema-validator
+ python-pyyaml
+ python-requests
+ python-setuptools))
+ (home-page "https://github.com/p1c2u/openapi-spec-validator")
+ (synopsis "OpenAPI spec validator")
+ (description "OpenAPI Spec Validator is a Python library that validates an
+OpenAPI specification against the OpenAPI 2.0 (also known as Swagger), OpenAPI
+3.0 and OpenAPI 3.1 specifications. The validator aims to check for full
+compliance with the specification.")
+ (license license:asl2.0)))
+
(define-public python-openid
(package
(name "python-openid")
- 112/233: gnu: Add texlive-lm-math., (continued)
- 112/233: gnu: Add texlive-lm-math., guix-commits, 2022/04/24
- 113/233: gnu: python-nbconvert: Update to 6.5.0., guix-commits, 2022/04/24
- 114/233: gnu: Add python-jupyter-server-mathjax., guix-commits, 2022/04/24
- 115/233: gnu: python-nbval: Fix build., guix-commits, 2022/04/24
- 119/233: gnu: Add python-docrepr., guix-commits, 2022/04/24
- 122/233: gnu: Add python-sphinx-theme-builder., guix-commits, 2022/04/24
- 126/233: gnu: Add texlive-cbfonts-fd., guix-commits, 2022/04/24
- 127/233: gnu: Add texlive-cbfonts., guix-commits, 2022/04/24
- 129/233: gnu: texlive-latex-geometry: Propagate texlive-latex-graphics., guix-commits, 2022/04/24
- 132/233: gnu: python-ipython-documentation: Also build info and pdf targets., guix-commits, 2022/04/24
- 137/233: gnu: Add python-openapi-spec-validator.,
guix-commits <=
- 140/233: gnu: Add python-httpcore-bootstrap., guix-commits, 2022/04/24
- 143/233: gnu: python-uvicorn: Update to 0.17.6., guix-commits, 2022/04/24
- 150/233: gnu: python-falcon: Update to 3.1.0., guix-commits, 2022/04/24
- 156/233: gnu: python-llvmlite: Update to 0.38.0., guix-commits, 2022/04/24
- 26/233: gnu: Add python-mutatormath., guix-commits, 2022/04/24
- 43/233: gnu: Add python-pytest-freezegun., guix-commits, 2022/04/24
- 50/233: gnu: Add python-types-docutils., guix-commits, 2022/04/24
- 51/233: gnu: python-pytest-checkdocs: Update to 2.7.1., guix-commits, 2022/04/24
- 42/233: gnu: Add python-types-pytz., guix-commits, 2022/04/24
- 39/233: gnu: Add python-jaraco-functools-bootstrap., guix-commits, 2022/04/24