Skip to main content

seq-quince

seq-quince: An asynchronous, YAML-configured device scheduler for EPICS beamlines, built on kiwi-scan.

Devices (motors, actuators, hexapods, PV sequences, scans, wait conditions, …) are declared in a beamline.yaml. Named presets map devices to target poses. The scheduler turns a preset into a sequence of move steps, runs them serially or in parallel groups, and rolls completed steps back to their pre-run snapshot if a step fails.

Overview of Features

  • YAML + Jinja2 configuration – beamline.yaml and presets.yaml are rendered as Jinja2 templates; both ${TOKEN} and {{ TOKEN }} placeholders are supported, as well as {% include %} from sibling/parent directories.
  • Device abstraction – every device implements DeviceABC (process, snapshot, busy, stop, optional capabilities).
  • Device factory – devices are created from config by their type: key; custom types can be registered at runtime.
  • Custom device extensions — Load external device modules and packages via SEQ_QUINCE_DEVICE_PATH, with explicit registration through DEVICE_CLASSES.
  • Sequences – presets are converted into MoveStep lists with serial or parallel grouping and barriers.
  • Async scheduler – concurrent execution per group, optional per-step timeouts, best-effort rollback on failure.
  • Snapshots – current device read-backs can be saved as a new preset (presets.yaml).
  • kiwi-scan integration – ScanDevice runs any kiwi-scan scan type, ActuatorDevice/HexapodDevice use kiwi-scan actuators.

Installation

pip install seq-quince

For development, clone the repository and install it in editable mode:

pip install -e .

Command line tools

Command Purpose
scheduler_runner Run a preset (--config, --preset, --loop, --delay, --snapshot, --replace)
device_runner Run one device from a preset; see device runner.

Example:

scheduler_runner --config u171dcm1 --preset branch --replace BL=U171

Configuration

See docs/devices.md and docs/devices for configuration details.

# beamline.yaml
devices:
  - name: simulation
    type: SimDevice
    delay: 0.1
  - name: mono_energy
    type: ActuatorDevice
    config: { ... }          # kiwi-scan ActuatorConfig

presets:
  branch:
    simulation:  { position: 10.0 }
    mono_energy: { position: 400.0 }

Presets from presets.yaml (written by --snapshot) override presets of the same name in beamline.yaml. Unknown preset names raise ValueError; an explicitly configured empty preset (empty: {}) remains valid. Device names must be unique: duplicates are rejected before any devices are constructed.

After template rendering, YAML is parsed with yaml.safe_load(). Python-specific YAML tags are rejected. Normal loading does not print the rendered configuration.

Environment variables used by the code:

Variable Used for
SCHEDULER_CONFIG_DIR Direct configuration directory; overrides beamline-name lookup.
SEQ_QUINCE_CONFIG_DIR Existing base directory; looks in <dir>/scheduler_config/beamlines/<config> when no direct override is set.
SCAN_CONFIG_DIR kiwi-scan config directory for ScanDevice
SCAN_DATA_DIR Output directory for ScanDevice scans

See docs/devices.md for the built-in device types and their configuration keys.

Development

make help      # list targets
make lint      # pylint, ruff, pyright
make test      # pytest
make build     # sdist + wheel
make install_completion # install bash completion scripts
make uninstall_completion # uninstall bash completion scripts
make clean     # Remove local virtualenv and python generated files
make cscope    # Build cscope and ctags indexes
make tag       # create git tag

License

MIT – see LICENSE.

Metadata

Release files for seq-quince 0.1.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 seq-quince 0.1.1
File Size Uploaded Provenance Actions
seq_quince-0.1.1.tar.gz 112.3 kB Without provenance Details for seq_quince-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seq-quince 0.1.1
File Interpreter ABI Platform Actions
seq_quince-0.1.1-py3-none-any.whl Python 3 none any Details for seq_quince-0.1.1-py3-none-any.whl

Total release size: 168.6 kB

Release files / seq_quince-0.1.1.tar.gz

Download URL seq_quince-0.1.1.tar.gz
Size 112.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d409b23254337b50ac0be9bb6d1bff59a0a066a64830e5c88048debc3e8ce3bd
BLAKE2b-256 checksum
How to use checksums
04017a0517b762f3641a39d5eba81e6a36c037af46f7a9d4a9e302a69655b274
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / seq_quince-0.1.1-py3-none-any.whl

Download URL seq_quince-0.1.1-py3-none-any.whl
Size 56.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3f78ec356ef27ebe31d345047c72d0230be14c73019afc23f0bf42ac54be6ee
BLAKE2b-256 checksum
How to use checksums
e605b1c24fbe3593b17c0a109f3b5179f9e0af79ffc0c0ff088599bcfaed67f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Security for seq-quince 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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