NBS Simulation IOC Generator
Project description
nbs-sim
nbs-sim provides a configurable EPICS simulation IOC for NBS beamline environments.
It builds a caproto-based IOC from startup configuration files and simulated device
classes so UIs and orchestration systems can be exercised without hardware.
Features
- Loads simulated devices from configuration
- Exposes PVs through a caproto IOC.
- Supports startup from a profile startup directory or explicit config file paths.
- Includes simulation device classes for motors, shutters, detectors, optics, and beamline-specific components.
Requirements
- Python
>=3.8 - Runtime dependencies from
pyproject.toml:caprotoscipynumpynbs-blnbs-core
Installation
pip (editable)
pip install -e .
pixi
If you use pixi in this monorepo:
pixi install
pixi run python -m pip install -e .
Running the IOC
The CLI entrypoint is nbs-sim.
Option 1: startup directory
Point to a startup directory that contains:
devices.tomlsim_conf.toml
nbs-sim --startup-dir /path/to/startup --list-pvs
Option 2: explicit file paths
nbs-sim \
--device-file /path/to/devices.toml \
--config-file /path/to/sim_conf.toml \
--list-pvs
If neither --startup-dir nor both config file options are provided, startup exits
with a CLI error.
How it works
nbs_sim.beamline:mainparses CLI arguments and loads device configuration.generate_device_configmerges the device and simulation configuration files.loadFromConfiginstantiates devices withcreateIOCDevice.- The IOC is started with caproto
run(...).
Development
Install development tools:
pip install -e ".[dev]"
Run tests:
pytest
Format and lint:
black src
flake8 src
Package layout
src/nbs_sim/beamline.py: CLI entrypoint and IOC assembly.src/nbs_sim/load.py: device factory helper used by autoload.src/nbs_sim/devices/: simulation device implementations.
Notes
- Project status is currently alpha.
- This package expects configuration files generated or maintained by the broader NBS beamline stack.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nbs_sim-0.2.1.tar.gz.
File metadata
- Download URL: nbs_sim-0.2.1.tar.gz
- Upload date:
- Size: 184.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1584d8c101e7c2cb86e41132dbd67485ca1c99dfe94d53a94ba50f6132c6a6bb
|
|
| MD5 |
f22f2e5b5ad382f0bbf7aa7f76c3df2e
|
|
| BLAKE2b-256 |
07772a4721710d14b135ad5af2c870b5ae40059b6c37e688f664eda519bbea79
|
Provenance
The following attestation bundles were made for nbs_sim-0.2.1.tar.gz:
Publisher:
python-publish.yml on xraygui/nbs-sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nbs_sim-0.2.1.tar.gz -
Subject digest:
1584d8c101e7c2cb86e41132dbd67485ca1c99dfe94d53a94ba50f6132c6a6bb - Sigstore transparency entry: 1310979942
- Sigstore integration time:
-
Permalink:
xraygui/nbs-sim@219b1cb1269b26e1f20d17856fbb5e095bd765f8 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/xraygui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@219b1cb1269b26e1f20d17856fbb5e095bd765f8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nbs_sim-0.2.1-py3-none-any.whl.
File metadata
- Download URL: nbs_sim-0.2.1-py3-none-any.whl
- Upload date:
- Size: 184.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
773c07977c949fdfcc539bb1d1081195eadd81b65a69acec21eb3a47a3db5d4b
|
|
| MD5 |
009032a9c0751da33d7729399401a66f
|
|
| BLAKE2b-256 |
3a2e31497b274486742dc530372155ebaa82a55336a4aacafcdf41a666e76547
|
Provenance
The following attestation bundles were made for nbs_sim-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on xraygui/nbs-sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nbs_sim-0.2.1-py3-none-any.whl -
Subject digest:
773c07977c949fdfcc539bb1d1081195eadd81b65a69acec21eb3a47a3db5d4b - Sigstore transparency entry: 1310980164
- Sigstore integration time:
-
Permalink:
xraygui/nbs-sim@219b1cb1269b26e1f20d17856fbb5e095bd765f8 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/xraygui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@219b1cb1269b26e1f20d17856fbb5e095bd765f8 -
Trigger Event:
release
-
Statement type: