DiamondLightSource / DiamondLightSource/techui-builder

Handle Jinja templating in ioc.yaml and fastcs.yaml

Open
#221 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The plan is for Jinja templating to be used in the config yamls for services, and techui-builder needs to handle this to extract what it needs.

ADAravis example:
```
ioc_name: "{{ _global.get_env('IOC_NAME') }}"

description: auto-generated by https://github.com/epics-containers/builder2ibek

entities:
- type: epics.EpicsEnvSet
name: EPICS_TS_MIN_WEST
value: "0"

- type: epics.EpicsCaMaxArrayBytes
max_bytes: 100000000

- type: devIocStats.iocAdminSoft
IOC: "{{ ioc_name | upper }}"

- type: autosave.Autosave
P: "{{ ioc_name | upper }}:"
```

(Approximate) fastcs.yaml example:
```
controller:
serial_settings:
port: "/dev/usbip-{{ _global.get_env('IOC_NAME') }}-usb-mff-tty"
transport:
- ioc:
pv_prefix: "{{ _global.get_env('IOC_NAME') | upper }}"
gui:
output_path: /epics/opi/index.bob
title: LED Flip Mirror
```

techui-builder could possibly also use the output_path to locate autogenerated screens.

(in techui.yaml)
```
FLIP_1:
prefix: BL01C-EA-FLIP-01
label: Light Source Flipper
file: $(IOC)/$(GUI)
macros:
P: BL01C-EA-FLIP-01
IOC: https://b01-1-opis.diamond.ac.uk/bl01c-ea-flip-01
GUI:
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.