-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add params and docstring to run function in main.star #364
Comments
I think if we go down this road, this should be hidden under a group that is collapsable. And with the default params filled out. And with the option to override all with a single yaml config. |
Yep. This is all possible with the docstring! Can specify a default that can be overriden very easily with the yaml configs that already exist. I'll create a PR and request ya to demonstrate how it works. |
Default params for primitive values are actually already implemented in the newest version of Kurtosis: The option to override all with a single YAML config is definitely something we'll have in the near term (though we don't have it yet). Collapsible groups - what did you have in mind @barnabasbusa ? |
ethereum-package will have tens of different config parameters. If you have all of them "open" in a non collapsed manner, its gonna take up the whole page. Would be good to separate them into parts, such as participant group, network config, other configs, additional-tooling. |
This is possible simply by making them separate parameters to the def run(plan, participants=[], additional_tools=[], etc.): This will also allow each of them to have separate documentation, a la: https://github.com/kurtosis-tech/hyperlane-package/blob/main/main.star#L24 |
The
main.star
should contain a doc string that specifies exactly what the possible input args are, which ones are required and which ones are default, and what their descriptions are types are. This will make it easier for users to get onboarded to the ethereum package as they'll know what's parametrizable via a json/yaml file without having to go topackage_io
or go off solely example inputs, (author consumer divide)A good example to go off of is the hyperlane package.
Doing this will also make the package render with a nice form input in Kurtosis Cloud like by parsing docstring
Whereas the ethereum package one looks like this:
The text was updated successfully, but these errors were encountered: