Skip to content

Commit 289c1d8

Browse files
committed
style: ruff check
1 parent 1fb1aa2 commit 289c1d8

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

aeon/dj_pipeline/analysis/visit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import datajoint as dj
77
import numpy as np
88
import pandas as pd
9-
109
from swc.aeon.analysis import utils as analysis_utils
10+
1111
from aeon.dj_pipeline import acquisition, fetch_stream, get_schema_name
1212

1313
schema = dj.schema(get_schema_name("analysis"))

aeon/dj_pipeline/subject.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,8 @@ def associate_subject_and_experiment(subject_name):
521521
& "content LIKE 'experiment:%'").fetch(as_dict=True):
522522
entry.pop("comment_id")
523523
entry["experiment_name"] = entry.pop("content").replace("experiment:", "").strip()
524-
if acquisition.Experiment.proj() & entry:
525-
if not acquisition.Experiment.Subject & entry:
526-
new_entries.append(entry)
527-
logger.info(f"\tNew experiment subject: {entry}")
524+
if (acquisition.Experiment.proj() & entry) and (not acquisition.Experiment.Subject & entry):
525+
new_entries.append(entry)
526+
logger.info(f"\tNew experiment subject: {entry}")
528527

529528
acquisition.Experiment.Subject.insert(new_entries)

aeon/dj_pipeline/tracking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class SLEAPTracking(dj.Imported):
122122
"""
123123

124124
class PoseIdentity(dj.Part):
125-
definition = """
125+
definition = """
126126
-> master
127127
identity_idx: smallint
128128
---
@@ -210,7 +210,7 @@ def make(self, key):
210210

211211
# get anchor part
212212
# ie the body_part with the prefix "anchor_" (there should only be one)
213-
anchor_part = set(part for part in pose_data.part.unique() if part.startswith("anchor_"))
213+
anchor_part = {part for part in pose_data.part.unique() if part.startswith("anchor_")}
214214
if len(anchor_part) != 1:
215215
raise ValueError(f"Anchor part not found or multiple anchor parts found: {anchor_part}")
216216
anchor_part = anchor_part.pop()

aeon/dj_pipeline/utils/streams_maker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ def key_source(self):
149149
+ Chunk(s) started after {device_type} install time & ended before {device_type} remove time
150150
+ Chunk(s) started after {device_type} install time for {device_type} and not yet removed
151151
"""
152-
153152
return (
154153
acquisition.Chunk * ExperimentDevice.join(ExperimentDevice.RemovalTime, left=True)
155154
& "chunk_start >= {device_type_name}_install_time"

0 commit comments

Comments
 (0)