Skip to content

Commit

Permalink
Temporarily fix the mutable defaults so tests path.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeZiminski committed Jul 29, 2024
1 parent ba23583 commit 60c8e5e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/spikeinterface/generation/session_displacement_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
from spikeinterface.core import InjectTemplatesRecording


# TODO: add note on what is fixed / not fixed across sessions
# TODO: tests are failing because of mutable default arguments.
# will need to fix this before proceeding.


def generate_session_displacement_recordings(
num_units=250,
recording_durations=(10, 10, 10),
Expand Down Expand Up @@ -123,6 +118,12 @@ def generate_session_displacement_recordings(
all other unit properties will be maintained (except any location
shifting and template scaling applied).
"""
# temporary fix
generate_unit_locations_kwargs = copy.deepcopy(generate_unit_locations_kwargs)
generate_templates_kwargs = copy.deepcopy(generate_templates_kwargs)
generate_sorting_kwargs = copy.deepcopy(generate_sorting_kwargs)
generate_noise_kwargs = copy.deepcopy(generate_noise_kwargs)

_check_generate_session_displacement_arguments(
num_units, recording_durations, recording_shifts, recording_amplitude_scalings
)
Expand Down Expand Up @@ -197,8 +198,6 @@ def generate_session_displacement_recordings(
**generate_templates_kwargs,
)

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

first_rec_templates = (
Expand Down

0 comments on commit 60c8e5e

Please sign in to comment.