Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring committed Mar 12, 2024
1 parent abb168b commit 1841b49
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions api/src/opentrons/protocol_engine/protocol_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,27 @@ def estop(self, maintenance_run: bool) -> None:
return
current_id = (
# todo
#
## Notes
# Reading:
# - Get single command by ID
# - Get all commands, ordered
# - Get slice of commands by integer index, potentially starting from "currently running or most recently executed" (but see confusing docs)
# - Get "current" (currently running, or most recently completed) command (but see confusing docs)
# - May need to change for fixup commands
# - Get "next to execute" (first queued setup command or first queued protocol command)
# - Will need to change for fixup commands
# == / !=, mostly for tests
# Writing:
# - Enqueue a new command
# - Update command for its new state
# Steps for this PR:
# 1. Naively move everything into this file
# ?. Resolve get_current()/get_slice() discrepancy
# ?. Add .tail to OrderedSet to support existing JSONv6 performance bug
# ?. General state deduplication and cleanup.
# "Most recently executed" unfortunately does not mean "most recent to have internally entered a completed state," because of mid-JSON-run failures.
# Resolve todo about separate actions for separate state transitions, instead of a single UpdateCommandAction
self._state_store.commands.state.running_command_id
or self._state_store.commands.state.queued_command_ids.head(None)
)
Expand Down

0 comments on commit 1841b49

Please sign in to comment.