Skip to content

Commit

Permalink
Merge pull request #4 from grst/grst-patch-1
Browse files Browse the repository at this point in the history
Improve pytest setup
  • Loading branch information
mikelkou authored Aug 17, 2023
2 parents 04d6b3c + b302121 commit c0e1973
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 31 deletions.
31 changes: 0 additions & 31 deletions tests/test_basic.py

This file was deleted.

34 changes: 34 additions & 0 deletions tests/test_fava.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import os
import pandas as pd
import pytest
from pathlib import Path

from favapy import fava


@pytest.fixture
def data_dir() -> Path:
data_dir = os.environ.get("DATA_DIR")
if data_dir is None:
raise ValueError("DATA_DIR environment variable not set")
else:
return Path(data_dir)


@pytest.fixture
def test_dataset(data_dir) -> pd.DataFrame:
data_file_path = data_dir / "Example_dataset_GSE75748_sc_cell_type_ec.tsv"
return pd.read_csv(data_file_path, sep="\t").iloc[:100, :100]


def test_favapy(test_dataset):
FAVA_network = fava.cook(
data=test_dataset,
log2_normalization=True,
hidden_layer=None,
latent_dim=None,
epochs=10,
batch_size=32,
interaction_count=100,
)
return FAVA_network

0 comments on commit c0e1973

Please sign in to comment.