microsoft / microsoft/vscode-python-environments

How to expose environments created with Snakemake

Open
#1,730 3 comments 0 reactions 0 assignees View on GitHub
triage-needed
Dominant language
TypeScript
Stars
138
Forks
62
Avg merge
1d 4h
Merged PRs (30d)
35

Description

In [Snakemake](https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#target-rules) you normally do something like this

```python
rule my_rule:
input:
"some/input"
output:
"some/output"
conda:
"a/conda/env.yml"
script:
"some/script.py"
```

when the workflow is launched a new conda env will be created under `.snakemake/conda/xxx` where `xxx` is a hash created by snakemake (kind of a name)

Now I was hoping that doing this in `.vscode/settings.json` was enough,

```json
{
....
"python-envs.workspaceSearchPaths": [".snakemake/conda/**"],
....
}
```

But then when I e.g. open a jupyter notebook from VSCode I do not see any of those envs (neither as simple envs nor as kernels as all of them have also `ipykernel` installed)

Am I missing something?

Contributor guide

Open the contributing guide

Research direction

Start with the .vscode/settings.json configuration and reproduce discovery using python-envs.workspaceSearchPaths set to .snakemake/conda/**. Check how the generated Snakemake environments are handled when opening a Jupyter notebook and whether they are offered as environments or kernels. Done means the matching environments are visible in the relevant VS Code pickers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.