Skip to content

Commit

Permalink
Fix tests to use new metadata format
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Dec 20, 2024
1 parent a243a04 commit 73fed42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 28 deletions.
16 changes: 0 additions & 16 deletions tests/metadata.yaml

This file was deleted.

20 changes: 10 additions & 10 deletions tests/test_convert_raw_ephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def test_add_electrode_data():
"""
# Create a test metadata dictionary
metadata = {}
metadata["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv"
metadata["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv"
metadata["electrodes_location"] = "Nucleus Accumbens core"
metadata["device"] = {
metadata["ephys"]["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv"
metadata["ephys"]["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv"
metadata["ephys"]["electrodes_location"] = "Nucleus Accumbens core"
metadata["ephys"]["device"] = {
"name": "Probe",
"description": "Berke Lab Probe",
"manufacturer": "My Manufacturer",
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_add_electrode_data():
eg = nwbfile.electrode_groups["ElectrodeGroup"]
assert eg is not None
assert eg.description == "All electrodes"
assert eg.location == metadata["electrodes_location"]
assert eg.location == metadata["ephys"]["electrodes_location"]
assert eg.device is device

# Test that the nwbfile has the expected electrodes after filtering
Expand Down Expand Up @@ -111,11 +111,11 @@ def test_add_raw_ephys():
)

metadata = {}
metadata["openephys_folder_path"] = "tests/test_data/raw_ephys/2022-07-25_15-30-00"
metadata["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv"
metadata["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv"
metadata["electrodes_location"] = "Nucleus Accumbens core"
metadata["device"] = {
metadata["ephys"]["openephys_folder_path"] = "tests/test_data/raw_ephys/2022-07-25_15-30-00"
metadata["ephys"]["impedance_file_path"] = "tests/test_data/processed_ephys/impedance.csv"
metadata["ephys"]["channel_geometry_file_path"] = "tests/test_data/processed_ephys/geom.csv"
metadata["ephys"]["electrodes_location"] = "Nucleus Accumbens core"
metadata["ephys"]["device"] = {
"name": "Probe",
"description": "Berke Lab Probe",
"manufacturer": "My Manufacturer",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_convert_spikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_add_spikes():
`python tests/test_data/create_spike_test_data.py`.
"""
metadata = {}
metadata["mountain_sort_output_file_path"] = "tests/test_data/processed_ephys/firings.mda"
metadata["sampling_frequency"] = 30_000
metadata["ephys"]["mountain_sort_output_file_path"] = "tests/test_data/processed_ephys/firings.mda"
metadata["ephys"]["sampling_frequency"] = 30_000

nwbfile = NWBFile(
session_description="Mock session",
Expand Down

0 comments on commit 73fed42

Please sign in to comment.