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

Question on function of python-version patch #244

Open
jacquelinegarrahan opened this issue Aug 16, 2022 · 4 comments
Open

Question on function of python-version patch #244

jacquelinegarrahan opened this issue Aug 16, 2022 · 4 comments

Comments

@jacquelinegarrahan
Copy link

The python-version patching is not clear when used with an existing environment.yml file.

I have an environment.yml file that looks like:

name: my-model-dev
channels:
  - conda-forge
dependencies:
  - python=3.9
  - click
  - pydantic
  - lume-model=1.4 

From existing documentation, it seems that the python provided should be patched with the python version provided in:

  - uses: conda-incubator/setup-miniconda@main
    with:
      mamba-version: "*"
      channels: conda-forge
      activate-environment: my-model-dev
      environment-file: environment.yml
      python-version: ${{ matrix.python-version }}

From the workflow, I can see that the patch workflow is being kicked off, but the python pin is not updated and I am unable to resolve my environment using the passed version. Is the environment file being updated only in the case of missing python? Are there ways to override pinned python?

@anstadnik
Copy link

I'm also interested in this

@jaimergp
Copy link
Member

It should work if the environment contains a bare python requirement (no version), like:

name: my-model-dev
channels:
  - conda-forge
dependencies:
  - python  # changed
  - click
  - pydantic
  - lume-model=1.4 

@vthemelis
Copy link

What exactly are the semantics of the python-version argument in the action uses invocation?

Am I right to expect that

  - uses: conda-incubator/setup-miniconda@main
    with:
      python-version: 3.9

is going to install version 3.9 of Python?

@mattwthompson
Copy link

Yes, that will install Python 3.9 into the base environment. There evidently is a conflict if you also use an environment file that requires a different version.

As a matter of opinion, I personally recommend not specifying the Python version in the environment at all. In other words, use environment files like Jaime posted above, just with - python and nothing else.

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

5 participants