-
Notifications
You must be signed in to change notification settings - Fork 4
Add support for multiple environments #11
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
base: master
Are you sure you want to change the base?
Conversation
|
Hey, thanks so much @lmfaber for the contribution, this looks really cool! I'm not using Ansible these days, so it's difficult for me to give a proper review, but perhaps @gdevenyi could help? A few things I noticed:
Thanks again @lmfaber! |
|
Hi @maresb, thanks a lot for your fast response and your input!
Cheers. |
|
Thanks a lot for cleaning up the permissions and deleted EOLs, the diff for this PR is much cleaner now! I agree that Regarding the new method for creating environments, is there a particular reason you rewrote the logic? I haven't used Ansible for a few years now, so I'm really hoping that @gdevenyi can help with testing, current best practices, etc. |
|
Great, I will leave Absolutely, we should make the migrating as easy as possible for users. I've had a look at replacing the old Of course, this need to be done for all the different OS. To keep it a bit more organized, my suggestion would be to separate all the bashrc steps from the I mailny rewrote the logic, because I needed the for loop for the different environments to be created and I didn't know how to incorporate the current three steps (Build first part of arguments, Build channel part of arguments, Create a new conda environment) into that loop properly otherwise. I'm really open to suggestions here, as I'm mainly limited by my missing Ansible knowledge 😄 |
|
Makes sense to me. I've reviewed this as thoroughly as I practically can without relearning Ansible. I wonder if @atrawog is still using Ansible? He might be able to help as well. |
…files if present.
|
I've added the changes regarding the bashrc files (separating in a new file and deleting the old micromamba statement if present). That should help migrating users. It's not the cleanest solution. I'm pretty sure one could use a loop here as well, but I decided against if for now. The changes were tested with a bashrc file that contains the old statement and no new one: The Ansible output is then the following: Regarding the refactoring of the env creation logic, I'd suggest we wait a bit for @atrawog to respond as I'm not in a hurry with those changes. If you decide you'd like to keep the old logic, let me know and I'll have a look again. Thanks for your help @maresb Cheers. |
|
Hi. All my code was written assuming that micromamba was going to end up in a system-wide PATH that users have accessible. I think if there's any deviation from the default install that we can't safely assume that the path will be accessible via all users and things shouldn't be configured in a system-wide way. I don't think I'd want to see the path to the micromamba binary hard-coded into the scripts either. Perhaps the better solution here is to return to my implementation and wrap it in an option that's off by default. For user level installs, it should probably do something more like: |
You make a really good point. The scenario I had in mind to protect against is that you may have multiple versions of |
Inspired by issue #5, I've implemented a way to support multiple environments with different channels and packages. This is merely a suggestion, please feel free to add any other ideas or issues that I might have overseen.
Cheers.