question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Support for "conda-devenv" extension

See original GitHub issue

First of all, Iā€™d like to thank you guys for this awesome project! šŸš€

Background

The conda-devenv extension adds the ability to work with multiple projects in development mode, by processing environment.devenv.yml files, similar to regular environment.yml files, with features like Jinja2 templating, files inclusion, and environment variables.

https://github.com/ESSS/conda-devenv

Scenario

Environment devenv files are parsed incorrectly and the action throws an error.

# .github/workflows/simple-workflow.yml
  ...
  with:
    activate-environment: ${{ steps.configure.outputs.env-name }}
    environment-file: ${{ steps.configure.outputs.env-file }}
    python-version: ${{ steps.detect-version.outputs.version }}
  ...
# environment.devenv.yml
name: a-simple-service
dependencies:
  - gcc_linux-64 # [linux]
includes:
  - environment.yml
# environment.yml
name: a-simple-service
channels:
  - conda-forge
  - defaults
dependencies:
  - mypy
  - pip
  - python=3.8.5
  - pytest

The error

The response of the action setup is next:

> Updating 'a-simple-service' env from conda env update...
  /usr/share/miniconda/condabin/conda env update --name a-simple-service --file a-simple-service/environment.devenv.yml
  /home/runner/work/_actions/conda-incubator/setup-miniconda/v2/dist/setup/index.js:8193
                              throw new Error(`"${command}" failed with "${forced_error}"`);
                              ^
  
  Error: "/usr/share/miniconda/condabin/conda,env,update,--name,a-simple-service,--file,a-simple-service/environment.devenv.yml" failed with "EnvironmentSectionNotValid"
      at Object.stdout (/home/runner/work/_actions/conda-incubator/setup-miniconda/v2/dist/setup/index.js:8193:35)
      at Socket.<anonymous> (/home/runner/work/_actions/conda-incubator/setup-miniconda/v2/dist/setup/index.js:823:52)
      at Socket.emit (events.js:210:5)
      at addChunk (_stream_readable.js:309:12)
      at readableAddChunk (_stream_readable.js:290:11)
      at Socket.Readable.push (_stream_readable.js:224:10)
      at Pipe.onStreamRead (internal/stream_base_commons.js:182:23)

Thank you very much!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bollwyvlcommented, Jul 23, 2021

A reproducer would help, but thereā€™s an example of using base directly (which is probably appropriate in this case) in the docs.

- uses: conda-incubator/setup-miniconda@v2
  with:
    auto-activate-base: true
    activate-environment: ""

I donā€™t remember if that will work with environment-file, but probably does.

1reaction
bollwyvlcommented, Jul 23, 2021

I think the previous suggestion is the path forward for us here (use setup-miniconda, then insert-your-tool-here). This clearly separates the problem of ā€œget non-ancient condaā€ from ā€œdo stuff (with conda)ā€ā€¦ And would allow you to swap out for, say provision-micromamva

If you can lobby conda+mamba to support your file format (good luck) Iā€™m all for it!

nox, anaconda-project, etc. have all been used successfully with this action, and with infinite maintainer time, I could imagine supporting all of themā€¦ But as that isnā€™t the caseā€¦

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESSS/conda-devenv - GitHub
conda -devenv is conda extension to work with multiple projects in development mode. It works by processing environment.devenv.yml files, similar to howĀ ...
Read more >
conda-devenv Documentation
conda -devenv is conda extension to work with multiple projects in development mode. It works by processing environment.devenv.yml files,Ā ...
Read more >
ubuntu - Solving conda environment stuck - Stack Overflow
I assume the name "devenv" means this is a development environment. So, I get that one wants all these tools immediately at hand....
Read more >
Conda Devenv - :: Anaconda.org
A tool to work with multiple projects in develop-mode using conda-env. Conda Ā· Files Ā· Labels Ā· Badges. License: MIT; Home: httpsĀ ...
Read more >
Vscode conda and modern fortran extension
Vscode conda and modern fortran extension Ā· Help Visual Studio Code ... name: fortran channels: - conda-forge - defaults dependencies: - fpmĀ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found