-
Notifications
You must be signed in to change notification settings - Fork 68
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
add mamba support #47
Conversation
Welp, seems to work! Unfortunately, there's an issue in how environments are installed in this action. Mamba does not support |
@jaimergp thanks for the PR. The reason was to simplify the logic but then id mamba has that limitation then we should probably change it. |
Seems that they might "look into it" today. Let's see :) |
In the meantime, I have given it some thought (and this is probably out of the scope of this PR, so feel free to branch the discussion into a separate issue). Right now, there are several ways a new environment gets initialized with this action:
I think environment creation from a file should be decoupled from the Custom env + Python of your choosing setup. It's less problematic, faster and the code shouldn't be much more complicated. What do you think? This could be enforced with errors and warnings too. For example if both python-version and environment-file are specified, it should be an error IMO, since the Python version of your choice should be specified in the YML anyway. For matrix builds, this is solved with multiple env files if needed or other conda magics. |
Yes, and no
This is precisely the reason why it is split into steps, you could have a single yaml file with python specified, but not the actual version. A lot of projects need to test with different versions and doing this way is what allows for that. On these points
I don't understand what you mean by this.
Not exactly true, as explained above is python is a requirement but several versions will be tested the python in the env yaml should have no version.
Not really. An empty env has no solver, so the waiting time is practically zero. A python installation takes no time to solve since it will be placed on an empty env and uses well-established dependencies. environment update-> In here the Python version will be used as a constraint for the new environment and that is the reason why python version will not be changed at all. It is not possible to have a single env create step and be able to provide a python version, since the command that runs that is condo env not conda, so something like:
And yes this is a separate issue and a separate thread and exposed before, the only viable change for current workflows (that use the possibility of changing the python version without hardcoding it on the env.yaml) is to reduce going from 3 steps to just two so that creating the empty env and adding python to it is a single step. In reality, the gain in that is like 1 second, so not really worth the trouble. |
Thanks for the detailed answer! Is it possible then to have an environment set up without Python? Let's say, we have this file: name: test
channels:
- conda-forge
- defaults
packages:
- cmake
- clang-dev |
Yes, if See: https://github.com/goanpeca/setup-miniconda/blob/master/src/setup.ts#L759 |
Awesome! Thanks for the explanation again, then my main concerns were based on misconceptions :) Apologies for the time taken 😬 |
Getting back to this PR, are you comfortable with the
|
Hmmm good points Since mamba is a package and conda does not have the notion of latest (miniconda installers do) I would be inclined in having to provide an actual version number. So I am still not 100% on either of the suggestions, since that would hold for python-version: "latest" for instance. Mamba is an "advanced" feature so you should be explicit about the version you want if you are already on that path. What do you think @bollwyvl ? Maybe
|
You are right, |
Btw, |
Haha awesome and great to hear |
I have just released mamba 0.3.2 |
Awesome! Thanks @wolfv ! |
@jaimergp is everything working as expected? Do you need to make an update to the examples to check for the fix? |
Looks like the new mamba is indeed applied with I am a bit confused because of how the downloads look, though. In a regular |
HI @jaimergp I think you're right. With |
Not at all, no need to apologize, thanks for the help @jaimergp Is this good to go? I can make a release and get this in the wild and see how it goes :-) |
Ok merging, will make a release soon :-p |
Thank you so much! |
hey, mamba 0.3.3 (it's in the process of being released to conda-forge) has an important fix for an issue that manifested itself in CI environments sometimes. Just wanted to make sure that you're not stuck on 0.3.2! Cheers & thanks for your work here! |
Ok version 1.6 is out 🥳 ! |
Yayy thanks everybody!! |
As discussed per #14.
This is my first TS GitHub Action, so I might have done things in a weird way. Also, I don't know how to test locally, so let's see if it works.
Please let me know how I can improve the TS idioms too!