aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-02 10:46:44 +0300
committerFrederick Muriuki Muriithi2024-01-02 10:46:44 +0300
commit6dd364402f22fb29c85f42e28f68a661e8f81a7a (patch)
tree1d7fa049c63f94a8514a2741df9b979d6580d2b9
parentee0cf7de526849f228c73b744bf66d22c30b34de (diff)
downloadgn-uploader-6dd364402f22fb29c85f42e28f68a661e8f81a7a.tar.gz
Cleanup guix definitions in preparation for deployment.
-rw-r--r--.guix/modules/gnqc-py.scm57
l---------[-rw-r--r--]guix.scm64
2 files changed, 58 insertions, 63 deletions
diff --git a/.guix/modules/gnqc-py.scm b/.guix/modules/gnqc-py.scm
new file mode 100644
index 0000000..4ff86b5
--- /dev/null
+++ b/.guix/modules/gnqc-py.scm
@@ -0,0 +1,57 @@
+(define-module (gnqc-py)
+ #:use-module (guix)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages python-web)
+ #:use-module (guix build-system python)
+ #:use-module (gnu packages python-check))
+
+(define %source-dir (dirname (dirname (current-source-directory))))
+
+(define vcs-file?
+ (or (git-predicate %source-dir)
+ (const #t)))
+
+(define gnqc-py
+ (package
+ (name "gnqc-py")
+ (version "0.0.1")
+ (source (local-file "../.."
+ "gnqc-py-checkout"
+ #:recursive? #t
+ #:select? vcs-file?))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-k" "unit_test")))))))
+ (native-inputs
+ (list python-mypy
+ python-pylint
+ python-pytest
+ python-hypothesis))
+ (propagated-inputs
+ (list gunicorn
+ python-redis
+ python-flask
+ python-pyyaml
+ python-jsonpickle
+ python-mysqlclient))
+ (synopsis "GeneNetwork Quality Control Application")
+ (description
+ "GeneNetwork qc is a quality control application for the data files that
+ eventually are used to add to the data in the GeneNetwork project.")
+ (home-page "https://gitlab.com/fredmanglis/gnqc_py")
+ (license license:agpl3+)))
+
+gnqc-py
diff --git a/guix.scm b/guix.scm
index ba74e60..8192165 100644..120000
--- a/guix.scm
+++ b/guix.scm
@@ -1,63 +1 @@
-(use-modules (git oid)
- (guix gexp)
- (git bindings)
- (git reference)
- (git repository)
- (guix packages)
- (guix git-download)
- (gnu packages check)
- (gnu packages databases)
- (gnu packages python-xyz)
- (gnu packages python-web)
- (guix build-system python)
- (gnu packages python-check)
- ((guix licenses) #:prefix license:))
-
-(define %source-dir (dirname (current-filename)))
-
-(libgit2-init!)
-(define gnqc-py
- (let ((commit (oid->string
- (reference-target
- (repository-head (repository-open %source-dir)))))
- (revision "3"))
- (package
- (name "genenetwork-qc")
- (version (git-version "0.0.1" revision commit))
- (source (local-file %source-dir
- "gnqc_py-checkout"
- #:recursive? #t
- #:select? (git-predicate %source-dir)))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f ; Cannot start redis during `guix build'
- #:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest")))))))
- (inputs
- (list python-mypy
- python-pylint
- python-pytest
- python-hypothesis))
- (propagated-inputs
- (list redis
- mariadb
- gunicorn
- python-redis
- python-flask
- python-pyyaml
- python-jsonpickle
- python-mysqlclient))
- (synopsis "GeneNetwork Quality Control Application")
- (description
- "GeneNetwork qc is a quality control application for the data files that
- eventually are used to add to the data in the GeneNetwork project.")
- (home-page "https://git.genenetwork.org/fredmanglis/gnqc_py")
- (license license:agpl3+))))
-
-(libgit2-shutdown!)
-
-gnqc-py
+.guix/modules/gnqc-py.scm \ No newline at end of file