Skip to content

Commit

Permalink
Accommodate 'test' stim files that aren't actual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Oct 14, 2023
1 parent 91ffece commit 8f59fde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/npc_lims/paths/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ def get_hdf5_stim_files_from_s3(
)
file_glob = f"*_{session.subject}_{session.date.replace('-', '')}_??????.hdf5"
files = [StimFile(path, session) for path in root.glob(file_glob)]


test_glob = file_glob.replace(str(session.subject), "test")
files += [StimFile(path, session) for path in root.glob(test_glob) if str(session.subject) in path.as_posix()]

# no empty files:
files = [f for f in files if f.size > 0]

Expand Down

0 comments on commit 8f59fde

Please sign in to comment.