AltimateAI / AltimateAI/vscode-dbt-power-user

Support python interpreter per workspace folder

オープン
#770 コメント 16 件 リアクション 5 件 担当者 0 名 GitHub で見る
bug
主要言語
JavaScript
スター
585
フォーク
121
平均マージ
5日 39分
マージ済み PR(30日)
4

説明

### Expected behavior

In our project, we use [multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).

The folder structure of this project is like this.

```
.
├── project.code-workspace
├── dbt
│ ├── dbt_project.yml
│ ├── pyproject.toml
│ ├── ...
├── other-workspace-folder
│ ├── ...
```

As a priority for resolving `dbt` command paths, we expect the following,

1. If it is set, the settings of `dbt-power-user` extension.
2. Python virtual environment on each workspace folder like `dbt` folder.
3. Python virtual environment on workspace root.
4. Global environment ($PATH)

### Actual behavior

The path finding for `dbt power user` is as follows:

1. If it is set, the settings of `dbt-power-user` extension.
2. Python virtual environment on workspace root.

This python enviroment is determined the first time VSCode is opened, so moving workspace folders does not change the Python virtual environment settings.

### Steps To Reproduce

1. use multi-workspace.
2. add `sample` workspace-folder and create dbt project on it.
3. create python virtual environment on the `sample` workspace.
4. set python virtual environment on the `sample` workspace.
![figure](https://github.com/AltimateAI/vscode-dbt-power-user/assets/47286750/7c130a01-3e37-4099-972f-4497ac9accbd)
4. install `dbt-core` in the python virtual environment on the `sample` workspace.
6. open `sample/dbt_project.yml`

### Log output/Screenshots

https://private-user-images.githubusercontent.com/47286750/289367172-311f6d7f-f917-469a-8a9a-4f547416d3ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDIyNjEzOTEsIm5iZiI6MTcwMjI2MTA5MSwicGF0aCI6Ii80NzI4Njc1MC8yODkzNjcxNzItMzExZjZkN2YtZjkxNy00NjlhLThhOWEtNGY1NDc0MTZkM2JhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjExVDAyMTgxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjZTQ1MjYzOGExMDdhYzM4MjM1Zjk2NjNhMzI1NzA3MmYwZDRkMGIzMjFiNWRmOWY0MThiZjhlZjllY2U0N2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.S7E_pLOh74ScMYS_NFfMVzTlBsqXSUiaTFTZdnNSJ7Q

### Operating System

Mac OS 14.1.1(23B81)

### dbt version

1.7.3

### dbt Adapter

1.7.0

### dbt Power User version

v0.27.3

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。