Korving-F / DACA

DAtaset Creation Aquisition engine
MIT License
4 stars 0 forks source link

BUG: Jinja2 templating functionality breaks #25

Open Korving-F opened 2 years ago

Korving-F commented 2 years ago

Because the Jinja2 template / Scenario go through multiple steps of pre-processing, some scenarios using standard Jinja2 functionality breaks while it shouldn't.

# Does work: variables and filters
{{ some_variable | to_nice_json }}

# Does not work: statements
{% set my_var= "something" %}

# Untested: comments
{# my super duper comment #}
Korving-F commented 2 years ago

This is caused by the sequential sweep in scenario.py and most likely requires some regex-based string-replacement solution instead. https://github.com/Korving-F/DACA/blob/ee73a8dc0c19d52c3dba698a5ae050553e4cd3ff/daca/scenario.py#L200