Skip to main content

matterlab_hotplates

matterlab_hotplates provides serial drivers for the heat-stir devices used in the Matter Lab. The package wraps device-specific command sets behind a small common interface so automation code can read temperatures, set heating targets, and control stirring without dealing with raw serial commands.

Supported Devices

  • HeatStirPlate: shared abstract base class
  • IKAHotplate
  • HeidolphHotplate
  • IKAHBHotbath

Installation

Install the package:

pip install matterlab_hotplates

For development:

pip install -e .[dev]

The package depends on matterlab_serial_device, which is installed automatically.

Quick Start

Example with an IKA hotplate:

from matterlab_hotplates import IKAHotplate

hotplate = IKAHotplate(com_port="COM5")

print("Current temperature:", hotplate.temp)
print("Current stirring speed:", hotplate.rpm)

hotplate.temp = 80
hotplate.rpm = 400
hotplate.stand_by()

Core API

The shared HeatStirPlate interface exposes:

  • temp
  • target_temp
  • rpm
  • target_rpm
  • stand_by()

Device-specific classes add their own helpers:

  • IKAHotplate: reset(), tare(), weight
  • HeidolphHotplate: _set_new_interface_protocol()
  • IKAHBHotbath: name, maxtemp

Testing

Simulation Tests

Simulation tests are the default validation layer and are safe for CI.

One-click run:

python examples/test_sim.py

Direct pytest run:

pytest tests/test_heat_stir_plate.py tests/test_ika_sim.py tests/test_heidolph_sim.py tests/test_ika_hotbath_sim.py

Hardware Tests

Hardware tests are opt-in because real devices may not be connected in every environment.

Available hardware test files:

  • tests/test_ika_real.py
  • tests/test_heidolph_real.py
  • tests/test_ika_hotbath_real.py

They are marked with @pytest.mark.real and are skipped unless --run-real is supplied.

Example:

pytest tests/test_ika_real.py --run-real --com-port COM5

You can also provide hardware configuration through an environment variable:

  • HOTPLATE_COM_PORT

Examples

The examples/ directory contains the recommended entry points:

  • examples/test_sim.py: one-click simulation-only test runner
  • examples/real_devices.py: readable examples for real IKA, Heidolph, and hotbath hardware
  • examples/README.md: short guide to the examples directory

Development

Useful commands:

pytest
ruff check .
ruff format .

The default pytest configuration includes retries, timeouts, coverage output, and uses src as the import root for local development.

Package Layout

src/matterlab_hotplates/
  base_hotplate.py
  heidolph_hotplate.py
  ika_hotbath.py
  ika_hotplate.py
tests/
examples/

License

This project is distributed under the MIT License. See LICENSE for details.

Metadata

Release files for matterlab-hotplates 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matterlab-hotplates 1.2.1
File Size Uploaded
matterlab_hotplates-1.2.1.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matterlab-hotplates 1.2.1
File Interpreter ABI Platform
matterlab_hotplates-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.2 kB

Release files / matterlab_hotplates-1.2.1.tar.gz

Download URL matterlab_hotplates-1.2.1.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
895185e788bf631f5f2444448187ba34362c37ec31a07c4b2a553cee1df53c67
BLAKE2b-256 checksum
How to use checksums
d4f0dd62c35ea079b4a5ef72cb0eab2765a43db18b1ace7f85e4ab5c44a288a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release files / matterlab_hotplates-1.2.1-py3-none-any.whl

Download URL matterlab_hotplates-1.2.1-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9bb0d8e4d347ec8d16bd7025e4d3097b5cc0bb2ce7b2eb7f6e1906504a54fce
BLAKE2b-256 checksum
How to use checksums
92bb9dd21063ef31f84bcddd98e79cb9f59f958f1b4cc3ee0d62c045b510bb29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page