Developer Guide¶
This section is for extending Laser Setup: writing new measurement procedures, adding instruments, defining parameters, and understanding the internals.
-
The main event — build your own measurement from scratch, step by step.
-
The
parameters.yamlschema and how parameters reach procedures. -
Wrap a new piece of hardware as a PyMeasure instrument.
-
Make procedures, sequences and scripts appear in the app.
-
The
@configurabledecorator, PyMeasure patches, and helper utilities. -
How the test scripts work and how to run them with
uv.
Prerequisites¶
- You've followed the Tutorials and understand the experiment window, configuration and instruments.
- You have a working dev environment:
uv sync(see Installation).
Development conventions¶
-
Style:
flake8withmax-line-length = 100,max-complexity = 15;F401(unused import) is ignored in__init__.pyfiles. Run it with: -
Dependencies: add runtime deps to
[project].dependenciesand dev/docs tools to the matching[dependency-groups]inpyproject.toml, thenuv lockto refreshuv.lock. - Python version: the repo pins 3.12 via
.python-versionso wheels are available for every dependency. - Build on PyMeasure. Before writing a procedure or instrument, skim the
PyMeasure docs — Laser Setup
reuses its
Procedure,Parameter,Instrumentand managed-window classes.