-
Notifications
You must be signed in to change notification settings - Fork 5
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
Python recipe render improvements #57
Conversation
270838d
to
c9ac681
Compare
from itertools import product | ||
|
||
|
||
def variant_combinations(data: dict[str, str | list[str]]) -> list[dict[str, str]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could definitely use a function docstring and explain what the inputs and outputs are.
|
||
|
||
# Custom constructor for loading floats as strings | ||
def float_as_string_constructor(loader, node) -> str: # noqa: ANN001 | ||
return loader.construct_scalar(node) | ||
|
||
|
||
def convert_to_plain_types(data: Any) -> Any: # noqa: ANN401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a docstring? What is a plain type?
override_version: str | None = None, | ||
) -> set[Source]: | ||
""" | ||
This function should render _all_ URL sources with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete docstring
from itertools import product | ||
|
||
|
||
def variant_combinations(data: dict[str, str | list[str]]) -> list[dict[str, str]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to add a few test cases specifically for this?
This renders the data more properly in order to extract all the sources. The plan is:
Ideally, this will be implemented in rattler build as a command such as
rattler-build bump-version ./recipe -m ./variant-config/*.yaml
- but for now I am prototyping this here to get it into the bot.