Skip to content

Automatically add the emscripten-forge channel if it is missing? #76

@jtpio

Description

@jtpio

Problem

Currently the default channels are only added if there is no environment file:

# open the env yaml file if it's provided
if env_file.exists():
with open(env_file, "r") as file:
yaml_content = yaml.safe_load(file)
env_name = yaml_content.get("name", "xeus-env")
env_prefix = root_prefix / "envs" / env_name
self.prefix = str(env_prefix)
create_conda_env_from_env_file(root_prefix, yaml_content, env_file.parent)
else:
create_conda_env_from_specs(
env_name=env_name,
root_prefix=root_prefix,
specs=["xeus-python"],
channels=["https://repo.mamba.pm/emscripten-forge", "conda-forge"],
)

Proposed Solution

Maybe the add-on should check if the user-provided environment.yml includes https://repo.mamba.pm/emscripten-forge in the list of channels, and add it automatically otherwise?

Additional context

This could help improving compatibility with existing environment.yml files without having to create a copy of the file with https://repo.mamba.pm/emscripten-forge in it.

And also for use cases such as repo2jupyterlite: jupyterlite/repo2jupyterlite#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions