aboutsummaryrefslogtreecommitdiff
path: root/.guix/modules/gn-uploader.scm
diff options
context:
space:
mode:
Diffstat (limited to '.guix/modules/gn-uploader.scm')
-rw-r--r--.guix/modules/gn-uploader.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/.guix/modules/gn-uploader.scm b/.guix/modules/gn-uploader.scm
new file mode 100644
index 0000000..4e198fa
--- /dev/null
+++ b/.guix/modules/gn-uploader.scm
@@ -0,0 +1,46 @@
+(define-module (gn-uploader)
+ #: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 (gn-uploader) #:prefix gn:))
+
+(define %source-dir (dirname (dirname (current-source-directory))))
+
+(define vcs-file?
+ (or (git-predicate %source-dir)
+ (const #t)))
+
+(define-public gn-uploader
+ (package
+ (inherit gn:gn-uploader)
+ (source
+ (local-file "../.."
+ "gn-uploader-checkout"
+ #:recursive? #t
+ #:select? vcs-file?))))
+
+(define-public gn-uploader-all-tests
+ (package
+ (inherit gn-uploader)
+ (arguments
+ (substitute-keyword-arguments (package-arguments gn-uploader)
+ ((#: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 gn-uploader)
+ (prepend python-mypy)
+ (prepend python-pylint)))))
+
+gn-uploader