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

Make komodo transpile and combine agnostic of python and rhel #332

Open
hnformentin opened this issue Feb 6, 2023 · 1 comment
Open

Comments

@hnformentin
Copy link
Contributor

hnformentin commented Feb 6, 2023

Currently rhel and py is hard-coded in different places of the code.
#308 adds the argument coords as an entry, but still we rely on entries based on rhel and py.
@kwinkunks suggested to pass the coords dictionary in order to be able to use different operation systems and frameworks.

@hnformentin
Copy link
Contributor Author

Eventually I think format_release() could look more like this:

def format_release(base, matrix):
    for coords in product(*matrix.values()):
        coord_strings = [f"{name}{coord}" for name, coord in zip(matrix.keys(), coords)]
        yield '-'.join([base] + coord_strings)

Then be called like...

matrix = {"py": ["3.8", "3.10", "3.11"], "rhel": ["7"], "loc": ["Azure", "Onprem"]}

for fname in format_release('baseybase', matrix):
    print(fname)

This produces:

baseybase-py3.8-rhel7-locAzure
baseybase-py3.8-rhel7-locOnprem
baseybase-py3.10-rhel7-locAzure
baseybase-py3.10-rhel7-locOnprem
baseybase-py3.11-rhel7-locAzure
baseybase-py3.11-rhel7-locOnprem

This way, it feels like we have lots more flexibility because the code never needs to know what our matrix names and coordinates are --- we could add Ruby or switch to Ubuntu without changing anything.

If this is all too much to ask of this PR, no worries --- I just wanted to clarify what I had in my mind! (For me as much as anything :)

Originally posted by @kwinkunks in #315 (comment)

@eivindjahren eivindjahren added the christmas-review Issues and PRs for Christmas review label Dec 13, 2024
@jonathan-eq jonathan-eq removed the christmas-review Issues and PRs for Christmas review label Dec 17, 2024
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

3 participants