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

Please add a feature that allows selecting the programming language version or selecting a personal template prepared in advance when creating a new environment. #40

Open
hushoujier opened this issue Oct 9, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@hushoujier
Copy link

Environment

  1. node -v: none
  2. npm -v: none
  3. Operating system: Windows 10 21H2 19044.1288

Prerequisite

Install this extension

Steps to Reproduce

1. Open the command palette (Ctrl+Shift+P)
2. Type - micromamba create environment
3. Choose a template from a list
4. The environment is activated automatically

Relevant Debug Info

none

Expected Behavior

1. Open the command palette (Ctrl+Shift+P)
2. Type - micromamba create environment
3. Choose a template from a list
4. Choose the programming language version
5. The environment is activated automatically

Or

1. Open the command palette (Ctrl+Shift+P)
2. Type - micromamba create environment
3. Choose a personal template prepared in advance
4. The environment is activated automatically

Actual Behavior

The environment automatically creates and downloads the latest programming language version


@corker
Copy link
Collaborator

corker commented Oct 9, 2023

Thank you @suuperhu for the feature request. I'm unsure if this is a good way to go, as things could get complicated quickly. Micromamba environment file allows defining libraries and versions in a very flexible format. For example, here is an environment file that I use often:

# Micromamba environment file
# https://marketplace.visualstudio.com/items?itemName=corker.vscode-micromamba

name: default

channels:
  - conda-forge

dependencies:
  - nodejs=18
  - terraform=1
  - pip:
    - azure-cli

As you can see, we pin node and terraform versions and add azure-cli via pip
It would be great to define a feature that could cover multiple scenarios for developers in a convenient way.
I'm still thinking about how to do it. I'd be glad to hear your thoughts on this.

@corker corker added the enhancement New feature or request label Oct 9, 2023
@pklapperich
Copy link

pklapperich commented Mar 19, 2024

Honestly, I think this could be addressed simply with some README improvements. Today I tried to use this with a project that already had an environment.yml, but my file had prefix: path\to\conda\env set. This caused it to fail without much error. But I didn't even realize that "Create Environment" implied "Create Environment from environment.yml if one already exists, otherwise create a new environment.yml.

I would suggest changing the readme:


Micromamba: create an environment

This command uses environment.yml to create or update a virtual environment. The environment.yml is a mamba environment file which describes the interpreters and packages to install into the environment. If your project doesn't have an environment.yml yet, one will be created. The extension comes with a number of templates, but you could change it to your needs and re-run the create command.


With the suggested wording, I think it should be clear to users that they can do this workflow in a new project:

  1. Micromamba: Create Environment
  2. Edit the environment.yml to add nodejs, python packages, set a specific python version, etc
  3. Run Micromamba: Create Environment again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants