-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently the default channels are only added if there is no environment file:
xeus/jupyterlite_xeus/add_on.py
Lines 130 to 147 in eda12f8
| # 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
Labels
enhancementNew feature or requestNew feature or request