aboutsummaryrefslogtreecommitdiff
path: root/.guix/modules/gnqc-py.scm
blob: 848b29de19402f2efe9b37f2aea0fc9a21047d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
(define-module (gnqc-py)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix git-download)

  #:use-module ((gnu packages check) #:select (python-pylint))
  #:use-module ((gnu packages python-check) #:select (python-mypy))

  #:use-module ((gn packages genenetwork) #:select (gnqc-py) #:prefix gn:))

(define %source-dir (dirname (dirname (current-source-directory))))

(define vcs-file?
  (or (git-predicate %source-dir)
      (const #t)))

(define-public gnqc-py
  (package
    (inherit gn:gnqc-py)
    (source
     (local-file "../.."
		 "gnqc-py-checkout"
		 #:recursive? #t
		 #:select? vcs-file?))))

(define-public gnqc-py-all-tests
  (package
    (inherit gnqc-py)
    (arguments
     (substitute-keyword-arguments (package-arguments gnqc-py)
       ((#:phases #~%standard-phases)
	#~(modify-phases #$phases
	    (add-before 'build 'pylint
	      (lambda _
		(invoke "pylint" "setup.py" "wsgi.py" "tests" "quality_control"
			"qc_app" "r_qtl" "scripts")))
	    (add-after 'pylint 'mypy
	      (lambda _
		(invoke "mypy" ".")))))))
    (native-inputs
     (modify-inputs (package-native-inputs gnqc-py)
		    (prepend python-mypy)
		    (prepend python-pylint)))))

gnqc-py