diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1e7f242..65db3c0 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -27,6 +27,12 @@ jobs: python -m pip install --upgrade pip pip install . pip install pytest + - name: Get test data + run: | + 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_float16.pt?download=true -O data/gt_maps_flat_float16.pt + wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/metadata.csv?download=true -O data/metadata.csv + wget https://files.osf.io/v1/resources/8h6fz/providers/dropbox/Ground_truth/metadata.csv?download=true -O data/mask_dilated_wide_224x224.mrc - name: Test with pytest run: | pytest tests/ diff --git a/tests/config_files/test_config_distribution_to_distribution.yaml b/tests/config_files/test_config_distribution_to_distribution.yaml new file mode 100644 index 0000000..48f2546 --- /dev/null +++ b/tests/config_files/test_config_distribution_to_distribution.yaml @@ -0,0 +1,12 @@ +input_fname: results/test_map_to_map_distance_matrix_submission_0.pkl +metrics: + - l2 +gt_metadata_fname: data/metadata.csv +n_replicates: 3 +n_pool_microstate: 2 +replicate_fraction: 0.9 +cvxpy_solver: ECOS +optimal_q_kl: + n_iter: 100000 + break_atol: 0.0001 +output_fname: results/test_distribution_to_distribution_submission_0.pkl \ No newline at end of file diff --git a/tests/config_files/test_config_map_to_map.yaml b/tests/config_files/test_config_map_to_map.yaml new file mode 100644 index 0000000..47e5bd1 --- /dev/null +++ b/tests/config_files/test_config_map_to_map.yaml @@ -0,0 +1,23 @@ +data: + n_pix: 224 + psize: 2.146 + submission: + fname: tests/data/dataset_2_submissions/submission_0.pt + volume_key: volumes + metadata_key: populations + label_key: id + ground_truth: + volumes: data/gt_maps_flat_float16.pt + metadata: data/metadata.csv + mask: + do: true + volume: data/mask_dilated_wide_224x224.mrc +analysis: + metrics: + - l2 + chunk_size_submission: 80 + chunk_size_gt: 190 + normalize: + do: true + method: median_zscore +output: tests/test_map_to_map_distance_matrix_submission_0.pkl \ No newline at end of file