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

environment-name now is a mandatory argument #54

Closed
ocefpaf opened this issue May 12, 2022 · 8 comments
Closed

environment-name now is a mandatory argument #54

ocefpaf opened this issue May 12, 2022 · 8 comments

Comments

@ocefpaf
Copy link

ocefpaf commented May 12, 2022

It seems that environment-name now is a mandatory argument, even when using environment-file: false. That is a bit counter intuitive and a breaking change. I did not look into the details but how hard would be to maintain the old behavior and have the new changes? Maybe a default environment-name: nofile?

I believe this was introduced in #45 but I'm not sure. Trying to pin the GHA in all my CIs to get them back online.

@jonashaag
Copy link
Collaborator

jonashaag commented May 12, 2022

It is mandatory if you use environment-file: false. What would you expect Mamba to use as environment name in that case?

Edit: Oh, or do you simply not care about the environment name?

@ocefpaf
Copy link
Author

ocefpaf commented May 12, 2022

I do and it is set when I call micromamba. When we don't have an environment file you are usually handling things with the CLI, with less magic. This change makes the "just get me micromamba" option a bit more complex.

@jonashaag
Copy link
Collaborator

I see, good point. I think it is fine to not require a name if nothing is going to be installed.

jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
jonashaag added a commit to jonashaag/provision-with-micromamba that referenced this issue May 12, 2022
@ocefpaf
Copy link
Author

ocefpaf commented May 12, 2022

BTW the setup below is, IMO, a good setup b/c the lines in the yaml are almost dev install instructions:

- name: Setup Mamba
      uses: mamba-org/provision-with-micromamba@v11
      with:
        environment-file: false

    - name: Python ${{ matrix.python-version }}
      shell: bash -l {0}
      run: |
        micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
        micromamba activate TEST

Sure I can add the env name there but it feels awkward b/c that option should exits only to override the name in the environment.yaml file. In fact one could argue that we can even rename the env from the CLI too when using an env file.

@hadim
Copy link

hadim commented May 13, 2022

@jonashaag
Copy link
Collaborator

Can you test with the branch in the PR?

@hadim
Copy link

hadim commented May 14, 2022

Already did and it works for me.

@ocefpaf
Copy link
Author

ocefpaf commented May 16, 2022

Thanks @jonashaag for the quick fix!

ocefpaf added a commit to ocefpaf/erddapy that referenced this issue May 16, 2022
@zmoon zmoon mentioned this issue Aug 4, 2022
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