Skip to content

Commit 60c8e5e

Browse files
committed
Temporarily fix the mutable defaults so tests path.
1 parent ba23583 commit 60c8e5e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/spikeinterface/generation/session_displacement_generator.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
from spikeinterface.core import InjectTemplatesRecording
1717

1818

19-
# TODO: add note on what is fixed / not fixed across sessions
20-
# TODO: tests are failing because of mutable default arguments.
21-
# will need to fix this before proceeding.
22-
23-
2419
def generate_session_displacement_recordings(
2520
num_units=250,
2621
recording_durations=(10, 10, 10),
@@ -123,6 +118,12 @@ def generate_session_displacement_recordings(
123118
all other unit properties will be maintained (except any location
124119
shifting and template scaling applied).
125120
"""
121+
# temporary fix
122+
generate_unit_locations_kwargs = copy.deepcopy(generate_unit_locations_kwargs)
123+
generate_templates_kwargs = copy.deepcopy(generate_templates_kwargs)
124+
generate_sorting_kwargs = copy.deepcopy(generate_sorting_kwargs)
125+
generate_noise_kwargs = copy.deepcopy(generate_noise_kwargs)
126+
126127
_check_generate_session_displacement_arguments(
127128
num_units, recording_durations, recording_shifts, recording_amplitude_scalings
128129
)
@@ -197,8 +198,6 @@ def generate_session_displacement_recordings(
197198
**generate_templates_kwargs,
198199
)
199200

200-
# TODO: these first amplitdues don't change per loop, but are usually not
201-
# needed...
202201
if recording_amplitude_scalings is not None:
203202

204203
first_rec_templates = (

0 commit comments

Comments
 (0)