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
After some thought, I see 3 ways of accomplishing this:
We could allow extra arguments and if they are passed we replace the string with the right values
We could dynamically create subcommands - one for each recipe with it's own help and call each subcommand after assert has run
Create another command entirely for recipes
Some points to consider:
What if the user passes multiple recipes?
What if the arguments have similar names?
How can we enforce that the arguments go to the correct recipe?
As of now, I do not see a feature like this because
It may make the app less intuitive for users and add some unnecessary complexity
We only have one recipe that it'd make sense to pass arguments (max-cells)
If a user really wants another value, he/she can easily do this by passing the expression instead of the recipe + argument (databooks assert "len(nb.cells) < 10")
That being said, I'm open to revisit this once we have more recipes/there's community interest in a feature like this. If there's a simple way to go around this I'm also open to review any PRs regarding this.
Make recipes take variables so that they could be reused more easily.
Example:
The recipe:
The command:
Would return the arguments of that recipe
The text was updated successfully, but these errors were encountered: