Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set recipe params #14

Open
henridwyer opened this issue May 26, 2017 · 2 comments
Open

set recipe params #14

henridwyer opened this issue May 26, 2017 · 2 comments

Comments

@henridwyer
Copy link

It would be useful to be able to set the recipe params on a recipe object

@cstenac
Copy link
Member

cstenac commented May 26, 2017

r = project.get_recipe("compute_pouet")
def = r.get_definition_and_payload()
def.get_params()["mynewparam"] = "mynewvalue"
r.set_definition_and_payload(def)

@henridwyer
Copy link
Author

Thanks this works, although the above code can fail for some recipes which have None for recipe params.

I guess I was thinking that since there is a method to explicitly get the recipe params, there could be one to set them. Feel free to close if you think that's unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants