-
Notifications
You must be signed in to change notification settings - Fork 9
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
Arbitrary injections #67
Conversation
Codecov Report
@@ Coverage Diff @@
## main #67 +/- ##
=======================================
Coverage 86.17% 86.18%
=======================================
Files 13 14 +1
Lines 405 427 +22
=======================================
+ Hits 349 368 +19
- Misses 56 59 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
In @jbusecke and my limited testing, this featured worked for injecting a value into a "template recipe", here: More thought can be given to how to best generalize this feature. The reserved function name we use currently is not as flexible as I imagine we'd want this to be before merging. |
@jbusecke, as of the last commit you can now call the
where
assuming |
#86 is the plugin system for injections. However, I think that's a bit different from what is happening here. This is more of a 'traitlets pass through' - you want to have one recipe, and feed it different options from the commandline. Is that right? Is there code that's using this already? One primary question for me is how this would affect the model of a recipe being reproducible. Right now, the params you pass on the commandline don't actually affect the work being done - only where it's sent to or cached or whatever. How would that change? |
I think those are valid concerns, and in fact @cisaacstern and I have gone a different route with the CMIP6 feedstock. I am not sure that this method is better in terms of reproducibility, but it works for now. |
Yes, as noted by @jbusecke, we are not using this actively, and while I can't say for sure how much better the current approach is (not the entry points thing, I mean the link by Julius above), I think it is more intelligible than this, and am happy to see this be closed, as I was concerned that it was far too permissive (despite being the one who authored it 😆 ). Which is a long way of saying, thanks for taking a look, and I'll close now! |
WIP with @jbusecke to support arbitrary callable args injections.
Motivated by the desire to create "template recipes" for CMIP6 which can be called with arbitrary input parameters at recipe parse time.