You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add py mode of execution where pipeline authors don't need to trip over the context['arbkey'] syntax and can just use arbkey:
- name: pypyr.steps.contextsetfcomment: set arb context to manipulate in the next stepin:
contextSetf:
existing_key: existing valueexisting_dict:
a: a valueb: 123
- name: pypyr.steps.pydescription: runs arb pythonin:
# multi-line statement starts with |, per yaml specpy: | from math import sqrt print(f"py step: {1+1}") arbvalue = sqrt(1764) print(int(arbvalue)) existing_key = 'updated value' existing_dict['a'] = 'a value set in py step' existing_dict['b'] = 456
Make this backwards compatible so pipeline author can use either pycode or py inputs. Additionally, there might be occasions where access to the dict object itself is useful, rather than just its contents.
The text was updated successfully, but these errors were encountered:
working with context in a
pypyr.steps.py
step means working with the dict object rather than its contents:Add
py
mode of execution where pipeline authors don't need to trip over thecontext['arbkey']
syntax and can just usearbkey
:Make this backwards compatible so pipeline author can use either
pycode
orpy
inputs. Additionally, there might be occasions where access to the dict object itself is useful, rather than just its contents.The text was updated successfully, but these errors were encountered: