Skip to content

Add live.poll() and retire utils.processor - #1103

Merged
jepegit merged 1 commit into
masterfrom
781-live-poll
Sep 26, 2026
Merged

jepegit merged 1 commit into
masterfrom
781-live-poll

Conversation

@jepegit

@jepegit jepegit commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Closes #781. Epic #783 (Stage 3, L4). Stacked on #1102 (164-cell-update); retarget once that merges.

What

  • cellpy/utils/live.py: poll(cell_or_path, interval=30, on_update=None, stop_when_complete=True, until=None, max_polls=None, timeout=None, raise_errors=False, sleep=time.sleep, **get_kwargs). Each tick calls c.update(); on_update(c) fires on ticks that changed the frames (and for the initial load when a path is passed). Stop conditions: c.source_complete, until(c), max_polls, timeout; Ctrl-C returns the cell cleanly. Run bookkeeping on c.poll_status (PollStatus). sleep= is injectable for schedulers and tests.
  • CellpyCell.source_complete: set by update() from IncrementalChunk.complete.
  • cellpy/utils/processor.py deleted (batch.runner already has executor="threads"). The batch_core.py lstrip bug named in the issue is moot: utils/batch_tools/ no longer exists.

Tests

tests/test_live_poll.py (8 essential) with a fake clock that grows the raw file on chosen ticks: growth → result equals a full load, path input, until, source_complete, timeout, error handling, KeyboardInterrupt, processor module gone.

uv run pytest -m essential: 947 passed, 74 skipped.

Docs

Folder-structure page, docs/agents/index.md, .issueflows/04-designs-and-guides/incremental-load-protocol.md, HISTORY.md, test registry.

Made with Cursor

Base automatically changed from 164-cell-update to master September 26, 2026 07:40
@jepegit
jepegit enabled auto-merge (squash) September 26, 2026 07:41
poll() refreshes a cell through CellpyCell.update() on an interval with
on_update / until / max_polls / timeout / stop_when_complete stop
conditions and an injectable sleep; the run is recorded on
cell.poll_status. processor.py's thread-pool sketch is covered by
batch.runner's threads executor.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jepegit
jepegit merged commit 335888f into master Sep 26, 2026
6 checks passed
@jepegit
jepegit deleted the 781-live-poll branch September 26, 2026 07:49
@jepegit jepegit mentioned this pull request Sep 26, 2026
10 of 21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L4: live.py poll loop; retire processor.py; fix batch_core lstrip

1 participant