Skip to content

Commit 2c08e5e

Browse files
hanhouclaude
andcommitted
fix(plot): add docstrings to nested _ev / _trial_of (interrogate 100%)
CI interrogate requires 100% docstring coverage; the two nested helpers in plot_session_in_time_plotly were missing docstrings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fd6619f commit 2c08e5e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/aind_dynamic_foraging_basic_analysis/plot/plot_foraging_session_plotly.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ def _to_curve(v):
543543
boundaries.append(cum)
544544

545545
def _ev(name, _ev=ev_s, _off=off):
546+
"""Timestamps of events named ``name`` in this session, shifted by ``_off``."""
546547
return _ev.loc[_ev["event"] == name, "timestamps"].to_numpy() + _off
547548

548549
tr_s = None
@@ -559,6 +560,7 @@ def _ev(name, _ev=ev_s, _off=off):
559560
first_gc = gc.min()
560561

561562
def _trial_of(times, _gc=gc, _n=n_tr):
563+
"""Per-session trial number for each time (# go cues at/before it)."""
562564
if _n == 0:
563565
return np.zeros(len(times), dtype=int)
564566
return np.searchsorted(_gc, np.asarray(times), side="right")

0 commit comments

Comments
 (0)