diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 773cb66..d476ee8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -36,10 +36,10 @@ jobs: pip install pytest - name: Get test data from OSF run: | - mkdir -p data/dataset_2_submissions tests/data/ + mkdir -p data/dataset_2_submissions tests/data/ tests/results wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/dataset_2_submissions/submission_0.pt?download=true -O data/dataset_2_submissions/submission_0.pt - wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/gt_maps_flat_10.pt?download=true -O tests/data/gt_maps_flat_10.pt - wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/metadata_10.csv?download=true -O tests/data/metadata_10.csv + wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/test_maps_gt_flat_10.pt?download=true -O tests/data/gt_maps_flat_10.pt + wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/test_metadata_10.csv?download=true -O tests/data/metadata_10.csv wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/mask_dilated_wide_224x224.mrc?download=true -O data/mask_dilated_wide_224x224.mrc - name: Test with pytest run: | diff --git a/tests/config_files/test_config_distribution_to_distribution.yaml b/tests/config_files/test_config_distribution_to_distribution.yaml index 48f2546..9359e58 100644 --- a/tests/config_files/test_config_distribution_to_distribution.yaml +++ b/tests/config_files/test_config_distribution_to_distribution.yaml @@ -1,7 +1,7 @@ -input_fname: results/test_map_to_map_distance_matrix_submission_0.pkl +input_fname: tests/results/test_map_to_map_distance_matrix_submission_0.pkl metrics: - l2 -gt_metadata_fname: data/metadata.csv +gt_metadata_fname: tests/data/test_metadata_10.csv n_replicates: 3 n_pool_microstate: 2 replicate_fraction: 0.9 diff --git a/tests/config_files/test_config_map_to_map.yaml b/tests/config_files/test_config_map_to_map.yaml index 7a093dc..2e7af67 100644 --- a/tests/config_files/test_config_map_to_map.yaml +++ b/tests/config_files/test_config_map_to_map.yaml @@ -7,8 +7,8 @@ data: metadata_key: populations label_key: id ground_truth: - volumes: tests/data/gt_maps_flat_10.pt - metadata: tests/data/metadata_10.csv + volumes: tests/data/test_maps_gt_flat_10.pt + metadata: tests/data/test_metadata_10.csv mask: do: true volume: data/mask_dilated_wide_224x224.mrc @@ -20,4 +20,4 @@ analysis: normalize: do: true method: median_zscore -output: tests/test_map_to_map_distance_matrix_submission_0.pkl \ No newline at end of file +output: tests/results/test_map_to_map_distance_matrix_submission_0.pkl \ No newline at end of file diff --git a/tests/test_distribution_to_distribution.py b/tests/test_distribution_to_distribution.py index 9dcb1f0..d9c340b 100644 --- a/tests/test_distribution_to_distribution.py +++ b/tests/test_distribution_to_distribution.py @@ -1,7 +1,7 @@ from omegaconf import OmegaConf from cryo_challenge._commands import run_distribution2distribution_pipeline -args = OmegaConf.create({'config': 'tests/config_files/test_config_map_to_map_distance_matrix.yaml'}) -def test_run_distribution2distribution_pipeline(args): +def test_run_distribution2distribution_pipeline(): + args = OmegaConf.create({'config': 'tests/config_files/test_config_distribution_to_distribution.yaml'}) run_distribution2distribution_pipeline.main(args) \ No newline at end of file diff --git a/tests/test_map_to_map.py b/tests/test_map_to_map.py index d470e21..c782a8c 100644 --- a/tests/test_map_to_map.py +++ b/tests/test_map_to_map.py @@ -1,7 +1,7 @@ from omegaconf import OmegaConf from cryo_challenge._commands import run_map2map_pipeline -args = OmegaConf.create({'config': 'tests/config_files/test_config_map_to_map_distance_matrix.yaml'}) -def test_run_map2map_pipeline(args): +def test_run_map2map_pipeline(): + args = OmegaConf.create({'config': 'tests/config_files/test_config_map_to_map.yaml'}) run_map2map_pipeline.main(args) \ No newline at end of file