From 150873103ef373026e63d764329690a90bb023b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:33:31 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mease_elabftw/nwb.py | 1 - mease_elabftw/tests/test_nwb.py | 3 --- mease_elabftw/tests/test_util.py | 1 - mease_elabftw/util.py | 2 -- 4 files changed, 7 deletions(-) diff --git a/mease_elabftw/nwb.py b/mease_elabftw/nwb.py index 1bc0c84..df13f1c 100644 --- a/mease_elabftw/nwb.py +++ b/mease_elabftw/nwb.py @@ -77,7 +77,6 @@ def get_raw_nwb_metadata(experiment_id): elif category == "mouse": f = json.loads(item.get("metadata", "{}")).get("extra_fields") for key, value in f.items(): - metadata["Subject"][key.split(".")[1]] = value["value"] elif category == "silicon probe": metadata["Other"]["SiliconProbe"] = dict() diff --git a/mease_elabftw/tests/test_nwb.py b/mease_elabftw/tests/test_nwb.py index 7b0f312..9d8d454 100644 --- a/mease_elabftw/tests/test_nwb.py +++ b/mease_elabftw/tests/test_nwb.py @@ -11,7 +11,6 @@ def test_get_nwb_metadata(): - logger = logging.getLogger("mease-elabftw") logger.error("first function") data = mease_elabftw.nwb.get_nwb_metadata(test_ids.valid_experiment) @@ -62,7 +61,6 @@ def test_get_nwb_metadata(): def test_create_pynwb(): - nwb_metadata = mease_elabftw.nwb.get_nwb_metadata(test_ids.valid_experiment) # Get pynwb from nwb_metadata @@ -97,7 +95,6 @@ def test_create_pynwb(): def test_validate_pynwb_data(): - mease_elabftw.activate_logger(True) mease_elabftw.set_log_level(logging.INFO) logger = logging.getLogger("mease-elabftw") diff --git a/mease_elabftw/tests/test_util.py b/mease_elabftw/tests/test_util.py index 94a6818..ba5b0cb 100644 --- a/mease_elabftw/tests/test_util.py +++ b/mease_elabftw/tests/test_util.py @@ -8,7 +8,6 @@ def test_convert_weight(): - assert convert_weight(2) == 0.002 assert convert_weight(2.23) == 0.00223 assert convert_weight("2") == 0.002 diff --git a/mease_elabftw/util.py b/mease_elabftw/util.py index 17d71a0..736a598 100644 --- a/mease_elabftw/util.py +++ b/mease_elabftw/util.py @@ -45,7 +45,6 @@ def get_manager(): """ token = os.environ.get("ELABFTW_TOKEN") if token is None: - message = "The ELABFTW_TOKEN environment variable needs to be set to your eLabFTW access token." logger.error(message) @@ -122,7 +121,6 @@ def convert_weight(weight_str): # Check if letters are present in string: if weight_str.islower(): - # weight_str, unit_str, second_unit = re.split(r"([a-z])", weight_str, 1, flags=re.I) match = re.compile("[^\W\d]").search(weight_str)