-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The modular builder could be more expressive if we used curly brackets to inject JS/CSS etc than if we hard-coded this logic into specific fields:
https://jinja.palletsprojects.com/en/2.11.x/templates/
It works quite well in Jinja, dbt, Home Assistant and other projects, so it might work well here too. Rather than:
state: staging
sampleRate: 0
id: w474
name: Some test name
css: shared.css
recipes:
'0':
name: Control
'1':
name: Treatment1
js: 1.js
trigger: trigger.js
We could have something like:
state: staging
sampleRate: 0
id: w474
name: Some test name
css: {{ refCss('some-file.css') }}
recipes:
'0':
name: Control
'1':
name: Treatment1
js: {{ ref('1.js') }}
trigger: {{ ref('trigger.js') }}
This would allow us to support new variable types (e.g. JSON) or fields as they come available e.g. custom functions passed into the option
keys, like decisionAdapter
, storageAdapter
and whatnot.
This would change how we write all experiments' YAML files though, so perhaps we need to think this through properly and map out migration.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request