summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-11-15 15:12:50 +0000
committerRicardo Wurmus <rekado@elephly.net>2021-11-15 15:21:06 +0000
commit616bcc9c0b71de1cae271fa37ef8829872c92773 (patch)
tree81e5051fcec0b8b3355facc224e93ab3d16f34dd /gnu
parent46432cceebe392a1744980f370a48ef73afbac2c (diff)
downloadguix-patches-616bcc9c0b71de1cae271fa37ef8829872c92773.tar
guix-patches-616bcc9c0b71de1cae271fa37ef8829872c92773.tar.gz
gnu: python-scanpy: Run tests conditionally.
* gnu/packages/bioinformatics.scm (python-scanpy)[arguments]: Respect TESTS? argument.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioinformatics.scm81
1 files changed, 41 insertions, 40 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index c5a1215442..2ffe7f7f9f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -11996,47 +11996,48 @@ implementation differs in these ways:
wheel (string-append "--prefix=" out)))
(find-files "dist" "\\.whl$")))))
(replace 'check
- (lambda* (#:key inputs #:allow-other-keys)
- ;; These tests require Internet access.
- (delete-file-recursively "scanpy/tests/notebooks")
- (delete-file "scanpy/tests/test_clustering.py")
- (delete-file "scanpy/tests/test_datasets.py")
- (delete-file "scanpy/tests/test_score_genes.py")
- (delete-file "scanpy/tests/test_highly_variable_genes.py")
-
- ;; TODO: I can't get the plotting tests to work, even with Xvfb.
- (delete-file "scanpy/tests/test_embedding_plots.py")
- (delete-file "scanpy/tests/test_preprocessing.py")
- (delete-file "scanpy/tests/test_read_10x.py")
-
- ;; TODO: these fail with TypingError and "Use of unsupported
- ;; NumPy function 'numpy.split'".
- (delete-file "scanpy/tests/test_metrics.py")
-
- ;; The following tests requires 'scanorama', which isn't
- ;; packaged yet.
- (delete-file "scanpy/tests/external/test_scanorama_integrate.py")
+ (lambda* (#:key tests? inputs #:allow-other-keys)
+ (when tests?
+ ;; These tests require Internet access.
+ (delete-file-recursively "scanpy/tests/notebooks")
+ (delete-file "scanpy/tests/test_clustering.py")
+ (delete-file "scanpy/tests/test_datasets.py")
+ (delete-file "scanpy/tests/test_score_genes.py")
+ (delete-file "scanpy/tests/test_highly_variable_genes.py")
+
+ ;; TODO: I can't get the plotting tests to work, even with Xvfb.
+ (delete-file "scanpy/tests/test_embedding_plots.py")
+ (delete-file "scanpy/tests/test_preprocessing.py")
+ (delete-file "scanpy/tests/test_read_10x.py")
+
+ ;; TODO: these fail with TypingError and "Use of unsupported
+ ;; NumPy function 'numpy.split'".
+ (delete-file "scanpy/tests/test_metrics.py")
+
+ ;; The following tests requires 'scanorama', which isn't
+ ;; packaged yet.
+ (delete-file "scanpy/tests/external/test_scanorama_integrate.py")
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (assoc-ref inputs "python-anndata:source") ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv"
- "-k"
- ;; Plot tests that fail.
- (string-append "not test_dotplot_matrixplot_stacked_violin"
- " and not test_violin_without_raw"
- " and not test_correlation"
- " and not test_scatterplots"
- " and not test_scatter_embedding_add_outline_vmin_vmax_norm"
- " and not test_paga"
- " and not test_paga_compare"
-
- ;; These try to connect to the network
- " and not test_plot_rank_genes_groups_gene_symbols"
- " and not test_pca_chunked"
- " and not test_pca_sparse"
- " and not test_pca_reproducible")))))))
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) ":"
+ (assoc-ref inputs "python-anndata:source") ":"
+ (getenv "PYTHONPATH")))
+ (invoke "pytest" "-vv"
+ "-k"
+ ;; Plot tests that fail.
+ (string-append "not test_dotplot_matrixplot_stacked_violin"
+ " and not test_violin_without_raw"
+ " and not test_correlation"
+ " and not test_scatterplots"
+ " and not test_scatter_embedding_add_outline_vmin_vmax_norm"
+ " and not test_paga"
+ " and not test_paga_compare"
+
+ ;; These try to connect to the network
+ " and not test_plot_rank_genes_groups_gene_symbols"
+ " and not test_pca_chunked"
+ " and not test_pca_sparse"
+ " and not test_pca_reproducible"))))))))
(propagated-inputs
`(("python-anndata" ,python-anndata)
("python-h5py" ,python-h5py)