Skip to content

Commit

Permalink
added test functions for paste2 (#11)
Browse files Browse the repository at this point in the history
* added test functions for paste2
  • Loading branch information
anushka255 authored Aug 15, 2024
1 parent 6807494 commit b888a2d
Show file tree
Hide file tree
Showing 17 changed files with 17,829 additions and 6,517 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
run: pip install -e .

- name: Pytest
run: pytest
run: pytest -k 'not partial_pairwise'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ myst-parser
sphinx-autodoc-typehints
nbsphinx
sphinx-gallery
sphinx-rtd-theme
sphinx-rtd-theme
8 changes: 4 additions & 4 deletions src/paste2/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
# In[3]:


sliceA_filename = 'sample_data/151673.h5ad'
sliceB_filename = 'sample_data/151674.h5ad'
sliceC_filename = 'sample_data/151675.h5ad'
sliceD_filename = 'sample_data/151676.h5ad'
sliceA_filename = '../../tests/data/input/151673.h5ad'
sliceB_filename = '../../tests/data/input/151674.h5ad'
sliceC_filename = '../../tests/data/input/151675.h5ad'
sliceD_filename = '../../tests/data/input/151676.h5ad'
sliceA = sc.read_h5ad(sliceA_filename)
sliceB = sc.read_h5ad(sliceB_filename)
sliceC = sc.read_h5ad(sliceC_filename)
Expand Down
12 changes: 12 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,15 @@ def intersecting_slices(slices):
slices[i] = slices[i][:, common_genes]

return slices


@pytest.fixture(scope="session")
def slices2():
slices = []
for i in range(3, 7):
fpath = Path(f"{input_dir}/15167{i}.h5ad")

_slice = sc.read_h5ad(fpath)
slices.append(_slice)

return slices
Loading

0 comments on commit b888a2d

Please sign in to comment.