conda-incubator / conda-recipe-manager

A project for libraries and automated tools that manage and manipulate conda recipe files.
BSD 3-Clause "New" or "Revised" License
10 stars 8 forks source link

Complex JINJA statements are not being evaluated in strings. #190

Closed schuylermartin45 closed 1 month ago

schuylermartin45 commented 1 month ago

There are two commented-out test case in the PR for #186 (in test_recipe_reader.py):

("sub_vars.yaml", "/requirements/run_constrained/15", True, "foo > 42"),
...
("v1_format/v1_sub_vars.yaml", "/requirements/run_constraints/15", True, "foo > 42"),

Complex JINJA expressions that are contained in strings currently do not get evaluated by RecipeReader::get_value(.., sub_vars=True):

foo > {{ '4' + "2" }}
schuylermartin45 commented 1 month ago

Found a fix for this while looking into another issue. Here's the PR: https://github.com/conda-incubator/conda-recipe-manager/pull/199