Skip to content

Commit 4d0d9b1

Browse files
committed
adding missing renamed files
1 parent fa76fda commit 4d0d9b1

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

ingest/anndata_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .monitor import log_exception
88

99

10-
class H5adIngestor(IngestFiles):
10+
class AnnDataIngestor(IngestFiles):
1111
ALLOWED_FILE_TYPES = ['application/x-hdf5']
1212

1313
def __init__(self, file_path, study_file_id, study_id, **kwargs):

tests/test_anndata.py

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1-
""" test_de.py
2-
integration test to verify that de process generates expected output
1+
""" test_anndata.py
2+
verify basic AnnData validation works as expected
33
"""
44

55
import unittest
66
import sys
7-
import hashlib
8-
import os
9-
import glob
10-
from unittest.mock import patch
11-
import scanpy as sc
12-
137

148
sys.path.append("../ingest")
15-
from ingest_files import IngestFiles
16-
from h5ad import H5adIngestor
9+
from anndata_ import AnnDataIngestor
1710

1811

19-
class TestH5adIngestor(unittest.TestCase):
20-
def test_minimal_valid_h5ad(self):
21-
good_input = H5adIngestor(
22-
"../tests/data/h5ad/test.h5ad",
12+
class TestAnnDataIngestor(unittest.TestCase):
13+
def test_minimal_valid_anndata(self):
14+
good_input = AnnDataIngestor(
15+
"../tests/data/anndata/test.h5ad",
2316
"addedfeed000000000000000",
2417
"dec0dedfeed0000000000000",
2518
)
@@ -28,8 +21,8 @@ def test_minimal_valid_h5ad(self):
2821
)
2922

3023
def test_truncated_anndata(self):
31-
truncated_input = H5adIngestor(
32-
"../tests/data/h5ad/bad.h5",
24+
truncated_input = AnnDataIngestor(
25+
"../tests/data/anndata/bad.h5",
3326
"addedfeed000000000000000",
3427
"dec0dedfeed0000000000000",
3528
)
@@ -38,14 +31,14 @@ def test_truncated_anndata(self):
3831
# an exception before assertRaises gets called
3932
self.assertRaisesRegex(
4033
ValueError,
41-
"Scanpy cannot read file, \"../tests/data/h5ad/bad.h5\".",
34+
"Scanpy cannot read file, \"../tests/data/anndata/bad.h5\".",
4235
lambda: truncated_input.obtain_adata(),
4336
)
4437
self.assertFalse(truncated_input.validate())
4538

4639
def test_input_bad_suffix(self):
47-
bad_input = H5adIngestor(
48-
"../tests/data/h5ad/bad.foo",
40+
bad_input = AnnDataIngestor(
41+
"../tests/data/anndata/bad.foo",
4942
"addedfeed000000000000000",
5043
"dec0dedfeed0000000000000",
5144
)
@@ -54,7 +47,7 @@ def test_input_bad_suffix(self):
5447
# an exception before assertRaises gets called
5548
self.assertRaisesRegex(
5649
ValueError,
57-
"File type not detected for ../tests/data/h5ad/bad.foo, expected file endings are: .h5ad .h5 .hdf5",
50+
"File type not detected for ../tests/data/anndata/bad.foo, expected file endings are: .h5ad .h5 .hdf5",
5851
lambda: bad_input.obtain_adata(),
5952
)
6053
self.assertFalse(bad_input.validate())

tests/test_cell_metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
sys.path.append("../ingest")
1010
from cell_metadata import CellMetadata
1111
from validation.validate_metadata import collect_jsonschema_errors
12-
from ingest_pipeline import IngestPipeline
1312
from ingest_files import IngestFiles
1413

1514

0 commit comments

Comments
 (0)