Skip to content

Commit

Permalink
Move the logic of the e2e test into tets_learn_loop, remove the fil…
Browse files Browse the repository at this point in the history
…es that are no unused.
  • Loading branch information
drewoldag committed Sep 26, 2024
1 parent 0c68338 commit 5c58daf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 61 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/e2e-tests.yml

This file was deleted.

29 changes: 0 additions & 29 deletions tests/run-snpcc-e2e.sh

This file was deleted.

25 changes: 25 additions & 0 deletions tests/test_learn_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,30 @@ def test_can_run_learn_loop(test_des_data_path):
output_queried_file=os.path.join(dir_name,"just_other_name.csv"),
)


def test_can_run_learn_loop_uncsample(test_des_data_path):
"""Test that learn_loop can load data and run.
This instance is distinct from the previous because it uses `UncSample` strategy
and runs for 5 loops instead of 1.
"""
with tempfile.TemporaryDirectory() as dir_name:
# Create the feature files to use for the learning loop.
output_file = os.path.join(dir_name, "output_file.dat")
fit_snpcc(
path_to_data_dir=test_des_data_path,
features_file=output_file
)

learn_loop(
nloops=5,
features_method="bazin",
strategy="UncSampling",
path_to_features=output_file,
output_metrics_file=os.path.join(dir_name,"just_a_name.csv"),
output_queried_file=os.path.join(dir_name,"just_other_name.csv"),
training=10,
)


if __name__ == '__main__':
pytest.main()

0 comments on commit 5c58daf

Please sign in to comment.