From 2a034a484f9cdf59a00426968932318026b98a00 Mon Sep 17 00:00:00 2001 From: Georg Raiser Date: Thu, 5 Dec 2024 15:54:41 +0000 Subject: [PATCH] ruff happiness --- iblrig/test/test_transfers.py | 4 ++-- iblrig/transfer_experiments.py | 12 +++++++----- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/iblrig/test/test_transfers.py b/iblrig/test/test_transfers.py index fcdede3a..23813dfa 100644 --- a/iblrig/test/test_transfers.py +++ b/iblrig/test/test_transfers.py @@ -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.""" diff --git a/iblrig/transfer_experiments.py b/iblrig/transfer_experiments.py index a4ec966c..a5872079 100644 --- a/iblrig/transfer_experiments.py +++ b/iblrig/transfer_experiments.py @@ -12,10 +12,9 @@ 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 @@ -23,7 +22,6 @@ 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__) @@ -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*')) @@ -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() diff --git a/pyproject.toml b/pyproject.toml index 454cd790..7521b0c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",