Skip to content

Commit

Permalink
ruff happiness
Browse files Browse the repository at this point in the history
  • Loading branch information
grg2rsr committed Dec 5, 2024
1 parent 25f3ef2 commit 2a034a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions iblrig/test/test_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def test_copier(self):
locations=['VTA', 'SNc'],
)
# iblrig.neurophotometrics.copy_photometry_subject(session.paths['SESSION_FOLDER'])
sc, = iblrig.commands.transfer_data(tag='neurophotometrics')
(sc,) = iblrig.commands.transfer_data(tag='neurophotometrics')
self.assertEqual(sc.state, 2)


class TestIntegrationTransferExperiments(TestIntegrationTransferExperimentsBase):
"""This test emulates the `transfer_data` command as run on the rig."""
Expand Down
12 changes: 7 additions & 5 deletions iblrig/transfer_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@
from pathlib import Path

import numpy as np
import pandas as pd
import pandera

import ibllib.pipes.misc
import iblphotometry.io as fpio
import iblrig
import one.alf.path as alfiles
from ibllib.io import raw_data_loaders, session_params
from ibllib.pipes.misc import sleepless
from iblrig.raw_data_loaders import load_task_jsonable
from iblutil.io import hashfile
from iblutil.util import ensure_list
import iblphotometry.io as fpio

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -686,7 +684,11 @@ def _copy_collections(self, folder_neurophotometric: Path | None = None) -> bool
# Here we find the first photometry folder after the start_time. In case this is failing
# we can feed a custom start_time to go to the desired folder, or just rename the folder
# FIXME TODO
folder_neurophotometric = self.session_path.parents[4].joinpath('neurophotometrics') if folder_neurophotometric is None else folder_neurophotometric
folder_neurophotometric = (
self.session_path.parents[4].joinpath('neurophotometrics')
if folder_neurophotometric is None
else folder_neurophotometric
)
folder_day = next(folder_neurophotometric.glob(ed['datetime'][:10]), None)
assert folder_day is not None, f"Neurophotometrics folder {folder_neurophotometric} doesn't contain data"
folder_times = list(folder_day.glob('T*'))
Expand All @@ -699,7 +701,7 @@ def _copy_collections(self, folder_neurophotometric: Path | None = None) -> bool
assert csv_digital_inputs.exists(), f'Digital inputs file {csv_digital_inputs} not found'

# Copy the raw and digital inputs files to the server
# read in and
# read in and
df_raw_photometry = fpio.from_raw_neurophotometrics_file_to_raw_df(csv_raw_photometry, validate=False)
# explicitly explicitly with the data from the experiment description file
cols = ed['fibers'].keys()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"iblqt>=0.3.1",
"ONE-api>=2.11.1",
"tycmd-wrapper>=0.2.1",
"ibl-photometry @ git+https://github.com/int-brain-lab/ibl-photometry@main"
"ibl-photometry @ git+https://github.com/int-brain-lab/ibl-photometry@main",
#
# Everything else
"annotated-types>=0.7.0",
Expand Down

0 comments on commit 2a034a4

Please sign in to comment.