mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 01:38:12 +08:00
Reorganize the server testing directory (#1705)
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
include ../common.mk
|
include ../common.mk
|
||||||
|
|
||||||
ANNOTATIONS := $(if $(ANNOTATIONS),$(ANNOTATIONS),../server/test/test_datasets/pbmc3k-annotations.csv)
|
ANNOTATIONS := $(if $(ANNOTATIONS),$(ANNOTATIONS),../server/test/fixtures/pbmc3k-annotations.csv)
|
||||||
ANNOTATIONS_FILENAME := $(shell basename $(ANNOTATIONS))
|
ANNOTATIONS_FILENAME := $(shell basename $(ANNOTATIONS))
|
||||||
|
|
||||||
# Packaging
|
# Packaging
|
||||||
|
|||||||
@@ -20,16 +20,17 @@ from server.data_common.matrix_loader import MatrixDataLoader, MatrixDataType
|
|||||||
|
|
||||||
|
|
||||||
PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip()
|
PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip()
|
||||||
|
FIXTURES_ROOT = PROJECT_ROOT + "/server/test/fixtures"
|
||||||
|
|
||||||
|
|
||||||
def data_with_tmp_annotations(ext: MatrixDataType, annotations_fixture=False):
|
def data_with_tmp_annotations(ext: MatrixDataType, annotations_fixture=False):
|
||||||
tmp_dir = tempfile.mkdtemp()
|
tmp_dir = tempfile.mkdtemp()
|
||||||
annotations_file = path.join(tmp_dir, "test_annotations.csv")
|
annotations_file = path.join(tmp_dir, "test_annotations.csv")
|
||||||
if annotations_fixture:
|
if annotations_fixture:
|
||||||
shutil.copyfile(f"{PROJECT_ROOT}/server/test/test_datasets/pbmc3k-annotations.csv", annotations_file)
|
shutil.copyfile(f"{PROJECT_ROOT}/server/test/fixtures/pbmc3k-annotations.csv", annotations_file)
|
||||||
fname = {
|
fname = {
|
||||||
MatrixDataType.H5AD: f"{PROJECT_ROOT}/example-dataset/pbmc3k.h5ad",
|
MatrixDataType.H5AD: f"{PROJECT_ROOT}/example-dataset/pbmc3k.h5ad",
|
||||||
MatrixDataType.CXG: "test/test_datasets/pbmc3k.cxg",
|
MatrixDataType.CXG: "test/fixtures/pbmc3k.cxg",
|
||||||
}[ext]
|
}[ext]
|
||||||
data_locator = DataLocator(fname)
|
data_locator = DataLocator(fname)
|
||||||
config = AppConfig()
|
config = AppConfig()
|
||||||
|
|||||||
Vendored
Vendored
@@ -4,7 +4,7 @@ import random
|
|||||||
import json
|
import json
|
||||||
from gevent.pool import Group
|
from gevent.pool import Group
|
||||||
|
|
||||||
import server.test.decode_fbs as decode_fbs
|
import server.test.unit.decode_fbs as decode_fbs
|
||||||
from config import DataSets
|
from config import DataSets
|
||||||
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user