summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-05-04 18:46:26 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-05-04 18:47:17 +0200
commitd0a6c110792d8eecfef220c2590e8615ac19eca8 (patch)
tree038accc4dd5393d9c36ff447eda91e07df6663ce /gnu/packages
parent155137d28ae988bb40b3eabf3f755bdfb7420a3d (diff)
downloadguix-d0a6c110792d8eecfef220c2590e8615ac19eca8.tar.gz
gnu: Add python-diff-cover.
* gnu/packages/python-xyz.scm (python-diff-cover): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cf4fff9ba1..195ab725a7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20671,6 +20671,45 @@ point is the point of maximum curvature.")
      make common patterns shorter and easier.")
     (license license:bsd-2)))
 
+(define-public python-diff-cover
+  (package
+    (name "python-diff-cover")
+    (version "7.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "diff_cover" version))
+              (sha256
+               (base32
+                "1z7bxnij2sqsiz9313nwcak7nshakpq4b6c05v13hkqyhd505cx4"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; missing fixture 'datadir'.
+      '(list "--ignore=tests/test_clover_violations_reporter.py"
+             ;; Difference in line breaks
+             "-k" "not test_html_with_external_css")))
+    (propagated-inputs
+     (list python-chardet
+           python-jinja2
+           python-pluggy
+           python-pygments
+           python-tomli))
+    (native-inputs
+     (list python-flake8
+           python-poetry-core
+           python-pylint
+           python-pytest
+           python-pytest-flake8
+           python-pytest-mock))
+    (home-page "https://github.com/Bachmann1234/diff-cover")
+    (synopsis "Run coverage and linting reports on diffs")
+    (description "Automatically find diff lines that need test coverage.  It
+also finds diff lines that have violations (according to tools such as
+pycodestyle, pyflakes, flake8, or pylint).  This is used as a code quality
+metric during code reviews.")
+    (license license:asl2.0)))
+
 (define-public python-diff-match-patch
   (package
     (name "python-diff-match-patch")