Closed noklam closed 22 hours ago
@astrojuanlu make a point here we should change it to base_env according to settings.py
if possible.
https://github.com/kedro-org/vscode-kedro/pull/21#discussion_r1636928715
https://github.com/microsoft/vscode-python/wiki/Python-Environment-APIs
Other than settings, I am looking at if it's possible to make use of .env
, which is support natively by VSCode's Python extension. This is by default on. The Python extension has these environment variables already, so the task is figure out whether it is possible to access these information from their API and pass to the LSP.
On a second thought, I decide not to make dotenv
loaded by the extension. This has side-effect to an actual Kedro project. i.e. if .env
set KEDRO_ENV=prod
, a kedro run
will run the prod
environment instead of base
.
Move this from description to comment as many things has changed.
A few approaches in mind:
Pro:
Con:
Inspiration from PyCharm, user can run a package without installing it (Pycharm add it to sys.path
secretly through an UI click), which sometimes backfire as many people don't understand the concept when they move out from PyCharm.
Pro:
Con:
(it's feasiblity to add new button, the screenshot show another plugin added new things to the menu)
Con:
KEDRO_ENVIRONMENT
, make use of this existing env variable.Pro:
Con:
KEDRO_ENVIRONMENT
do changes runtime behavior.
In kedro, we have the concept of "Environment" which is determined at runtime (default with
base
). The current extension always assumebase
and does not have a way to take this runtime information.Todo: