Skip to content

proposal: use matrix style variants config to avoid using zip_keys? #1604

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

Open
trim21 opened this issue May 1, 2025 · 2 comments
Open

proposal: use matrix style variants config to avoid using zip_keys? #1604

trim21 opened this issue May 1, 2025 · 2 comments

Comments

@trim21
Copy link
Contributor

trim21 commented May 1, 2025

like github actions, would is better to use variants config like this to replace zip_keys?

pairs:
  - { python: '3.8', numpy: '1.12' }
  - { python: '3.9', numpy: '1.14' }
zip_keys: ["python", "numpy"]
python: ["3.8", "3.9"]
numpy: ["1.12", "1.14"]
@wolfv
Copy link
Member

wolfv commented May 2, 2025

Yes, I definitely think zip keys are not the greatest invention and I would like a better alternative for sure.

We need to come up with a great name. pairs is not going to work since it can be more than 2 ...

@trim21
Copy link
Contributor Author

trim21 commented May 2, 2025

Yes, I definitely think zip keys are not the greatest invention and I would like a better alternative for sure.

We need to come up with a great name. pairs is not going to work since it can be more than 2 ...

I didn't suggest to add a special key paris, but to allow using list of dict (Vec<HashMap<String, String>> in rust) as value, currently it only support Vec<scale value>

If we do not want to extend any keys, I may prefer matrix but also not paris.

for a more detail example, in varants.yaml we have this:


some_other_config:
  - a
  - b
  - c

matrix:
  - { python: '3.8', numpy: '1.12' }
  - { python: '3.9', numpy: '1.14' }

then we got $2 \times 3 = 6$ builds.

and in recipe.yaml, we can do this:


requirements:
  host: 
    - some_other_lib ${{ some_other_config }}
    - python ${{ matrix.python }}.* 
    - numpy ${{ matrix.numpy }}.* 

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

2 participants