aboutsummaryrefslogtreecommitdiff
path: root/.guix/genenetwork3-package.scm
blob: ab0f5b84f5443df8e38a16445f406905aca3a156 (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
47
48
49
50
51
52
53
(define-module (genenetwork3-package)
  #:use-module ((gn packages genenetwork)
                #:select (genenetwork3) #:prefix gn:)
  #:use-module ((gnu packages check) #:select (python-pylint))
  #:use-module ((gnu packages python-check) #:select (python-mypy))
  #:use-module ((gnu packages linux) #:select (procps))
  #:use-module ((gnu packages databases) #:select (virtuoso-ose))
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix git-download)
  #:use-module (guix packages))

(define-public genenetwork3
  (package
   (inherit gn:genenetwork3)
   (version (string-append (package-version gn:genenetwork3) "-git"))
   (source (local-file ".."
                       "genenetwork3-checkout"
                       #:recursive? #t
                       #:select? (or (git-predicate (dirname (current-source-directory)))
                                     (const #t))))))

(define-public genenetwork3-all-tests
  (package
   (inherit genenetwork3)
   (arguments
    (substitute-keyword-arguments (package-arguments genenetwork3)
      ((#:phases phases #~%standard-phases)
       #~(modify-phases #$phases
	   (add-after
	    'unpack 'patch-sources
	    (lambda* (#:key inputs outputs #:allow-other-keys)
	      (let ((virtuoso-ose (assoc-ref inputs "virtuoso-ose")))
	        (substitute* "tests/fixtures/rdf.py"
	         (("virtuoso-t")
	          (string-append #$virtuoso-ose "/bin/virtuoso-t"))))))
      	   (add-after 'build 'rdf-tests
	   	   (lambda _
	   	     (invoke "pytest" "-k" "rdf")))
     	   (add-before 'build 'pylint
      	     (lambda _
      	       (invoke "pylint" "main.py" "setup.py" "wsgi.py" "setup_commands"
      	     	      "tests" "gn3" "scripts" "sheepdog")))
      	   (add-after 'pylint 'mypy
      	     (lambda _
      	       (invoke "mypy" ".")))))))
   (native-inputs
    (modify-inputs (package-native-inputs genenetwork3)
      (prepend procps)
      (prepend python-pylint)
      (prepend python-mypy)))))

genenetwork3