Skip to content

Remove unused thermocycler backend methods#1097

Open
codewithdaniel1 wants to merge 1 commit into
PyLabRobot:mainfrom
codewithdaniel1:remove-thermocycler-backend-commands
Open

Remove unused thermocycler backend methods#1097
codewithdaniel1 wants to merge 1 commit into
PyLabRobot:mainfrom
codewithdaniel1:remove-thermocycler-backend-commands

Conversation

@codewithdaniel1

@codewithdaniel1 codewithdaniel1 commented Jun 20, 2026

Copy link
Copy Markdown

Why

This PR addresses issue #637, which notes that several thermocycler backend methods do not need to be backend commands because the values can be retrieved from protocol stage/step data or cached from the running protocol.

Keeping these methods on ThermocyclerBackend makes each concrete backend responsible for commands that are not actually backend-specific. This cleanup simplifies the backend interface while preserving useful high-level Thermocycler behavior.

Closes #637

What Changed

Removed these unused methods from ThermocyclerBackend and concrete backend implementations:

  • get_block_target_temperature
  • get_lid_target_temperature
  • get_total_cycle_count
  • get_total_step_count

Updated the high-level Thermocycler wrapper so target temperatures and protocol counts are tracked through wrapper state instead of requiring each backend to expose those values as backend commands.

Updated related tests so they no longer expect deleted backend methods.

Before / After Evidence

Before:

  • The four methods above were part of the abstract backend interface.
  • Multiple concrete thermocycler backends had to implement or stub these methods.
  • Tests directly expected these backend methods to exist.

After:

  • The backend interface no longer includes those unnecessary commands.
  • Concrete thermocycler backends no longer implement or stub them.
  • The high-level wrapper keeps target temperature and protocol count behavior through cached state.
  • Related tests were updated and the thermocycling test suite passes.

Acceptance Criteria

  • Removed unused backend methods
  • Updated concrete backend implementations
  • Updated high-level Thermocycler behavior
  • Updated related tests
  • Existing thermocycling tests pass
  • Ran whitespace/style check with git diff --check
  • No unrelated files or scope changes included

Testing

python -m pytest pylabrobot/thermocycling --timeout=10

Result:

11 passed, 1 skipped

Additional check:

git diff --check

Result: no output.

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.

remove unneeded commands from ThermocyclerBackend

1 participant