feat(vscode): .env file into python env#4764
Merged
Conversation
1baccfb to
718c81b
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the VS Code extension to load environment variables (including those from a .env file) into the Python environment for SQLMesh commands, and refactors test helpers for TCloud setup.
- Extract common TCloud authentication and version helpers into
tcloud_utils.ts - Introduce
getPythonEnvVariablesand merge its output intosqlmeshExecandsqlmeshLspExec - Add end-to-end tests (
python_env.spec.ts) to verify.envvariable injection
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode/extension/tests/tcloud_utils.ts | New shared helpers for TCloud authentication and version setup |
| vscode/extension/tests/tcloud.spec.ts | Removed duplicate helpers and import from tcloud_utils.ts |
| vscode/extension/tests/python_env.spec.ts | New tests for verifying .env variable injection in Python env |
| vscode/extension/src/utilities/sqlmesh/sqlmesh.ts | Merge Python env vars into process environment for SQLMesh cmds |
| vscode/extension/src/utilities/common/python.ts | Add getPythonEnvVariables to fetch env vars from Python ext |
Comments suppressed due to low confidence (1)
vscode/extension/tests/python_env.spec.ts:16
- [nitpick] The parameter name
sushi_pathuses snake_case, which is inconsistent with the project's camelCase convention. Rename it tosushiPathfor consistency.
function writeEnvironmentConfig(sushi_path: string) {
718c81b to
044246c
Compare
044246c to
40726e6
Compare
georgesittas
approved these changes
Jun 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.