-
Notifications
You must be signed in to change notification settings - Fork 376
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
Support multiple env yaml specs #2993
Conversation
Thanks for working on this! This definitely needs more tests and coverage of edge cases. Some things that come to mind, not an exhaustive list:
|
Thanks. These are great suggestions. I found a bit more time today to work on this. General thought: It would be good to understand what new testing you feel is required just for multi-yaml-spec support. Happy to add more if you feel it makes sense. Thanks for the help thus far! Re specific tests: First, I modified the multi-spec test to properly handle multiple yamls.
I did write a test for this (removed after): I ran this through micromamba:
This actually works. This makes me think the check for conflicting defaults belongs at a lower layer, not multi-yaml-spec parsing. Thoughts?
I don't think yaml specs support If you point me at docs or anything, happy to add a test here.
I wasn't sure what you meant here. I added
done! added a test too. |
libmamba/src/api/install.cpp
Outdated
for (auto& file : file_specs) | ||
{ | ||
// read specs from file :) | ||
if (is_env_lockfile_name(file)) | ||
{ | ||
if (spec_type != mamba::detail::unknown && spec_type != mamba::detail::env_lockfile) { |
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.
I don't like that we are duplicating the type checks and that we are mixing type checking and type "inference". Maybe it's cleaner to use a separate type check loop
Looks pretty good already. What happens if you specify conflicting specs in the files? eg. python=3.11 and python=3.10. Is the error message helpful? |
Tried:
It's similar (but not identical!) to just passing cli specs:
|
I think it should be ready for another look! |
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.
Nice thank you!
Sorry @jonashaag for the fail merge attempts. I was experimenting with this merge queue, but it seems not to be working well. Giving it a last try or I will remove the setting. |
7887264
to
8c83d35
Compare
Co-authored-by: Jonas Haag <jonas@lophus.org>
Co-authored-by: Jonas Haag <jonas@lophus.org>
8c83d35
to
c2231c9
Compare
Thank you for your patience @jchorl |
Tested:
testmultiyml/env1.yml
testmultiyml/env2.yml
Not sure if there's other edge cases worth considering or test cases that would be helpful.